[Mimedefang] $RelayHostname not matching sendmail's Received header?

Michael Sims michaels at crye-leike.com
Thu Nov 30 15:51:35 EST 2006


I'm trying to implement some new relay checks in my filter and I'm noticing some
unexpected (to me) behavior regarding $RelayHostname.  (I searched the archives but
didn't see any reference to this, apologies if it has been asked before.)

I have a message delivered by a relay whose hostname sendmail was able to determine
(according to the Received header):

Received: from adsl86-34-215-137.romtelecom.net (adsl86-34-215-137.romtelecom.net
[86.34.215.137] (may be forged)) by <my relay running MIMEDefang> ...

However, inside my mimedefang-filter, the value of $RelayHostname was not
"adsl86-34-215-137.romtelecom.net" as I expected, but rather it was
"[86.34.215.137]", seemingly indicating that MIMEDefang was not able to determine
the relay's hostname.

I tried to dive into the source to determine if MIMEDefang gets this info from
sendmail, or if it tries to do the lookup itself, but it wasn't obvious to me.

Can anyone think of a scenario where this might happen?  My check is being called
from within filter_end, so I don't believe I should have to explicitly call
read_commands_file, should I?  Are there situations where MIMEDefang issues a second
DNS check for this info (which might fail)?  Any help is appreciated...

(running MIMEDefang 2.56 if that is relevant...)

Michael Sims




More information about the MIMEDefang mailing list