foxcpp / maddy

✉️ Composable all-in-one mail server.
https://maddy.email
GNU General Public License v3.0
5.13k stars 249 forks source link

Correct TO string is not working anymore after upgrade #714

Open dimm0 opened 4 months ago

dimm0 commented 4 months ago

Describe the bug

After upgrading to 0.7.1 the correct TO string like To: Name Lastname <name@aaa.com>\r\n is causing the error:

Was expecting RCPT arg syntax of TO:

Just the name@aaa.com works.

Steps to reproduce

Send mail to above recipient

Log files

Nothing in logs, but client is getting the error

foxcpp commented 4 months ago

go-smtp update included in 0.7.1 removed the "lax" parser for RCPT argument, that might be the reason.

I need a log with I/O to troubleshoot the issue further. Add this to your config:

smtp tcp://0.0.0.0:25 {
  io_debug
  debug
  ...
}

and try again. Look for RCPT line in the log and post it here.

senner commented 3 months ago

I get something similar..

submission: incoming message {"msg_id":"e0762daa","sender":"test@sender.net","src_host":"185217ff75c7","src_ip":"4.5.3.3:33184","username":"test@sender.net"} submission: RCPT ok {"msg_id":"e0762daa","rcpt":"test@example.com"} submission: DATA error {"addr":"('Test UserFullName', 'test@example.com')","modifier":"submission_prepare","msg_id":"e0762daa","reason":"mail: no angle-addr","smtp_code":554,"smtp_enchcode":"5.6.0","smtp_msg":"Invalid address in To"} submission: aborted {"msg_id":"e0762daa"}

foxcpp commented 3 months ago
submission: DATA error {"addr":"('Test UserFullName', '[test@example.com](mailto:test@example.com)')","modifier":"submission_prepare","msg_id":"e0762daa","reason":"mail: no angle-addr","smtp_code":554,"smtp_enchcode":"5.6.0","smtp_msg":"Invalid address in To"}

Looks like you have From: Test UserFullName 'test@example.com' in your message whereas the standard syntax is From: Test UserFullName <test@example.com>. maddy enforces additional checks for messages created via submission.

senner commented 3 months ago

Yah the test is coming from the Authentik server. I'll go investigate there.