See below.

> On Jun 23, 2022, at 12:57 AM, Matus UHLAR - fantomas <uh...@fantomas.sk> 
> wrote:
> 
> On 22.06.22 22:04, Austin Witmer wrote:
>> Thanks for that! Now I have a different problem. :(
>> 
>> So, on my server I have three domains that each have an austin@ address.  
>> For example, aus...@domain1.com, aus...@domain2.com , aus...@domain3.com .
>> 
>> The problem is that whenever I send an email to aus...@domain2.com  or 
>> aus...@domain3.com  it always goes to the aus...@domain1.com account.  What 
>> would be causing that to happen?
> 
> apparently all those domains are in mydestination so users in them are 
> treated as local.
> 

Actually not.
This is what I had in the mydestination line.
mydestination = $myhostname, mail, localhost.localdomain, localhost

I had seen in a tutorial somewhere that mydestination should be: mydestination 
= localhost

Is that correct?

> I can't see any of those listes in config you have posted:
> https://marc.info/?l=postfix-users&m=165556692315898&w=2
> so it's hard to guess.
> 
>> It seems that it maybe has something to do with my setting for myorigin = 
>> /etc/mailname.
> 
> myorigin only affects outgoing mail.

The contents of /etc/mailname is sunlightmail.net. Which is what I am calling 
domain1.com in the log below . . .

> 
> -- 
> Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
> Warning: I wish NOT to receive e-mail advertising to this address.
> Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
> Windows 2000: 640 MB ought to be enough for anybody

Below is a sample of my mail.log file when I try to send an email from an 
external email account (user@outsidedomain) to a user on my server 
(u...@domain2.com). The email ends up in the inbox of u...@domain1.com instead 
of u...@domain2.com as you can see towards the end of the log. Why is that? 

It seems that somewhere in the process the to address is getting rewritten from 
u...@domain1.com to u...@domain2.com. Can anyone advise me as to what is going 
on?

Mail log:

Jun 23 04:58:22 mail postfix/smtpd[170312]: connect from 
mail3.outsidedomain.com[216.24.56.73]
Jun 23 04:58:22 mail postgrey[952]: action=pass, reason=client AWL, 
client_name=mail3.outsidedomain.com, client_address=216.24.56.73/32, 
sender=u...@outsidedomain.com, recipient=u...@domain2.com
Jun 23 04:58:22 mail policyd-spf[170345]: prepend Received-SPF: Pass (mailfrom) 
identity=mailfrom; client-ip=216.24.56.73; helo=mail3.outsidedomain.com; 
envelope-from=u...@outsidedomain.com; receiver=<UNKNOWN> 
Jun 23 04:58:23 mail postfix/smtpd[170312]: F414717A09F: 
client=mail3.outsidedomain.com[216.24.56.73]
Jun 23 04:58:23 mail postfix/cleanup[170347]: F414717A09F: replace: header 
Received: from mail3.outsidedomain.com (mail3.outsidedomain.com 
[216.24.56.73])??by mail.sunlightmail.net (Postfix) with ESMTPS id 
F414717A09F??for <u...@domain2.com>; Thu, 23 Jun 2022 04:58:22 +000 from 
mail3.outsidedomain.com[216.24.56.73]; from=<u...@outsidedomain.com> 
to=<u...@domain2.com> proto=ESMTP helo=<mail3.outsidedomain.com>: Received: 
from [127.0.0.1] (localhost [127.0.0.1])??by mail.sunlightmail.net (Postfix) 
with ESMTPS id F414717A09F??for <u...@domain2.com>; Thu, 23 Jun 2022 04:58:22 
+0000 (UTC)
Jun 23 04:58:23 mail postfix/cleanup[170347]: F414717A09F: replace: header 
Received: from smtpclient.apple ([75.161.59.227])?        by 
mail3.outsidedomain.com (13.0.2 build 8 RHEL7 x64) with ASMTP (SSL) id 
202206230058226909?        for <u...@domain2.com>; Thu, 23 Jun from 
mail3.outsidedomain.com[216.24.56.73]; from=<u...@outsidedomain.com> 
to=<u...@domain2.com> proto=ESMTP helo=<mail3.outsidedomain.com>: Received: 
from [127.0.0.1] (localhost [127.0.0.1])?        by mail3.outsidedomain.com 
(13.0.2 build 8 RHEL7 x64) with ASMTP (SSL) id 202206230058226909?        for 
<u...@domain2.com>; Thu, 23 Jun 2022 00:58:22 -0400
Jun 23 04:58:23 mail postfix/cleanup[170347]: F414717A09F: 
message-id=<d06e8aa1-f479-4f0f-bfcc-ceb7d7010...@outsidedomain.com>
Jun 23 04:58:23 mail opendkim[863]: F414717A09F: mail3.outsidedomain.com 
[216.24.56.73] not internal
Jun 23 04:58:23 mail opendkim[863]: F414717A09F: not authenticated
Jun 23 04:58:23 mail opendkim[863]: F414717A09F: DKIM verification successful
Jun 23 04:58:23 mail opendkim[863]: F414717A09F: s=mail d=outsidedomain.com 
a=rsa-sha256 SSL 
Jun 23 04:58:23 mail postfix/qmgr[170293]: F414717A09F: 
from=<u...@outsidedomain.com>, size=1384, nrcpt=1 (queue active)
Jun 23 04:58:23 mail spamd[91051]: spamd: connection from ::1 [::1]:44234 to 
port 783, fd 5
Jun 23 04:58:23 mail spamd[91051]: spamd: setuid to gpgit succeeded
Jun 23 04:58:23 mail spamd[91051]: spamd: processing message 
<d06e8aa1-f479-4f0f-bfcc-ceb7d7010...@outsidedomain.com> for gpgit:1001
Jun 23 04:58:23 mail postfix/smtpd[170312]: disconnect from 
mail3.outsidedomain.com[216.24.56.73] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 
quit=1 commands=7
Jun 23 04:58:23 mail spamd[91051]: spamd: clean message (-1.2/5.0) for 
gpgit:1001 in 0.3 seconds, 1572 bytes.
Jun 23 04:58:23 mail spamd[91051]: spamd: result: . -1 - 
ALL_TRUSTED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_PASS,URIBL_BLOCKED
 
scantime=0.3,size=1572,user=gpgit,uid=1001,required_score=5.0,rhost=::1,raddr=::1,rport=44234,mid=<d06e8aa1-f479-4f0f-bfcc-ceb7d7010...@outsidedomain.com>,autolearn=ham
 autolearn_force=no
Jun 23 04:58:23 mail spamd[1128]: prefork: child states: II
Jun 23 04:58:23 mail postfix/pickup[170292]: E3AA217B05E: uid=1001 
from=<u...@outsidedomain.com>
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)
Jun 23 04:58:23 mail postfix/qmgr[170293]: F414717A09F: removed
Jun 23 04:58:23 mail postfix/cleanup[170389]: E3AA217B05E: 
message-id=<d06e8aa1-f479-4f0f-bfcc-ceb7d7010...@outsidedomain.com>
Jun 23 04:58:23 mail opendkim[863]: E3AA217B05E: no signing table match for 
'u...@outsidedomain.com'
Jun 23 04:58:23 mail opendkim[863]: E3AA217B05E: DKIM verification successful
Jun 23 04:58:23 mail opendkim[863]: E3AA217B05E: s=mail d=outsidedomain.com 
a=rsa-sha256 SSL 
Jun 23 04:58:23 mail postfix/qmgr[170293]: E3AA217B05E: 
from=<u...@outsidedomain.com>, size=2004, nrcpt=1 (queue active)
Jun 23 04:58:23 mail postfix/smtpd[170392]: connect from localhost[127.0.0.1]
Jun 23 04:58:23 mail postfix/smtpd[170392]: EF1F417A09F: 
client=localhost[127.0.0.1]
Jun 23 04:58:23 mail postfix/cleanup[170387]: EF1F417A09F: 
message-id=<d06e8aa1-f479-4f0f-bfcc-ceb7d7010...@outsidedomain.com>
Jun 23 04:58:23 mail opendkim[863]: EF1F417A09F: no signing table match for 
'u...@outsidedomain.com'
Jun 23 04:58:23 mail opendkim[863]: EF1F417A09F: DKIM verification successful
Jun 23 04:58:23 mail opendkim[863]: EF1F417A09F: s=mail d=outsidedomain.com 
a=rsa-sha256 SSL 
Jun 23 04:58:23 mail postfix/qmgr[170293]: EF1F417A09F: 
from=<u...@outsidedomain.com>, size=2320, nrcpt=1 (queue active)
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)
Jun 23 04:58:24 mail postfix/qmgr[170293]: E3AA217B05E: removed
Jun 23 04:58:24 mail dovecot: 
lmtp(u...@domain1.com)<170398><SMJGO+/ys2KemQIANmah8A>: sieve: 
msgid=<d06e8aa1-f479-4f0f-bfcc-ceb7d7010...@outsidedomain.com>: stored mail 
into mailbox 'INBOX'
Jun 23 04:58:24 mail postfix/lmtp[170400]: EF1F417A09F: to=<u...@domain1.com>, 
relay=mail.sunlightmail.net[private/dovecot-lmtp], delay=0.05, 
delays=0.01/0/0/0.04, dsn=2.0.0, status=sent (250 2.0.0 <u...@domain1.com> 
SMJGO+/ys2KemQIANmah8A Saved)
Jun 23 04:58:24 mail postfix/qmgr[170293]: EF1F417A09F: removed
Jun 23 04:58:24 mail dovecot: lmtp(170398): Disconnect from local: Client has 
quit the connection (state=READY)

Austin Witmer

Reply via email to