I know that the subject of the thread does not meet the practical mail flow so let me explain a bit.
Normally when a client connects and sends an email, postfix can handle the following restrictions in the order of the mail flow:
copied from: https://wiki.centos.org/HowTos/postfix_restrictions
Code: Select all
220 mail.example.com ESMTP Postfix # <-smtp_client_restrictions
HELO mail.example.com # <-smtp_helo_restrictions
250 mail.example.com #
MAIL FROM:<ned@example.com> # <-smtp_sender_restrictions
250 2.1.0 Ok #
RCPT TO:<ned@example.com> # <-smtp_recipient_restrictions
250 2.1.5 Ok #
DATA # <-smtp_data_restrictions
354 End data with <CR><LF>.<CR><LF> #
To:<ned@example.com> # <-header_checks
From:<ned@example.com> #
Subject:SMTP Test #
This is a test message # <-body_checks
. #
Would it be possible to achieve a setup like this?
When the client says: MAIL FROM:<me@efaspam.com> - lets look if the currently connected ip address of the sending client does resolve to a mx record of the domain-part in the MAIL FROM-Command.
If yes - let the client continue to relay the mail
If not - reject and disconnect.
As mentioned before I could not find any relevant information about this - maybe using the wrong search terms.
Any help or dicussion welcome...
-
duesen