Page 1 of 1

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

Posted: Sun May 16, 2010 3:33 pm
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

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

Posted: Sun May 16, 2010 5:50 pm
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.

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

Posted: Mon May 17, 2010 4:51 am
by Peter_w
Thanks that solved my problem.