----- Message from Noel Jones <njo...@megan.vbhcs.org> ---------
Date: Tue, 23 Mar 2021 12:46:29 -0500
From: Noel Jones <njo...@megan.vbhcs.org>
Reply-To: njo...@megan.vbhcs.org
Subject: Re: Setting up virtual alias domains and maps - failing to deliver
To: postfix-users@postfix.org
On 3/23/2021 6:31 AM, Simon Wilson wrote:
Changes:
mydestination - removed, left as default
Don't do that. Set it to something specific maybe "localhost.local"
virtual_alias_domains = simonandkate.lan, simonandkate.net, etc...
virtual_alias_maps = hash:/etc/postfix/virtual (and postmapped)
Removed all virtual alias domain entries from aliases and run newaliases
The domain alias appears valid:
[root@emp87 postfix]# postmap -q ka...@simonandkate.net
hash:/etc/postfix/virtual
katie
virtual aliases should always use a fully qualified email address,
such as katie@localhost.local
-- Noel Jones
Combining postconf -d/-n, naming is:
mydestination = $myhostname, localhost.$mydomain, localhost (i.e. default)
myhostname = mail.simonandkate.net
(specified in main.cf)
mydomain = simonandkate.lan (i.e. default)
myorigin = $myhostname (i.e default)
...that pans out to:
mydestination = mail.simonandkate.net, localhost.simonandkate.lan, localhost
myhostname = mail.simonandkate.net
mydomain = simonandkate.lan
myorigin = mail.simonandkate.net
On your second point, 'virtual' is written like this:
# simonandkate.net
si...@simonandkate.net simon
...which I will correct, note questions later.
I think the combination of naming and 'not-FQ aliases' is contributing
to the following in pflogsumm reporting (extract for clarity):
Recipients by message count
---------------------------
519 si...@simonandkate.net
40 si...@mail.simonandkate.net
98 howie...@howiesue.net
2 howie...@mail.simonandkate.net
Mail is getting delivered but with address variation to the final
destination. Note also the example at the bottom of this email, where
d...@domwilson.net is getting changed to d...@mail.simonandkate.net
Questions:
1. in virtual, do alias addresses always map out to
$mydestination-resolvable addresses? I.e. does it need to be
si...@simonandkate.net --> simon@something-in-$mydestination?
2. Is there a way to keep the address as the original recipient (as it
was when the domains were under mydestination) for things like
pflogsumm reporting?
3. Are there better options for my mydestination, myhostname,
mydomain, myorigin which will assist?
Thanks so much for the help Noel, Viktor, Matus.
Simon
Example:
Mar 24 09:29:49 emp87 postfix/lmtp[413570]: BDED91819ED:
to=<d...@mail.simonandkate.net>, orig_to=<d...@domwilson.net>,
relay=127.0.0.1[127.0.0.1]:10024, delay=5.4, delays=1.2/0.01/0/4.2,
dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025):
250 2.0.0 Ok: queued as BF46F1819EE)
Mar 24 09:29:50 emp87 postfix/lmtp[413577]: BF46F1819EE:
to=<d...@mail.simonandkate.net>,
relay=mail.simonandkate.net[/run/cyrus/socket/lmtp], delay=0.28,
delays=0.01/0/0.01/0.26, dsn=2.1.5, status=sent (250 2.1.5 Ok
SESSIONID=<cyrus-413438-1616542189-2-830271575779132882>)
--
Simon Wilson
M: 0400 12 11 16