Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Mavericks/Server 3.0 mail / postfix aliases not working?

OS X Mavericks/Server 3.0 Users,


Upgrading to Mavericks and Server 3.0 appears to have broken my mail aliases.


I had these configured using /etc/postfix/aliases


Now there appears to be postfix information in both: /etc/postfix and /Library/Server/Mail/Config/postfix


I made changes to both of these and run "postalias" and stop & started the mail system, but it does not appear to work.


Can someone please advise on how you can create aliases now.


Thanks,


Zebity.

Posted on Nov 10, 2013 8:23 AM

Reply
27 replies

Apr 3, 2014 11:01 AM in response to William Bowden1

Thanks. I did remove the hash, regenerated the aliases.db, reloaded postfix, and stopped and restarted mail via serveradmin.


I have tried both this:


# Person who should get root's mail. Don't receive mail as root!

root: edward_figarsky,edward_figarsky@megamini.myserver.com,edward_figarsky@myserver.com


# Basic system aliases -- these MUST be present

MAILER-DAEMON: postmaster


and this:


# Person who should get root's mail. Don't receive mail as root!

root: edward_figarsky


# Basic system aliases -- these MUST be present

MAILER-DAEMON: postmaster


where in the first example megamini is the name of my server.


I have tried a number of combinations for root, and the only aliases that seem to work are ones like:


# Put your local aliases here.

ed: edward_figarsky,edward_figarsky@westrocktoys.com


When I send email to root@myserver.com my mail client will receive:


megamini.myserver.com gave this error:
<root@myserver.com>: Recipient address rejected: User unknown in local recipient table



Thanks for your help

Apr 3, 2014 7:57 PM in response to Ed Figarsky

Hi Ed 🙂


which aliases-file where you editing?! Seriously - there are 2 of them!

  • /private/etc/postfix/
  • /Library/Server/Mail/Config/postfix/

The latter of the 2 is the one.

User uploaded file

The aliases-file looks like this:

User uploaded file

  • make yourself sudo or login as root anyway
  • remove the hash
  • repace the you with the email-address that should receive them instead
  • save the file
  • run the newaliases
  • run postfix reload


This should work.

Apr 22, 2014 6:12 PM in response to William Bowden1

Hey William,


isn't the command newaliases instead of postalias aliases the one ....? At least that's the one I used (used to use), and it follows the instructions in the aliases-file itself.

Would you explain why you recommend the postalias aliases, please?


However - what about workgroupmanager?! There you would just enter the aliases for a user - it works in my case!

Apr 23, 2014 3:03 AM in response to William Bowden1

Thanks William,

Works a treat...


you made one typo though I have corrected for those unable to see it... I have added the bit you missed out...


Thanks again.



cd /etc

sudo mv aliases aliases.moved

ln -s /Library/Server/Mail/Config/postfix/aliases aliases

sudo mv aliases.db aliases.db.moved

ln -s /Library/Server/Mail/Config/postfix/aliases.db aliases.db

sudo postalias aliases

sudo postfix reload

Apr 23, 2014 1:53 PM in response to William Bowden1

Hello William 😉


don't get mad at me.


I may cite the Author Kyle D Dent from his book "Postfix, the definitive Guide" available from O'Reilly:


".....

Locating aliases


Historically, email systems used a single alias database.

Postfix lets you have as many as you want.

Multiple alias files can help organizing your configuration information. Typically, administrators configure multiple alias files for convenience when configuring separate mailing lists. The alias_maps parameter points to your alias files. If your system supports NIS, which is a network database of users (including their aliases), then by default Postfix includes NIS among your alias maps.

A typical default alias_maps looks like the following:


alias_maps = hash:/etc/aliases, nis:mail.aliases


If your system includes support for NIS, but you’re not using it, you should change the parameter so that it points to your aliases file only:


alias_maps = hash:/etc/aliases


You may want to locate your aliases file in your Postfix configuration directory for consistency. Some administrators prefer to have all of the email configuration files located together. Simply reassign alias_maps to point to the new location:


alias_maps = hash:/etc/postfix/aliases


You should also reassign alias_database so that your newaliases command continues to work correctly:


alias_database = hash:/etc/postfix/aliases



Building alias database files


Since the format of alias_maps differs from that of Postfix lookup tables, you cannot use postmap to build the alias database from your text file. Instead, Postfix provides the postalias command. Its command-line syntax is the same as that of postmap, allowing you to create or query alias_maps. To build an alias database from your aliases file, execute the following:


# postalias /etc/aliases


Another, Sendmail compatibility, command related to alias files is the newaliases command. It provides a convenient way to rebuild your alias database. The Postfix installation includes a replacement version of the command that follows the same syntax as the original. It’s normally executed with no arguments and determines which alias files to rebuild from the alias_database parameter. The alias_database parameter differs from alias_maps in that it includes only standard Unix database-mapped files (those that should be indexed by newaliases), whereas alias_maps might also contain other map types such as nis, newaliases uses the default_database_type parameter discussed earlier to determine which database format to use.


....."


So - will the newaliases not work - even stated otherwise?

Mavericks/Server 3.0 mail / postfix aliases not working?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.