mail_host patch

Sven sven@dmv.com
Fri Jun 6 16:09:37 UTC 2003


Sven wrote:
> Vernon Schryver wrote:
>>> From: "Sven" <sven@dmv.com>
>>
>>> ...
>>> On a whim I tried the $s macro in dccm.c
>>>
>>>      static char mail_host_macro[] = "{mail_host}"     becomes
>>>      static char mail_host_macro[] = "s"
>>>
>>> Recompiled and installed dccm. This did not work with smart_host
>>> either - however, now instead of listing the smart host , the
>>> mail_host is blank.
>>
>> Did you also adjust the "O Milter.macros.envfrom" line in sendmail.cf
>> to add "{s}"?  That line lists all of the sendmail macros that are
>> passed to milter filters along with the the envelope Mail_From value.
>>
> Ahh .. good call!!
> I changed the dcc.m4 as follows
>
> -- define(`confMILTER_MACROS_ENVFROM',confMILTER_MACROS_ENVFROM``,
> {dcc_isspam}, {dcc_notspam}'')dnl
>
> ++  define(`confMILTER_MACROS_ENVFROM',confMILTER_MACROS_ENVFROM``, s,
> {dcc_isspam}, {dcc_notspam}'')dnl
>
> Rebuilt the sendmail.cf using the modified dcc.m4 and the new dccm
> compilation and voila!! It now records the sending mail_host
> correctly!!

Well ... not really afterall.

Examining the messages reveals that the $s macro contains the connecting
server hostname as issued by the HELO command.

Example 1:
IP: bay3-dav65.bay3.hotmail.com ::ffff:65.54.169.95
HELO: hotmail.com
env_From: <xxxxxxxxxxx@msn.com>  mail_host=hotmail.com

Example 2:
IP: mailagent0.ientrymail.com ::ffff:66.28.139.14
HELO: mailagent0.ientrymail.com
env_From: <1.13347.36333637323531.1.b@ientrymail.com>
mail_host=mailagent0.ientrymail.com

So not really what we are looking for. My understanding is that the
mail_host for example 1 should be msn.com and for example 2 should be
ientrymail.com

Back to the drawing board on this one

Sven




More information about the DCC mailing list

Contact vjs@rhyolite.com by mail or use the form.