Rich Shepard
2005-10-14 16:24:38 UTC
I'm apparently still missing a critical part of understanding what is
happening during the SMTP exchange when a remote client wants to have a sent
message accepted by my MTA for internal delivery. Your patient explanation is
appreciated.
It is almost always a contrived hostname with the real IP address that
accompany the spam that continue to get through to my in-box. This is what
I've been trying to reject correctly; I still don't "get it."
On page 59 of Ralf and Patrick's "The Book of Postfix" I read,
"Client
"The client is the machine sending mail; Postfix will either log hostname
and IP, or "unknown" (if the hostname cannot be determined using DNS
lookups). Postfix gets the client's IP address from the kernel's TCP/IP
stack, and gets name from DNS or /etc/hosts before SMTP communication takes
place. This allows Postfix to impose restrictions if the client's IP address
and the hostname during SMTP communication don't match."
I thought that the restrictions I added to /etc/postfix/main.cf would catch
these mis-matched IP addresses and hostnames. They're not. So, I added a
header_check,
/^Received: .*unknown \[/ reject Rule H9
but was advised that this is quite risky and can result in rejections of
legitimate mail.
The two questions I would like answered are:
1) Under what circumstances would legitimate mail not reverse resolve the
IP address to the MX or A record hostname in the DNS?
2) What is the appropriate way to test for, and reject, mis-matched IP
addresses and hostnames?
I feed all these messages to SpamAssassin but the rest of the headers and
body are sufficiently varied that it doesn't catch this situation.
TIA,
Rich
happening during the SMTP exchange when a remote client wants to have a sent
message accepted by my MTA for internal delivery. Your patient explanation is
appreciated.
It is almost always a contrived hostname with the real IP address that
accompany the spam that continue to get through to my in-box. This is what
I've been trying to reject correctly; I still don't "get it."
On page 59 of Ralf and Patrick's "The Book of Postfix" I read,
"Client
"The client is the machine sending mail; Postfix will either log hostname
and IP, or "unknown" (if the hostname cannot be determined using DNS
lookups). Postfix gets the client's IP address from the kernel's TCP/IP
stack, and gets name from DNS or /etc/hosts before SMTP communication takes
place. This allows Postfix to impose restrictions if the client's IP address
and the hostname during SMTP communication don't match."
I thought that the restrictions I added to /etc/postfix/main.cf would catch
these mis-matched IP addresses and hostnames. They're not. So, I added a
header_check,
/^Received: .*unknown \[/ reject Rule H9
but was advised that this is quite risky and can result in rejections of
legitimate mail.
The two questions I would like answered are:
1) Under what circumstances would legitimate mail not reverse resolve the
IP address to the MX or A record hostname in the DNS?
2) What is the appropriate way to test for, and reject, mis-matched IP
addresses and hostnames?
I feed all these messages to SpamAssassin but the rest of the headers and
body are sufficiently varied that it doesn't catch this situation.
TIA,
Rich
--
Dr. Richard B. Shepard, President | Author of "Quantifying Environmental
Applied Ecosystem Services, Inc. (TM) | Impact Assessments Using Fuzzy Logic"
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
Dr. Richard B. Shepard, President | Author of "Quantifying Environmental
Applied Ecosystem Services, Inc. (TM) | Impact Assessments Using Fuzzy Logic"
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863