Re: often (but not always) two envelopes per mail in queue
January 27, 2020 8:00 PM, "Tassilo Philipp" wrote: > Ok, I have a better idea now... > >>> 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 >> >> Thanks a ton for those two pointers, I'll investigate and write what I > can >> figure out. > > You correctly guessed a), turns out that my MUA (msmtp, but only when > triggered by mutt) somehow > doubles all RCPT TO addresses (but not always, as said). I'm not sure at the > moment why, but I can > exclude OpenSMTPd from being the culprit. > > I guess this was already going on for months, but previously used MSAs > weren't under my control, so > I never noticed it. Oops. > > Thanks again for your precise answer which pointed me into the right > direction, and sorry that I > didn't check it more thoroughly from the get go. no problem, glad you figured
Re: often (but not always) two envelopes per mail in queue
Ok, I have a better idea now... 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 Thanks a ton for those two pointers, I'll investigate and write what I can figure out. You correctly guessed a), turns out that my MUA (msmtp, but only when triggered by mutt) somehow doubles all RCPT TO addresses (but not always, as said). I'm not sure at the moment why, but I can exclude OpenSMTPd from being the culprit. I guess this was already going on for months, but previously used MSAs weren't under my control, so I never noticed it. Oops. Thanks again for your precise answer which pointed me into the right direction, and sorry that I didn't check it more thoroughly from the get go.
Re: often (but not always) two envelopes per mail in queue
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 Thanks a ton for those two pointers, I'll investigate and write what I can figure out. 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. Yes, I omitted the lines I thought were either not important (like pointing to the cert files), which I thought were unlikely to create problems (like rdns check filter regexes), ... I understand that this wasn't helpful. If I cannot find the issue by trying to hunt down what you pointed out, above, I'll break it down to the simplest possible config and share that one in it's entirety. 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. Thanks, this will come in useful!
Re: often (but not always) two envelopes per mail in queue
January 27, 2020 11:49 AM, "Tassilo Philipp" 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[50381]: 11490b9d19a2b420 mta delivery > evpid=10da45aca8ae47a5 > from= to= rcpt=<-> > source="" > relay="" delay=8s result="Ok" stat="250 2.6.0 > <[email protected]> > [InternalId=3259974] Queued mail for delivery" > Jan 27 10:20:43 schacht01 smtpd[50381]: 11490b9d19a2b420 mta delivery > evpid=10da45acc22f61bd > from= to= rcpt=<-> > source="" > relay="" delay=8s result="Ok" stat="250 2.6.0 > <[email protected]> > [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 .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 > 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.
often (but not always) two envelopes per mail in queue
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. To illustrate the case, sending a mail (sensitive info replaced), results in the queue to be before relay: # smtpctl show 10da45aca8ae47a5|inet4|mta|auth|[email protected]|[email protected]|[email protected]|1580120435|1580120435|1580120436|0|inflight|2| 10da45acc22f61bd|inet4|mta|auth|[email protected]|[email protected]|[email protected]|1580120435|1580120435|1580120436|0|inflight|2| More info on both envelopes: # smtpctl show envelope 10da45aca8ae47a5 version: 3 dispatcher: relay tag: MSA type: mta smtpname: mx.ownmailserver.com helo: localhost hostname: sockaddr: sender: [email protected] rcpt: [email protected] dest: [email protected] ctime: 1580120435 last-try: 0 last-bounce: 0 ttl: 0 retry: 0 flags: authenticated dsn-notify: 0 # smtpctl show envelope 10da45acc22f61bd version: 3 dispatcher: relay tag: MSA type: mta smtpname: mx.ownmailserver.com helo: localhost hostname: sockaddr: sender: [email protected] rcpt: [email protected] dest: [email protected] ctime: 1580120435 last-try: 0 last-bounce: 0 ttl: 0 retry: 0 flags: authenticated dsn-notify: 0 Looks like they are exact duplicates, but with their distinct envelope IDs. Here's the relay log: Jan 27 10:20:43 schacht01 smtpd[50381]: 11490b9d19a2b420 mta delivery evpid=10da45aca8ae47a5 from= to= rcpt=<-> source="" relay="" delay=8s result="Ok" stat="250 2.6.0 <[email protected]> [InternalId=3259974] Queued mail for delivery" Jan 27 10:20:43 schacht01 smtpd[50381]: 11490b9d19a2b420 mta delivery evpid=10da45acc22f61bd from= to= rcpt=<-> source="" relay="" delay=8s result="Ok" stat="250 2.6.0 <[email protected]> [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? 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 .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 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? Thank you
