Re: my first procmail rules
Bernard Schoenacker <[email protected]> Wed, 3 Feb 2016 23:58:06 +0100
| Newsgroups | gmane.mail.procmail |
|---|---|
| Message-ID | <[email protected]> |
Le Thu, 28 Jan 2016 16:55:01 +0100, Bernard Schoenacker <[email protected]> a écrit : > hi, > > it's possible to look any recipe in my first procmailrc ? > > see the attachment > > cheers > > bernard Hello, sorry for my last post, but my English is very poor ... it would be possible to correct the procmailrc (below)? thank you for your attention best regard # ~/.procmailrc # Exemple de Fichier de configuration pour Procmail # Formation Debian GNU/Linux par Alexis de Lattre # "http://www.via.ecp.fr/~alexis/formation-linux/" # consulter # # "man procmailrc" # "man procmailex" # "man procmailsc" SHELL=/bin/sh PATH="$HOME/bin:/usr/bin:/bin:/usr/local/bin" LOGNAME=$LOGNAME ORGMAIL=$MAILDIR/$LOGNAME # MAILDIR=$HOME/mail ORGMAIL=/var/mail/$LOGNAME DEFAULT=$ORGMAIL LINEBUF=8096 VERBOSE=off COMSAT = 'no' DQ = '"' SPC = ' ' TAB = ' ' CR = ' ' NL= ' ' WS = "$SPC$TAB" # OUTLOOKTAGGING=yes LOGFILE=/var/mail/log.procmail # LOGFILE=$HOME/.procmail/logfile LOCKFILE=$DEFAULT$LOCKEXT FORMAIL=/usr/bin/formail DROPPRIVS='yes' LOGABSTRACT=all VERBOSE=no # VERBOSE=yes * !^FROM_DAEMON * !^FROM_MAILER :0 fhw | formail -I "From " -a "From " :0 bw LINES=|wc -l | tr -d " " :0 fhw |formail -a "Lines: $LINES" :0 Wh: msgid.lock | formail -D 8192 msgid.cache # :0 a /dev/null ## <----------- pas sûr que ce soit nécessaire. # duplicates :0 fhw * ^X-(Mailer|Newsreader).*Microsoft.*Outlook.*Express | formail -a "Content-Type: text/plain; charset=ISO-8859-1; \ format=flowed" | formail -a "Content-Transfer-Encoding: 8bit" :0: * ^X-Spam-Status: Yes /dev/null ##<------ violent : je mettrais ceci dans un répertoire à part :0 * ^Received:....................\ .......................................................................\ .......................................................................\ .......................................................................\ .......................................................................\ .......................................................................\ .......................................................................\ .......................................................................\ .......................................................................\ .......................................................................\ .......................................................................\ { LOG="Mgod " :0 /dev/null } :0: * ^X-Spam-Score:.*\*\*\*\*\*.* # * ^X-Spam-Score:.*\*\*\*\*\*\*\*\*\*\*.* <---- visiblement, il y a un spamassassin. Pourquoi dans ce cas ne pas utiliser # * ^Subject.* SPAM .* # en demandant au milter spamassassin de réécrire le sujet ? spam :0 * ^Subject: I am spam { EXITCODE=67 LOG="Bounced message - " :0: spam } :0: * 1^0 ^\/Subject:.*=\?(.*big5|iso-2022-jp|ISO-2022-KR|euc-kr|gb2312|ks_c_5601-1987|windows-1251|windows-1256)\? * 1^0 ^\/Content-Type:.*charset="(.*big5|iso-2022-jp|ISO-2022-KR|euc-kr|gb2312|ks_c_5601-1987|windows-1251|windows-1256) " <------- Il ne manquerait pas une commande ? :0 * ^Received: .*(\.cz |\.cn |\.it |\.jp |\.kr |\.pe |\.ro |\.ru |\.to |\ \.tw |\.za |\.broadwing\.net|prserv\.net|earthling\.net|mail\.com|\ email\.com|yahou\.com) { :0 fhw | formail -A "X-Spam-Caught-By: Received check" :0: /dev/null } :0 hw SUBJECT=|formail -xSubject: | sed -e 's/\[thing] //gi' :0 fhw | formail -i "Subject:$SUBJECT" LOCKFILE=$DEFAULT$LOCKEXT # LOG=`lockfile -ml` TRAP="lockfile -mu" :0 TCPREMOTEIP=`origip || echo 127.0.0.1` * ! ? if [ -n "$TCPREMOTEIP" ]; then rblcheck -q "$TCPREMOTEIP"; fi { EXITCODE=75 LOGABSTRACT=all LOG= " Filter: RBL-filtered address: \ $TCPREMOTEIP \ " :0 # $FILTER_FOLDER ##<----- ??? (I feel it lacks a command) } I feel it lacks a command :0 * $DEFAULT