Hi there,

On Tue, 21 Oct 2014, Nathan F wrote:

I have a mimedefang filter that discards all messages with
"relayaddr ne 127.0.0.1".

I think you mean that's what you want it to do, but it doesn't. :)

I am finding that some (a very small number) of mails are somehow
being sent out.

Ah, yes. :)

These mails are coming from an external system originally, but they
don't seem to hit mimedefang's filter.  Any ideas?

Intrument the code.

pseudo-code:

filter_end {
 if($RelayAddr ne '127.0.0.1') {
   do processing;
   discard;
 }
}

pseudo-patch:

filter_end {
  LOG_SOMETHING_USEFUL
  if($RelayAddr ne '127.0.0.1') {
    LOG_SOMETHING_USEFUL
    do processing;
    discard;
  }
  LOG_SOMETHING_USEFUL
}

server log entry:

Oct 20 10:16:09 inbound sendmail[12981]: s9K1G8oB012981: from=<a@b>,
size=32820, class=0, nrcpts=1, msgid=<z@z>, proto=ESMTP, daemon=MTA,
relay=ip-10-0-4-5 [10.0.4.5]
Oct 20 10:31:21 inbound sendmail[6491]: s9K1G8oB012981: to=<d@e>,
delay=00:15:12, xdelay=00:00:00, mailer=esmtp, pri=242820,
relay=abc.com., dsn=5.3.5, stat=Local configuration error
Oct 20 10:31:21 inbound sendmail[6491]: s9K1G8oB012981:
s9K1VGlK006491: DSN: Local configuration error
Oct 20 10:31:22 inbound sendmail[6491]: s9K1G8oB012981:
s9K1VGlL006491: postmaster notify: Local configuration error

I see nothing there that's useful except the error message.

Ignoring the fact that this is failing with an error ...

Don't do that.

... the important thing is ...

To find out what's going on.  I suspect your filter code isn't being
called at all in the cases where it fails to do what you want.  I like
to see this sort of thing in my logs:

Oct 21 17:01:14 mail5 mimedefang.pl[14765]: s9LG09SX004394: MDLOG,\
s9LG09SX004394,*=*=*=*=* filter_end(): \
processing message from IP [198.148.79.53],,,<clamav-devel-bounces@...

73,
Ged.
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to