procmail
[Top] [All Lists]

Re: Recent GIF Spam Recipe

2006-11-18 07:48:16
CT Guy schreef:


Please indent your recipes by a few spaces. It will make them stand out
better and they will be mangled less by bad e-mail client quoting
mechanisms.


  Folder: (/usr/bin/formail -rtb -IPrecedence: junk -IFrom:
EOSgrad.co     1317
/bin/sh: (/usr/bin/formail: No such file or directory

You need to use the 'fhw' flags for filtering.


# $Id: .procmailrc.anti-gifspam 2006-Nov-10 10:55 $

  SHELLMETAS                    #  unset, for better error messages
  SHELL       = '/bin/sh'

  LINEBUF     = 4096
  LOGABSTRACT = 'all'
  MAILDIR     = '/home/usernamehere/mail/domain.com/zzztestdrop-r'

    MAILDIR     = "$HOME/mail/domain.com/zzztestdrop-r"

  DEFAULT     = 'new'

I assume the 'new' is an existing directory. If so, then make that:

   DEFAULT     = "/"
or
   DEFAULT     = "$MAILDIR/"

for proper maildir-type delivery.


  SENDMAIL    = '/usr/sbin/sendmail'
  FORMAIL     = '/usr/bin/formail'

# disable next line to get procmail's logging on stderr
  LOGFILE     = "$_.log"

  LOG         = '~'

  GIFBOX        = '.suspect'   #  IMAP-oriented, see delivery
  CERTAINLYSPAM = '.certainly-spam/new'

If you mean maildir-type delivery, then make that:

    CERTAINLYSPAM = '.certainly-spam/'

  AUTORESPOND   = '.autorespond'

???


#------------------------------------------------------------
[...]
#------------------------------------------------------------
#  dump all blacklisted to addresses
#------------------------------------------------------------

:0
* ? [ -s $HOME/.procmailrecipes/testdrop/testdrop-blacklist.txt ]
* ? fgrep -iqf $HOME/.procmailrecipes/testdrop/testdrop-blacklist.txt
$CERTAINLYSPAM

#------------------------------------------------------------
#  catch gifspam
#------------------------------------------------------------


http://www.xs4all.nl/~rvtol/procmail/.procmailrc.anti-gifspam

(I added jpg/png checks)

#------------------------------------------------------------
#
#
:0 Hh

Change those flags. There is never need for a "H"-flag, it is the
default.
For a filtering recipe I normally use "f hw".


 * ^TOsally(_at_)testdrop(_dot_)teamhendricks(_dot_)com

I guess you want ^TO_ there. Also escape the dots. Maybe add a \>.

   * ^TO_sally(_at_)testdrop\(_dot_)teamhendricks\(_dot_)com\>


 * !^FROM_DAEMON
 * !^X-Loop: sally(_at_)testdrop(_dot_)teamhendricks(_dot_)com

Escape the dots.

  | ($FORMAIL -rtb -I"Precedence: junk" \
     -I"From: xxx.com Autoresponder
<sally(_at_)testdrop(_dot_)teamhendricks(_dot_)com>" \
     -A"X-Loop: sally(_at_)testdrop(_dot_)teamhendricks(_dot_)com"; \
     cat $HOME/.procmailrecipes/testdrop/AUTOmembership.txt \
     ) | $SENDMAIL -oi -t
$AUTORESPOND

That last line should go, you can have only one action. Or change it to
something like

  :0Ac:
  $AUTORESPOND

to deliver a copy


:0:
* ^TO_(_dot_)troubleform(_at_)xxx\(_dot_)com
$DEFAULT

Escape the first dot too. Or remove it if troubleform(_at_)xxx(_dot_)com is the
full addres. Maybe change ^TO_ to ^TO if it is not the full address.

If DEFAULT ends in a slash, then this is maildir-type delivery, so
remove the lock-flag.


:0:
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*
.almost-certainly-spam/new

Remove the lock-flag and use proper maildir delivery to ".foldername/",
so remove the "new".
(Again, that only applies if maildir-type delivery was meant.)


:0 A:
$DEFAULT

The A is for "and", but the message was already delivered, so this
recipe is never executed. Just remove it, spill over to $DEFAULT is the
default.


-- 
Groet, Ruud


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>