procmail
[Top] [All Lists]

Re: "Newbie Q's": 'extraneous locking' in log? - putting return char in log

2004-05-02 12:50:10
On 01 May 2004, at 22:38, Jim Witte wrote:
1) How can I insert a newline/CR character at the end of each logfile entry? I tried the LOG="\n" at the end, but that doesn't work (just addes '\n' - is the control character different?"

NL="
"
LOG="This is a line$NL"

2) I'm getting a lot of 'extraneous locallockfile ignored' warnings in the log file. I assume this has something to do with the fact that I have the :0 inside the rule 'consequent' (is there a standard term?) - this is how I saw it done in another example, and it doesn't seem to work right without it there. Could the missing \| on the first line of the "watchsun-porn rule" be the cause? That's corrected now, but I wonder if it causes it to see the following lines as one big folder name, and then it doesn't know what to do with the other :0 that's in the consequent?

extraneous lockfile ignored means you have

:0:

On a recipe that does not deliver mail to a mbox.

3) I've gotten a lot of 'drug spam' that will have subject lines such as 'V . I . C . O . D . I . N' or similar. The number of spaces varies after each period (as does the drug name). Is there a nice RegExp that I can use to catch all variations, other than the rather unwieldy-looking expression V( )*\.I( )*\.C( )*.( )*\.O [...] Better yet, us there a perl script (or regex) I could run to catch all these variants for multiple dug-names - ie. I could say *catchname('VICONDIN')|\ catchname('XANEX') [...] as the rule?

SpamAssassin is best suited for catching spam. Doing in only in procmail is possible, but take a huge time investment on your part.

:0 H

You should not use the H flag due to a bug in procmail. It's teh default anyway.

* procmail

??

:0
List-Id:.*<procmail.lists.RWTH-Aachen.DE>
{
  LOG="Procmail -$NL"
  :0
  $DEFAULT
}

etc..

:0
* meds|\
Xanex|\
Vicondin|\
X A N E X|\
V I C O D I N|\
Ever since I was a teenager|\
knew somethng was wrong with me|\
manhood

where are you planning on looking for these phrases?

:0
* B ?? (meds|xanex|vicodin|etc)
{
   LOG="Trapped Meds$NL"

   :0:
   possible-med-spam
}

{ LOG="Trapped meds - "
 :0
 /dev/null}

Do not put anything in /dev/null until you are 100% positive it will never trap a mail you want.


This is an extraneous lockfile
:0:
* watchsun                      # |\


--
sometimes ascii is the best use of bandwidth... Tonya Engst



_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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