Lindsay Haisley wrote:
Thus spake Markus Ewald on Mon, May 22, 2006 at 02:47:11AM CDT
I just switched my gentoo system from qmail to courier. Old qmail was
configured to reject spam at smtp time (using simscan) and I'd like to
do the same in courier. As I've found out, maildrop filters mails
*after* they've been accepted, so I'll need to use Courier::Filter for
that purpose.
Maildrop running in embedded mode can reject mail at SMTP level, too, so
messages will be rejected in the SMTP dialog. I'm not sure if this is
applicable in your case. There are some restrictions on what can be done with
maildrop in the embedded mode.
Thanks, that really helped!
I now copied /etc/maildrop to /etc/maildropfilter in ordner to run
maildrop in embedded mode. As I found out, the restrictions of embedded
mode can be lifted by creating a /etc/courier/maildroprcs directory and
including files therein instead of directly writing the filtering
instructions into /etc/courier/maildroprc.
My /etc/courier/maildroprcs/spamassassin as included my
/etc/courier/maildroprc contains only this line:
xfilter "/usr/bin/spamc -x"
spamc returns an error code if the email is identified as spam, so in my
thinking, it should terminate the filter and the email should be
rejected. Only what happens instead is that the smtp client is dismissed
(successfully!) long before spamc finishes. This is what
/var/log/mail.log says:
--------------------------------------------
May 23 09:50:26 nuclex courierd:
started,id=000949BC.4472BEC2.00006384,from=<[EMAIL PROTECTED]>,module=local,host=cygon!!1000!0!/home/cygon!!,addr=<cygon>
May 23 09:50:26 nuclex courierd: Waiting. shutdown time=none, wakeup
time=none, queuedelivering=1, inprogress=1
May 23 09:50:26 nuclex spamd[24892]: spamd: connection from localhost
[127.0.0.1] at port 54417
May 23 09:50:26 nuclex spamd[24892]: spamd: setuid to cygon succeeded
May 23 09:50:26 nuclex spamd[24892]: spamd: processing message (unknown)
for cygon:1000
May 23 09:50:28 nuclex spamd[24892]: spamd: identified spam (3.5/1.0)
for cygon:1000 in 1.4 seconds, 2191 bytes.
May 23 09:50:28 nuclex spamd[24892]: spamd: result: Y 3 -
AWL,BAD_CREDIT,CONSOLIDATE_DEBT,DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_WHOIS,DRUGS_ERECTILE,FORGED_YAHOO_RCVD,SUBJECT_DRUG_GAP_C
scantime=1.4,size=2191,user=cygon,uid=1000,required_score=1.0,rhost=localhost,raddr=127.0.0.1,rport=54417,mid=(unknown),autolearn=no
May 23 09:50:28 nuclex spamd[24887]: prefork: child states: II
May 23 09:50:28 nuclex courierlocal:
id=000949BC.4472BEC2.00006384,from=<[EMAIL PROTECTED]>,addr=<[EMAIL PROTECTED]>,size=2127,success:
Message delivered.
May 23 09:50:28 nuclex courierd: completed,id=000949BC.4472BEC2.00006384
--------------------------------------------
Documentation on this seems to be really scarce. I tried settings
DEFAULTDELIVERY="| /usr/bin/maildrop -m" to enforce embedded mode but
that only causes all incoming mails to be deferred. I'm really lost here.
-Markus-
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users