Solved: How do I create non-local aliases in postfix

Questions related to the Postfix mail server
Post Reply
Peter_w
Posts: 28
Joined: Tue Aug 19, 2008 9:28 am

Solved: How do I create non-local aliases in postfix

Post by Peter_w »

Hello,

Ho do I create non local aliases in postfix?

I update /etc/mail/aliases
and have run:
/usr/bin/newaliases

But got the following error:

Code: Select all

postalias: warning: /etc/mail/aliases, line 37: name must be local
Last edited by Peter_w on Mon May 17, 2010 4:51 am, edited 1 time in total.
chris
Site Admin
Posts: 203
Joined: Mon Jul 21, 2008 9:52 am

Re: How do I create non-local aliases in postfix

Post by chris »

You probably want something like virtual alias domains.

Add/edit the following in /etc/postfix/main.cf:

Code: Select all

virtual_alias_domains = example.com, example.net, example2.com
virtual_alias_maps = regexp:/etc/postfix/virtual_alias
The create the file /etc/postfix/virtual_alias with the aliases you need:

Code: Select all

postmaster@example.com postmaster
info@example.com       joe
sales@example2.com      jane
# Uncomment entry below to implement a catch-all address
# @example.com         jim

# Uncomment entry below to implement a catch across all domains (example.com, example.net and example2.com)
/postmaster@.*/            catch_all@example.com
This should do it.
Peter_w
Posts: 28
Joined: Tue Aug 19, 2008 9:28 am

Re: How do I create non-local aliases in postfix

Post by Peter_w »

Thanks that solved my problem.
Post Reply