Mailing lists

From LQWiki
Jump to navigation Jump to search

Mailing lists

The postfix examples that were given above already show how to direct mail for virtual postmaster addresses to a local postmaster. You can use the same method to direct mail for any address to a local or remote address.

There is one major limitation: virtual aliases and virtual mailboxes can't directly deliver to mailing list managers such as majordomo. The solution is to set up virtual aliases that direct virtual addresses to the local delivery agent:


   virtual_alias_maps = hash:/etc/postfix/virtual

/etc/postfix/virtual: listname-request         listname   owner-listname


   listname: "|/some/where/majordomo/wrapper ..."
   owner-listname: ...
   listname-request: ...

This example assumes that in, $myorigin is listed under the mydestination parameter setting. If that is not the case, specify an explicit domain name on the right-hand side of the virtual alias table entries or else mail will go to the wrong domain.

More information about the Postfix local delivery agent can be found in the local(8) manual page.

Why does this example use a clumsy virtual alias instead of a more elegant transport mapping? The reason is that mail for the virtual mailing list would be rejected with "User unknown". In order to make the transport mapping work one would still need a bunch of virtual alias or virtual mailbox table entries.

  • In case of a virtual alias domain, there would need to be one identity mapping from each mailing list address to itself.
  • In case of a virtual mailbox domain, there would need to be a dummy mailbox for each mailing list address.