[Mimedefang] md_check_against_smtp_server and md_graphdefang_log

Tilman Schmidt t.schmidt at phoenixsoftware.de
Sat Mar 23 05:13:52 EDT 2013


Am 23.03.2013 01:43, schrieb James Curtis:

>     # yea, I know that the DNSBL is more effecient in sendmail, but I want to know how many blocked for what user by blacklist.
> if ($result = (relay_is_blacklisted($RelayAddr, "zen.spamhaus.org"))) {
>         md_graphdefang_log('spamhaus', $hits, $RelayAddr);
>         return action_bounce("reject: mail from ($RelayHostname || $RelayAddr) rejected due to http://www.spamhaus.org/zen");
>     # the reject works, but graphdefang log shows the Subject instead of Relay address

That's strange. Please show an example log entry.

> sub filter_recipient
>        {
>            my($recip, $sender, $ip, $host, $first, $helo, $rcpt_mailer, $rcpt_host, $rcpt_addr) = @_;
>            md_check_against_smtp_server($sender, $recip, "<filter serverexternal DNS name>", "<internal private address>");
>         md_graphdefang_log('notuser', $recip, $sender);
>     # graphdefang log doesn't log entry as 'notuser', eventually logs it as spam, or mail_in depending on score because of code that follows.
>         return action_discard();
>        }

This cannot work. You call md_check_against_smtp_server but never
check the result. md_graphdefang_log and action_discard are called
unconditionally. If this code was what your MIMEdefang actually
runs, all messages would be logged with 'notuser' and discarded.
So there must be something else wrong.

Perhaps your MIMEdefang is not using the filter script you think
it does. Perhaps filter_recipient is redefined later. Perhaps it's
a simple copy/paste error or your sanitizing.

HTH
T.

-- 
Tilman Schmidt
Phoenix Software GmbH
Bonn, Germany

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <https://lists.mimedefang.org/pipermail/mimedefang_lists.mimedefang.org/attachments/20130323/5cb7f2a3/attachment.sig>


More information about the MIMEDefang mailing list