January 27, 2020 11:49 AM, "Tassilo Philipp" <tphil...@potion-studios.com> wrote:
> Hello, > > I noticed that for most emails I submit through my instance of OpenSMTP, > there are most of the time > (but interestingly not always) two envelopes in the queue. However, mail > delivery works fine, and > only one copy arrives at the recipient. > > [...] > > Looks like they are exact duplicates, but with their distinct envelope IDs. > Here's the relay log: > > Jan 27 10:20:43 schacht01 smtpd: 11490b9d19a2b420 mta delivery > evpid=10da45aca8ae47a5 > from=<sen...@snd.com> to=<recei...@rcv.com> rcpt=<-> > source="<mail_server_addr>" > relay="<recv_mx_addr>" delay=8s result="Ok" stat="250 2.6.0 > <2020015810049931962...@snd.com> > [InternalId=3259974] Queued mail for delivery" > Jan 27 10:20:43 schacht01 smtpd: 11490b9d19a2b420 mta delivery > evpid=10da45acc22f61bd > from=<sen...@snd.com> to=<recei...@rcv.com> rcpt=<-> > source="<mail_server_addr>" > relay="<recv_mx_addr>" delay=8s result="Ok" stat="250 2.6.0 > <2020015810049931962...@snd.com> > [InternalId=3259974] Queued mail for delivery" > > So, both are relayed, it seems, however, on the receiving side only one copy > arrives, and no errors > reported. I guess that if there is a double relay, the receiver might still > only accept one copy, > b/c the Message-Id being the same? Or isn't there a double relay to begin > with? > Both were relayed, the recipient probably deduped on the Message-Id > I'm also a bit puzzled why in rare cases, only one envelope is in the queue - > what I would expect - > but I cannot find why or what the difference is. > > I have only one thing listening on the submission port: > > # netstat -4an | grep -F .587 > tcp4 0 0 <mail_server_addr>.587 *.* LISTEN > > The corresponding smtp.conf's config file line is, as well as the used > action/match pair: > > listen on $listen_ext port submission tls-require pki mx_pki auth hostname > $mx_domain senders > <sender_map> mask-src tag "MSA" > > action "relay" relay helo $mx_domain > match auth from any for any action "relay" > > So I guess my question is very simple in nature: Is this normal behaviour, or > is there something > going on that needs to be investigated? > There is something that needs to be investigated, this is not normal no. I won't rule out a bug in OpenSMTPD but given how envelopes are created, it is very unlikely: a- an envelope is created for each RCPT TO in a transaction... b- ... and additional envelopes may be created by aliases _during_ that RCPT TO You provided only a partial smtpd.conf so it's hard to know if b- is possible here, as relaying doesn't go through aliasing which would hint at a- being the explanation. smtpd.conf has to be read as a whole otherwise troubleshooting is not possible. You can run smtpd with `-T smtp` to inspect SMTP transactions as they are submitted, you can also use `-T rules` to check which rule was matched and make sure it is that match auth and not another one that got hit first.