HMessage-ID: $>CheckMessageID
SCheckMessageId
R .... use of $&{client_addr}
Under apparently random conditions, the value of $&{client_addr} is the null
string at this point (the very first rule in the ruleset!), resulting in the
ruleset misbehaving. I'ld be grateful if anyone has any suggestions - is this
a bug in sendmail ? If so, is there a fix?
This is sendmail 8.9.2 on solaris 2.6.1 compiled with gcc 2.8.1
Thanks
Andy Harper
Kings College London
Based on sendmail 8.8.7+
${client_addr} is not stored in queue files, so its value is lost
after connection has been terminated.
It is available in check_mail, check_rcpt and check_relay.
You may try to recover client address from $_ which is
stored in queue files.
My sendmail stores IP address of sending host in square
brackets t the end of $_
--
Andrzej (Andrew) A. Filip
home e-mail: an...@polbox.com
Below please find rule set which should
produce [in my opinion :-) ] client ip
address based on ${client_addr} and
when that fails on $_ [ident info]
usage:
R$* $: $>Get_client_addr $1
R<10.0.0.$->$* $@ ok
SGet_client_addr
# try $&{client_addr} first
R$* $: <$&{client_addr}>$1
R<$+>$* $@ <$1>$2
# try to get info from $&_ (ident info)
R<$*>$* $: <$&_>$2
R<$*[$-.$-.$-.$-]>$* $@ <$2.$3.$4.$5>$6
# no success - usually means non tcp delivery
# ( local, uucp ...)
R<$*>$* $@ <> $2
--
Andrzej (Andrew) A. Filip
home e-mail: an...@polbox.com
SGet_client_addr
# try $&{client_addr} first
R$* $: <$(dequote "" $&{client_addr} $)>$1
R<$+>$* $@ <$1>$2
# try to get info from $&_ (ident info)
R<$*>$* $: <$(dequote "" $&_ $)>$2