Postfix outgoing address change

ISSUE:  When you install Postfix, the default outgoing address on that server will be apache@machinename.local.

RESOLUTION:  To change the outgoing address or the FROM address from your mailings, make the following changes:

  1. edit the /etc/postfix/main.cf file
  2. change the mydomain field to your mail domain [mydomain = mydomain.com]
  3. Add the following text to the bottom of the file:
    • smtp_generic_maps = hash:/etc/postfix/generic
  4. Save the main.cf file and exit
  5. edit the /etc/postfix/generic file
  6. at the bottom of the file you need to map the email addresses to the ones you want.
    • apache@machinename.local     myemail@mydomain.com
    • root@machinename.local           myemail@mydomain.com
    • @machinename.local                 myemail@mydomain.com (this can be a catchall, I would test)
  7. Save the generic file and exit
  8. Create the postfix db by typing:
    • postmap /etc/postfix/generic
  9. restart postfix and test

Leave a Reply

Your email address will not be published. Required fields are marked *

*