Thanks again for your tips. See below. > On Jun 23, 2022, at 9:21 AM, Viktor Dukhovni <postfix-us...@dukhovni.org> > wrote: > > On Thu, Jun 23, 2022 at 09:01:54AM -0600, Austin Witmer wrote: > >> When I move all of my domains to local instead of virtual, the problem >> goes away. Any idea why that would happen? > > You really should read the Postfix book by Ralf and Patrick, or > at least understand the VIRTUAL_README tutorial.
Thanks for the book recommendation! Is it on amazon? > > All domains listed in mydestination have the same user namespace, but > IIRC "mailbox_transport" preserves the original domain part (unless > aliases(5) rewrites the recipient). Ok, I think that makes sense. > > With virtual mailbox domains, each domain has its set of valid users, > and again the domain part is preserved unless the recipient is rewritten > via the virtual(5) alias table. Are the two lines below the virtual alias table that you referring to? alias_maps = hash:/etc/aliases proxy:pgsql:/etc/postfix/pgsql-aliases.cf And/or virtual_alias_maps = hash:/etc/aliases proxy:pgsql:/etc/postfix/pgsql-aliases.cf > >>> On Jun 23, 2022, at 8:42 AM, Jaroslaw Rafa <r...@rafa.eu.org> wrote: >>> >>> Dnia 23.06.2022 o godz. 08:24:36 Austin Witmer pisze: >>>> Jun 23 04:58:23 mail postfix/pipe[170350]: F414717A09F: >>>> to=<u...@domain2.com>, relay=gpgit-pipe, delay=1, delays=0.34/0/0/0.68, >>>> dsn=2.0.0, status=sent (delivered via gpgit-pipe service) >>> >>> Here, the message is correctly addressed to u...@domain2.com ie. gpgit-pipe, >>> whatever that is, receives message addressed to u...@domain2.com >>> >>>> Jun 23 04:58:23 mail dovecot: lmtp(170398): Connect from local >>>> Jun 23 04:58:24 mail postfix/smtpd[170392]: disconnect from >>>> localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5 >>>> Jun 23 04:58:24 mail amavis[151849]: (151849-13) Passed CLEAN >>>> {RelayedInbound}, [127.0.0.1] <u...@outsidedomain.com> -> >>>> <u...@domain1.com>, Message-ID: >>>> <d06e8aa1-f479-4f0f-bfcc-ceb7d7010...@outsidedomain.com>, mail_id: >>>> H-nHD4oOTH7c, Hits: -, size: 1963, queued_as: EF1F417A09F, >>>> dkim_sd=mail:outsidedomain.com, 54 ms >>>> Jun 23 04:58:24 mail postfix/smtp[170390]: E3AA217B05E: >>>> to=<u...@domain1.com>, orig_to=<u...@domain2.com>, >>>> relay=127.0.0.1[127.0.0.1]:10024, delay=0.71, delays=0.64/0/0/0.06, >>>> 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 EF1F417A09F) >>> >>> But amavis here receives message addressed to u...@domain1.com. We can see >>> also dovecot entry above in the log. So it's either gpgit-pipe, dovecot or >>> amavis itself that rewrites address from u...@domain2.com to >>> u...@domain1.com. > > Jaroslaw is mistaken. > > -- > Viktor. This is the contents of my /etc/aliases file # See man 5 aliases for format postmaster: root info: root Below are the config lines from main.cf that I am using when I attempt to switch to virtual domains. See my notes after the config lines. Am I missing any essential parameters for using virtual domains? mailbox_transport = lmtp:unix:private/dovecot-lmtp alias_maps = hash:/etc/aliases proxy:pgsql:/etc/postfix/pgsql-aliases.cf #Should this be disabled if all of my domains are virtual? local_recipient_maps = proxy:pgsql:/etc/postfix/pgsql-boxes.cf $alias_maps #Should this be disabled if all of my domains are virtual? virtual_transport = $mailbox_transport virtual_mailbox_domains = encryptedmail.info, sunlightmail.net, animascreations.com, animaswoodcraft.com, appalachianmeats.com, mcmennonitechurch.org, thefabshop.net, postal22.com, rollingpastures.net virtual_minimum_uid = 100 virtual_uid_maps = static:1000 virtual_gid_maps = static:1000 virtual_alias_maps = hash:/etc/aliases proxy:pgsql:/etc/postfix/pgsql-aliases.cf #Will disabling this fix my problem of mail being sent to the wrong user on a different domain? virtual_mailbox_maps = proxy:pgsql:/etc/postfix/pgsql-boxes.cf $alias_maps Austin Witmer