Re: RCPT syntax error from bank

2021-04-05 Thread Martijn van Duren
On Sun, 2021-04-04 at 07:03 -0600, Anthony J. Bentley wrote:
> Hi,
> 
> I had an interesting occurrence today... I was performing an action
> that required a confirmation code from my bank, which they sent by
> email. Unfortunately the mail never arrived, because:
> 
> Apr  4 03:25:16 axx smtpd[59645]: fdc8f818f7adb2aa smtp failed-command
> command="RCPT TO:<"username"@example.com>"
> result="501 5.1.3 Recipient address syntax error"
> 
> I assume the double quotes in there were the problem. I had to switch
> to a GMail account to receive it.
> 
Since everyone responding likes to point to what might be a nice and
comfy workaround, let me take some inspiration from RFC5321.

>From section 3.3:
  RCPT TO: [ SP  ] 

So let´s expand forward-path from section 4.1.2:
   Forward-path   = Path
   Path   = "<" [ A-d-l ":" ] Mailbox ">"
   Mailbox= Local-part "@" ( Domain / address-literal )
   Local-part = Dot-string / Quoted-string
  ; MAY be case-sensitive
   Quoted-string  = DQUOTE *QcontentSMTP DQUOTE

In other words: the bank is correct (although maybe a little unusual)
to use a double-quote surrounding the local-part. This should be fixed
in smtpd.

I´m not very familiar with that part of the code and I don´t know when
I have the time to look into it. If anyone else beats me to this I would
most welcome it. :-)

martijn@




Re: RCPT syntax error from bank

2021-04-04 Thread Edgar Pettijohn
On Apr 4, 2021 5:36 PM, "Anthony J. Bentley"  wrote:Hi Peter,



Peter Nicolai Mathias Hansteen writes:

> It's interesting that the subject turns up here, when there is a

> fresh (and good IMO) blog post out about email address validation out,

> "Your E-Mail Validation Logic is Wrong"

>  by Jan Schaumann



This seems to suggest the problem is in the opposite direction: that

OpenSMTPD is wrong to reject "user"@example.com, and perhaps also

wrong to not map "user"@example.com to u...@example.com.



-- 

Anthony J. Bentley


It would be wrong if the "user"@example.com was an actual username. I don't think smtpd should have any hard coded mappings built in. I believe the real problem is the banks server decided to change your email username to another valid username without your consent. Luckily its your server and you can see what happened.Edgar 

Re: RCPT syntax error from bank

2021-04-04 Thread Peter Nicolai Mathias Hansteen


> 4. apr. 2021 kl. 15:51 skrev Edgar Pettijohn :
> 
> On Sun, Apr 04, 2021 at 07:03:47AM -0600, Anthony J. Bentley wrote:
>> Hi,
>> 
>> I had an interesting occurrence today... I was performing an action
>> that required a confirmation code from my bank, which they sent by
>> email. Unfortunately the mail never arrived, because:
>> 
>> Apr  4 03:25:16 axx smtpd[59645]: fdc8f818f7adb2aa smtp failed-command
>> command="RCPT TO:<"username"@example.com>"
>> result="501 5.1.3 Recipient address syntax error"
>> 
>> I assume the double quotes in there were the problem. I had to switch
>> to a GMail account to receive it.
>> 
> 
> It is. Seemed like a good problem for a filter to solve, but it looks like
> smtpd verifies the syntax before sending to filterland.
> 
> You should write their postmaster and complain.

It’s interesting that the subject turns up here, when there is a fresh (and 
good IMO) blog post out about email address validation out, "Your E-Mail 
Validation Logic is Wrong" https://www.netmeister.org/blog/email.html 
 by Jan Schaumann

It’s worth reading and perhaps pointing to when complaining to said postmaster.

All the best,
Peter

—
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.






signature.asc
Description: Message signed with OpenPGP


Re: RCPT syntax error from bank

2021-04-04 Thread Anthony J. Bentley
Hi Peter,

Peter Nicolai Mathias Hansteen writes:
> It's interesting that the subject turns up here, when there is a
> fresh (and good IMO) blog post out about email address validation out,
> "Your E-Mail Validation Logic is Wrong"
>  by Jan Schaumann

This seems to suggest the problem is in the opposite direction: that
OpenSMTPD is wrong to reject "user"@example.com, and perhaps also
wrong to not map "user"@example.com to u...@example.com.

-- 
Anthony J. Bentley



Re: RCPT syntax error from bank

2021-04-04 Thread Edgar Pettijohn
On Sun, Apr 04, 2021 at 07:03:47AM -0600, Anthony J. Bentley wrote:
> Hi,
> 
> I had an interesting occurrence today... I was performing an action
> that required a confirmation code from my bank, which they sent by
> email. Unfortunately the mail never arrived, because:
> 
> Apr  4 03:25:16 axx smtpd[59645]: fdc8f818f7adb2aa smtp failed-command
> command="RCPT TO:<"username"@example.com>"
> result="501 5.1.3 Recipient address syntax error"
> 
> I assume the double quotes in there were the problem. I had to switch
> to a GMail account to receive it.
>

It is. Seemed like a good problem for a filter to solve, but it looks like
smtpd verifies the syntax before sending to filterland.

You should write their postmaster and complain.

Edgar
> -- 
> Anthony J. Bentley
> 



RCPT syntax error from bank

2021-04-04 Thread Anthony J. Bentley
Hi,

I had an interesting occurrence today... I was performing an action
that required a confirmation code from my bank, which they sent by
email. Unfortunately the mail never arrived, because:

Apr  4 03:25:16 axx smtpd[59645]: fdc8f818f7adb2aa smtp failed-command
command="RCPT TO:<"username"@example.com>"
result="501 5.1.3 Recipient address syntax error"

I assume the double quotes in there were the problem. I had to switch
to a GMail account to receive it.

-- 
Anthony J. Bentley