On 2013-06-19 Wed 21:09 PM |, Viktor Dukhovni wrote:
> > 
> > virtual_alias_maps.map:
> > [email protected] user1@localhost
> > 
> > status=bounced (mail for localhost.example.com loops back to myself)
> 
> You MUST include localhost.$mydomain in mydestination:
> 
>       mydestination = localhost.$mydomain
> 
> Using virtual aliases to local accounts is the best approach.
> 


Thanks Viktor, this set up works with making the machines domain name
virtual for Postfix, accepting mail for pretty addresses & rejecting
remote mail for MOST Unix accounts, while accepting local mail to Unix
accounts, IF listed as virtual aliases (mutt, sendmail, cron,....):


main.cf:
myorigin = $mydomain
mydestination = localhost.$mydomain
virtual_alias_domains = btree:$config_directory/virtual_alias_domains.map
virtual_alias_maps = btree:$config_directory/virtual_alias_maps.map
sender_canonical_maps = btree:$config_directory/canonical.map
masquerade_domains = $mydomain, $virtual_alias_domains
remote_header_rewrite_domain = sender.domain.incomplete
alias_maps = btree:$config_directory/aliases
mail_spool_directory = /var/mail/
mailbox_transport = lmtp:unix:private/dovecot-lmtp

(smtpd_recipient_restrictions check_recipient_access 
btree:$config_directory/reject_system_accounts.map not needed)


canonical.map:
jb4356          [email protected]
jb8921          [email protected]
...
...


virtual_alias_domains.map:
example.com     virtual


virtual_alias_maps.map:
# hack to accept mail for postmaster/abuse@[ip.add.ress.es]
postmaster                      postmaster@localhost
abuse                           postmaster@localhost
# example.com:
[email protected]          postmaster@localhost
[email protected]               postmaster@localhost
[email protected]          hostmaster@localhost
[email protected]                admin-acct@localhost
[email protected]               acct145@localhost
[email protected]                acct267@localhost
[email protected]             acct267@localhost
...
...
[email protected]          jb4356@localhost
[email protected]        jb8921@localhost


aliases:
root:           admin-acct
MAILER-DAEMON:  postmaster
abuse:          postmaster
bin:            root
daemon:         root
named:          hostmaster
nobody:         root
uucp:           root
www:            root
ftp-bugs:       root
postfix:        postmaster
manager:        root
dumper:         root
operator:       root



It seems the aliases file is not used. I've got root, postmaster,
abuse, hostmaster, etc. in virtual_alias_maps.map. Should the other
traditional aliases of MAILER-DAEMON, bin, dumper, etc. be in there too?

Regards,
-- 
Craig Skinner | http://twitter.com/Craig_Skinner | http://linkd.in/yGqkv7

Reply via email to