mail_host patch

Sven sven@dmv.com
Fri Jun 6 13:33:01 UTC 2003


Vernon Schryver wrote:
>> From: Spike Ilacqua <spike@indra.com>
>
>> ...
>> dccm currently uses the macro "{mail_host}" to get the value of
>> mail_host.  This works a lot of the time, but "{mail_host}" is
>> actually the host sendmail should send any bounces to.  If a smart
>> relay is defined ("DS" in the cf), then "{mail_host}" is always that
>> host.
>>
>> This patch instead extracts mail_host from env_From.  It simply grabs
>> everything to the right of the '@' and strips any trailing '>'.  If
>> there is no '@', mail_host is left unset.
>> ...
>
> What happens if the envelope Mail_From value is not in the form
> user@example.com or <user@example.com> ?
> I think the patch covers the <> possibility, but what about source
> routes, the % kludge, ! paths, and who knows what else?
>
> Is there some other sendmail.cf macro that contains the parsed
> sender host name?  Maybe $s ?
> Or is that how ${mail_host} gets changed from what the ops document
> says it should be?
>

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.




More information about the DCC mailing list

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