I observed a strange (to me) behavior and id like a better understanding of what is happening.

I have smtpd_reject_unlisted_recipient = no
I do not have reject_unlisted_recipient in any of the smtpd_*_restrictions I have a milter that checks the rcpt address against SQL and returns a custom reject message if user doesn't exist
Pretend my server is example.com and spammer.com is someone fictitious.

If i get an email From: u...@spammer.com, To: u...@example.com then the milter gives the custom reject message.

However if they send an email with both addresses from my domain like From: u...@example.com, To: u...@example.com then postfix issues the default reject:

NOQUEUE: reject: RCPT from unknown[196.188.245.169]: 550 5.1.0 <u...@example.com>: Sender address rejected: User unknown in virtual mailbox table; from=<u...@example.com> to=<u...@example.com> proto=ESMTP helo=<[196.188.245.169]>

In that case is postfix rejecting based on the From: or the To: not being a valid user? Why is postfix checking either when smtpd_reject_unlisted_recipient = no? Is there a built in check on the From: address that does something if the From: domain matches one of virtual_mailbox_domains? If so what is actually happening behind the scenes?

Reply via email to