1 message in net.sourceforge.lists.courier-users[courier-users] Problem to not invoke...
FromSent OnAttachments
Daniel HeuleNov 26, 2006 10:35 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[courier-users] Problem to not invoke Filters for mails from localhostActions...
From:Daniel Heule (cour@ipwar.ch)
Date:Nov 26, 2006 10:35:16 am
List:net.sourceforge.lists.courier-users

Hello,

I want to not run (all)filters for mails which are coming over a esmtp connection from localhost.

This is for a maia mailguard setup working without the dual mta setup. Maia is now runing as a courierfilter. But i ned the option to not handle mails witch are comming from localhost (from maia quarantaine) not to be passed to maia again.

I have found this sniped in the changelog of the courier homepage:

2006-05-02 Lloyd Zusman <lj@asfast.com>

* courier/cdfilters.C: Updated version of patch that invokes Courier filters in alphabetical order, and uses 050 exit code to accept a message without running the remaining filters, which gets converted to a 250 ESMTP code.

I use courier 0.53.2 in which the above patch shuld be included.

And then i have installed the pythonfilter from gordon and modified the whitelist module to return

if sendersIP and courier.config.isRelayed(sendersIP): sys.stderr.write('whitelisted\n') # Don't filter any messages from our relay clients. return '050 Ok'

And This is the log from courier if i pass a message which should be whitelisted:

Nov 26 19:09:00 byteschmied courieresmtpd: started,ip=[192.168.0.26] Nov 26 19:09:00 byteschmied amavis[32438]: (32438-1) Courier <yy@ipwar.ch> -> <xx@ipwar.ch> Nov 26 19:09:00 byteschmied amavis[32438]: (32438-1) Checking: <yy@ipwar.ch> -> <xx@ipwar.ch> Nov 26 19:09:03 byteschmied amavis[32438]: (32438-1) Passed CLEAN, [192.168.0.26] <yy@ipwar.ch> -> <xx@ipwar.ch>, Queue-ID: 000000000002E0CA.000000004569D83C.00007F2B, Message-ID: <4569@ipwar.ch>, Hits: -4.399, 2506 ms Nov 26 19:09:03 byteschmied courierfilter: whitelisted Nov 26 19:09:03 byteschmied courierd: newmsg,id=000000000002E0CA.000000004569D83C.00007F2B: dns; [192.168.0.26] (powerstation.ipwar.ch [192.168.0.26])

In the log we see maia logged as amavis (maia is a patched amavisd-new), and we see the debug message from courierfilter. But i think the filters are called in the wrong order (not alphabetical) since i have set the socketname und filtername from maia to zamavid-maia

lrwxrwxrwx 1 root root 21 Nov 25 11:09 pythonfilter -> /usr/bin/pythonfilter lrwxrwxrwx 1 root root 27 Nov 19 20:50 zamavisd-maia -> /usr/local/bin/amavisd-maia

ls -la /var/lib/courier/allfilters total 0 drwxr-x--- 2 mail mail 136 Nov 26 19:07 . drwxr-xr-x 12 mail mail 408 Nov 26 19:08 .. srw-rw---- 1 mail mail 0 Nov 26 19:07 pythonfilter srw-rw---- 1 mail mail 0 Nov 26 19:07 zamavisd-maia

Please help me, why it's not working ?

Thank's Daniel