Michelle Konzack writes:

Hello,

sinc arround 2 hours my courier-mlm is under heavy  spam  attack.  I  do
not know how they  have  found  the  mailinglists,  because  nothing  is
public, but I have 76 autogenerated lists and had

----[ '~/.courier-foo1' ]-----------------------------------------------
|/usr/bin/couriermlm msg /home/devel.debian/.couriermlm_foo1
------------------------------------------------------------------------

----[ '~/.courier-foo1-default' ]---------------------------------------
|/usr/bin/couriermlm ctlmsg /home/devel.debian/.couriermlm_foo1
------------------------------------------------------------------------

----[ '~/.courier-foo1-owner' ------]-----------------------------------
|/usr/bin/preline /usr/bin/procmail
------------------------------------------------------------------------

tried to remove the files and put into the

----[ '~/.courier-foo1-default' ]---------------------------------------
|/usr/bin/preline /usr/bin/procmail ${HOME}/.procmailrc_foo1
------------------------------------------------------------------------

with a procmailrc of

----[ '~/.procmailrc' ]-------------------------------------------------
MAILDIR=${HOME}/Maildir
DEFAULT=${MAILDIR}/.Spam/
LOGFILE=${HOME}/log/procmail/`date +%Y-%m-%d`.log

LISTNAME=`formail -czx To: |head -n1 |sed -r 
's/(-owner|-subscribe|-unsubscribe|)@.*//' |sed 's|.*debian-||'`
LISTDOMAIN="list.foo-devel.net"

:0
* ? test -f ${HOME}/.procmail_spamfilter
{ INCLUDERC=${HOME}/.procmail_spamfilter }

:0
* ? test -f ${HOME}/.procmail_spamfilter_${LISTNAME}
{ INCLUDERC=${HOME}/.procmail_spamfilter_${LISTNAME} }

########################################################################
# Proceed the List-Message
:0
* ^(To|Cc):.*debian-${listna...@${list_domain}
|/usr/bin/couriermlm msg ${HOME}/.couriermlm_${LISTNAME}

########################################################################
# Catch the Owner-Message before Controll-Messages
:0
* ^(To|Cc):.*debian-${listname}-ow...@${list_domain}
.${LISTNAME}-owner/

########################################################################
# Proceed the Control-Messages
:0
* ^(To|Cc):.*debian-${listname}...@${list_domain}
|/usr/bin/couriermlm ctlmsg ${HOME}/.couriermlm_${LISTNAME}
------------------------------------------------------------------------

which should solf the problem with currently over 220 config  files  and
where I can setup some individual spam and virus checking stuff  in  the

    INCLUDERC=${HOME}/.procmail_spamfilter_${LISTNAME}

but it seems, there is something missing because the "couriermlm"  stuff
does not (more) work.

Any hints?

couriermlm reads environment variables set by Courier in order to process the message appropriate. If couriermlm is invoked by procmail, it must inherit the unmodified environment, identical as to what procmail inherited from Courier.

For one thing, Courier sets DEFAULT to the local extension address. Your procmail recipe sets a variable named DEFAULT. I do not recall if procmail exports its own environment to child processes, or restores the original environment.

In any case, it's cleaner to leave "couriermlm msg" and "couriermlm ctlmsg" in the .courier file, as they were, but prepend a directive to invoke procmail beforehand. If procmail terminates with an error code, Courier will drop or bounce the message, then stops processing. If procmail exits with a zero exit code, Courier continues processing .courier, and then invokes couriermlm next.


Attachment: pgpD5x2XASpEF.pgp
Description: PGP signature

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to