|Main Archive Page > Month Archives > postfix-users archives|
Le 19/11/2010 21:14, Stan Hoeppner a écrit :
>> Why is Postfix ignoring the alias entry for root?
First, /etc/aliases only applies to "local" domains. but OP has
local_transport = error:local mail delivery is disabled
Second, non fqdn addresses get "fixed" by postfix. In particular, OP has
# postconf myorigin
myorigin = $myhostname
# postconf myhostname
myhostname = mail.example.org
so mail for <root> goes to <firstname.lastname@example.org>
>> I have run newaliases and restarted postfix and I can see that the
>> aliases.db has been updated.
> This is really hard to say without seeing the actual contents of
> /etc/aliases, /usr/bin/newaliases.postfix, and
> /etc/postfix/relay_recipients, and unobfuscated log entries.
OP has (at least) two options:
deliver mail for root to a remote account (email@example.com). This is
achieved by adding the following entry to virtual_alias_maps:
This way, mail for <root> will get sent to <firstname.lastname@example.org>
deliver such mail to a local account.
for this, OP needs to remove his local_transport setting and set
mydestination = localhost.example.com
and the virtual alias would be
to avoid accepting mail for *@localhost.example.com via smtp, simply add
an access check to smtpd restrictions. for example:
/@localhost\.example\.com$/ REJECT blah blah
# block mail to our IPs
/@\[127/ REJECT blah blah
/@\[10\./ REJECT blah blah
This won't stop mail to joe@[local.ip]
you can use a pcre access check if that really matters...