Skip to end of metadata
Go to start of metadata

Currently there is not a way from MyRack Manager to modify the FROM: part of all emails generated on BrickStor appliances. As a result, there are instances where one may want to specify a particular email address for any number of reasons, but they are unable to do so. This article attempts to provide an answer to this problem.

Step-by-step guide

  1. Disable mail service before making any further changes.

    Disable mail service
    # svcadm disable postfix
  2. Edit /etc/postfix/main.cf and add this setting: sender_canonical_maps = regexp:/etc/postfix/sender_canonical so that the before and after look like the following. Notice change on line 26.

    Change to /etc/postfix/main.cf
    +++ Before +++
    ...
     20 #
     21 # Maps and Aliases
     22 #
     23 alias_database = dbm:/etc/postfix/aliases
     24 local_recipient_maps = unix:passwd.byname $alias_maps
     25 alias_maps = dbm:/etc/postfix/aliases
     26
     27 # Debug level
    ...
    
    
    +++ After +++
    ...
     20 #
     21 # Maps and Aliases
     22 #
     23 alias_database = dbm:/etc/postfix/aliases
     24 local_recipient_maps = unix:passwd.byname $alias_maps
     25 alias_maps = dbm:/etc/postfix/aliases
     26 sender_canonical_maps = regexp:/etc/postfix/sender_canonical
     27
     28 # Debug level
    ...
  3. Now we create a mapping using a regular expression with the following command. However, replace in this example no-reply@yourdomain.com with an appropriate email address specific to your environment. This mapping effectively matches an email address that the machine generates based on its current hostname, which usually won't be internet legal such as root@localhost.localdomain will rewrite it to no-reply@yourdomain.com as in this example.

    Create address mapping
    # echo '/^(.*)@(.*)$/ no-reply@yourdomain.com' > /etc/postfix/sender_canonical
  4. Enable mail service again which should instantiate this mapping and all new emails produced on the box will have their FROM: field re-written to match the right side of value in step 3.

    Enable mail service
    # svcadm enable postfix

 

There is no content with the specified labels