On 2021-08-15 at 15:07:14 UTC-0400 (Sun, 15 Aug 2021 12:07:14 -0700)
Doug Hardie <bc...@lafn.org>
is rumored to have said:

I have an interesting question about logging. Postfix is working fine. I have one domain, sermon-archive.info, as mydomain. All other domains are listed in vmail_domains, for example:

lafn.org        OK


vmail_users contains:

bc...@lafn.org                  home_mail/doug/


vmail_alias contains:

bc...@lafn.org                  doug

Without actual config details of what each of those files is used for (i.e. they are NOT part of any Postfix standard/default setup) it is impossible to say for certain, but it seems likely that the lines in vmail_users and vmail_aliases are redundant. The alias gets expanded to the "local" (i.e. listed in /etc/passwd) user 'doug' so you don't ever have anything hit the entry in vmail_users.

Probably. 'postconf -n' needed for that to be anything more than a guess...

When email is sent to bc...@lafn.org, the following line is logged:

Aug 15 11:56:15 mail postfix/pipe[63616]: 4GnmjC1J7cz2fjRj: to=<d...@mail.sermon-archive.info>, orig_to=<bc...@lafn.org>, relay=dovecot, delay=0.16, delays=0.08/0.02/0/0.06, dsn=2.0.0, status=sent (delivered via dovecot service)

Yes, because bc...@lafn.org is aliased to doug and doug is canonicalized because you apparently have the default append_at_myorigin on and have $myorigin set to mail.sermon-archive.info.

That line has the to field as mail.sermon-archive.info. I am a bit confused as to why it would be that.

append_at_myorigin=yes

This is a default. It converts the bare username 'doug' that comes out of alias expansion into a fully qualified email address, which is almost always the right thing to do.

It's not wrong, and it works fine. It's just that the log scanners pick up that as the to address and not the original to so it looks like everything was sent to the sermon-archive.info address. I would like to be able to figure out the original to field.

It's right THERE... :)

Looking through the man page for pipe, it appears that master.cf has the default arguments of:

 -f ${sender} -d ${recipient}

If I replaced recipient with original_recipient, would that affect the log message, or cause any issues with delivery to dovecot?

Probably "YES" to both questions. That's guessing that you are using a 'pipe' entry in master.cf to call the dovecot LDA (i.e. $PREFIX/libexec/dovecot/deliver, usually...)

That depends on how you have configured *Dovecot* to know about where to deliver. If it is able to resolve virtual users (e.g. bc...@lafn.org) to local users or mailbox locations, that's fine. If not, you need to be giving it a recipient which it knows how to deliver.

Would I be better off patching the log scanner to pick up the orig_to field?

Yes.


--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire

Reply via email to