nodemailer / smtp-server

Create custom SMTP servers on the fly
Other
846 stars 146 forks source link

Postfix DSN emails rejected #75

Closed DeanWard closed 7 years ago

DeanWard commented 7 years ago

I'm attempting to receive DSN (Delivery Status Notification) emails from postfix using mailin, mailin is using smtp-server.

If I send an email to my mailin instance from gmail it works fine.

but It's rejecting the sender on the DSNs with the message below

Sender address rejected: User unknown in local sender table

Any way to get around this? Can I disable this check?

andris9 commented 7 years ago

I don't know what mailin is doing, you have to check with them

DeanWard commented 7 years ago

It looks like it's an issue before it reaches mailin. I have collected these logs

[2016-12-04 20:15:57] DEBUG: [efMUTGvo7PPd] C: MAIL FROM:<>
[2016-12-04 20:15:57] DEBUG: [efMUTGvo7PPd] S: 550 550 5.1.1 <>: Sender address rejected: User unknown in local sender table
[2016-12-04 20:15:57] DEBUG: [efMUTGvo7PPd] C: RCPT TO:<example@example.com>
[2016-12-04 20:15:57] DEBUG: [efMUTGvo7PPd] S: 503 Error: need MAIL command
[2016-12-04 20:15:57] DEBUG: [efMUTGvo7PPd] C: DATA
[2016-12-04 20:15:57] DEBUG: [efMUTGvo7PPd] S: 503 Error: need RCPT command
[2016-12-04 20:15:57] DEBUG: [efMUTGvo7PPd] C: RSET
[2016-12-04 20:15:57] DEBUG: [efMUTGvo7PPd] S: 250 Flushed
[2016-12-04 20:15:57] DEBUG: [efMUTGvo7PPd] C: QUIT
[2016-12-04 20:15:57] DEBUG: [efMUTGvo7PPd] S: 221 Bye

As you can see the MAIL FROM is blank, as the RFC demands. I just need to know if I can instruct smtp-server not to care about this?

andris9 commented 7 years ago

The app itself (in this case mailin) can decide which kind of addresses does it accept or not. smtp-server passes the address as is and if the app rejects it, then returns the 550 error to the client.

DeanWard commented 7 years ago

Ah ok thank you for the information 👍