293952Re: Local UNIX accounts, aliasing & rejecting mail to non-public UNIX accounts
- Jun 21, 2013On 06/21/2013 09:57 PM, Craig R. Skinner wrote:
> On 2013-06-19 Wed 21:09 PM |, Viktor Dukhovni wrote:No. If the destination you use in virtual_alias_maps is @localhost, then
>>> user.name@... 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,....):
> myorigin = $mydomain
> mydestination = localhost.$mydomain
THAT must be in mydestination.
Postfix is quite literal.
mydestination = localhost
append_dot_mydomain = no
Or, if you wish to follow Victor's advice, qualify all aliases with
But that's just more typing than I need.
> virtual_alias_domains = btree:$config_directory/virtual_alias_domains.mapJust specify it directly; this just complicates things for no reason.
> example.com virtual
virtual_alias_domains = example.com
> virtual_alias_maps.map:It's not a hack; it is documented behaviour.
> # hack to accept mail for postmaster/abuse@[ip.add.ress.es]
Also, omitting postmaster@* will not cause it to be rejected; this
localpart is hardcoded to accept as per the RFCs.
(You still have to alias it somewhere it can be delivered, of course)
> postmaster postmaster@localhostSuperfluous, see above.
> abuse postmaster@localhost
> # example.com:
> postmaster@... postmaster@localhost
> It seems the aliases file is not used.Of course it is used, for any destinations in $mydestination.
You did not put "localhost" in $mydestination.
- << Previous post in topic Next post in topic >>