procmail
[Top] [All Lists]

Re: A recipe does not work for one list only

2005-04-17 09:36:40
On Sun, Apr 17, 2005 at 07:53:02PM +0430, Hossein Movahhedian wrote:

I have put a simple recipe in ~/.procmailrc which works for
all mailing lists that I am subscribed to except one of them.
The recipe is:

LISTS_DIR=/dos/f/Lists
LOG_FILE=/ext3/home/tmp/procmail.msg
:0 H
* 
^(From|CC|To)(_dot_)*farsitex-user(_at_)lists(_dot_)sourceforge(_dot_)net(_dot_)*
{
   :0 c:
   | echo "Mail received from: Ftex-user" >> $LOG_FILE

   :0:
   $LISTS_DIR/.NEW_Ftex-user
}

And the header of an email from this list is:
...
Subject: Re: [ftex-user]FarsiTeX on teTeX
From: "S.M.H. Hamidi" <hamidi(_at_)ce(_dot_)sharif(_dot_)edu>
To: farsitex-user(_at_)lists(_dot_)sourceforge(_dot_)net
...

   All the other rcipes are exactly the same as above (replacing
"farsitex-user(_at_)lists(_dot_)sourceforge(_dot_)net" with 
aaaa(_at_)bbbb(_dot_)ccc and
"Ftex-user" with "ddd".


Your describing the apparent problem with your narrative belief of
what happened is not very helpful to troubleshooting, Hossein.  We
need to see log entries.  Verbose log entries.

Basically, though your recipe has a couple of non-optimal aspects
to it, it could not be failing on the header you show.  Since you
say it does, then something is not accurate about your description
of what's there.  That's why we need the actual logs, not just
your narrative best guess as to what is happening.

As for your recipes, first of all, the H-flag is the default,
so you don't need it on your outer recipes.  There is a bug
in procmail where stating that flag there explicitly can do
unexpected things anyway.  So take the H-flag away.

Second, you don't need ".*" at the tail-end of a condition that
doesn't use the MATCH operator.  It does absolutely nothing.

Third, that's a rather kludgy, unconventional way to express
something to the log file.  Why not just use the canonical way?
Use LOGFILE, which actually means something to procmail internally,
rather than LOG_FILE, which you made up but which procmail
doesn't understand to be a log file..

  LOGFILE = /your/logfile
  NL = "
"

   :0
   * conditions
   {
        LOG = "${NL}Mail received from: Ftex-user$NL"

        :0:
        delivery_here
   }

-- 
dman

____________________________________________________________
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>