People cannot spell my name. How to add Postfix aliases.

Under the postfix system aliases can be created so that an email addressed to a particular address can be delivered to another address. This is handy for email addresses which are often misspelled, or an alias can be used to redirect a generic email address to specific user. For example support@ can be redirected to bob@.

The process for adding aliases is as follows:

The postfix configuration file main.cf which is usually located in /etc/postfix identifies the files being used for aliases. You’re looking for the alias_database and alias_maps directives. Alternatively you can execute postconf which will identify the values in use.

In a default Ubuntu  install you are using /etc/aliases

As root perform the following:

edit /etc/aliases and add lines in the format of

incoming_address: redirect_address

e.g. support: bob

run newaliases which generates the database file. This is the step most people forget and wonder why their new aliases aren’t working.

The final step is to reload postfix i.e. service postfix reload

To test the new setup send an email to support@yourdomain.com and it should be delivered to Bob.

Share and Enjoy:
  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Twitter
  • Google Bookmarks

1 thought on “People cannot spell my name. How to add Postfix aliases.

Leave a Reply

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

*