procmail
[Top] [All Lists]

Re: more ideas for distribution list reqd please

2004-03-30 23:39:06
Hey Sean, I have put this into practice but I found the following:

If I have various rc.file in my .procmailrc file:

INCLUDERC=$PMDIR/rc.file1
INCLUDERC=$PMDIR/rc.file2
INCLUDERC=$PMDIR/rc.file3
INCLUDERC=$PMDIR/rc.file4
INCLUDERC=$PMDIR/rc.file5

File number 3 and 4 are the rc.files in which I have specified your example
below:

*^From:.*(\
        *domain1.com|\
        *domain2.co.uk|\
        *domain3.ac.uk|\
MAIL/

The other rc.files (1,2 and 5) I have specified a few of the usual
statements:

*^From:.* 
or
*^TO_*

etc etc. I find that procmail bypasses rc.file 3 & 4 and deposits the mail
into the "generic" mailbox located "at the end" of rc.file5 which is the
last one.

How can I get procmail to DEFFINATELY query rc.file3 & 4 before it finds
its way to the very bottom. This is the very nature of my complaint. thx
 



On 15:32:33 March 30, 2004 PSE-L(_at_)mail(_dot_)professional(_dot_)org 
(Professional
Software Engineering) wrote:
At 22:39 2004-03-30 -0700, JM Fraser wrote:
I posted this sometime before but it has not worked. I am looking
for a way to specify a single rc.file which would contain a list of
names which would be referenced, in full, before procmail deposits
the mail into a maildir.
For example:

:0
*^From:(_dot_)*mail(_at_)domain1(_dot_)com
and
*^From:(_dot_)*mail(_at_)domain2(_dot_)com
and
*^From:(_dot_)*mail(_at_)domain3(_dot_)com
Mailbox/

I was advised to use the "and" quotes as this would force procmail
to visit each line before depositing the mail. Well this does not
work.
Forthwith, ignore whomever directed you to use the "and" clause -
there's no such thing in procmail.

By convention, multiple conditions lines ARE anded.  Which means
*ALL* of them need to match.  This is rather unlikely what you want
(there really should be only ONE address in the From: field).
Instead, you want OR.  OR can be done like so:

:0
*^From:.*(mail(_at_)domain1(_dot_)com|mail(_at_)domain2(_dot_)com|mail(_at_)domain3(_dot_)com)
Mailbox/

Or, using line continuations, which would place each address on a
separate line:

:0
*^From:.*(\
         mail(_at_)domain1(_dot_)com|\
         mail(_at_)domain2(_dot_)com|\
         mail(_at_)domain3(_dot_)com)
Mailbox/


Or, you could use scoring, but that might complicate matters for you.

PS: Also, where could I specify a global .procmailrc file where I
could add various rc.files for all users?

/etc/procmailrc

Depending upon your OS arrangement, it might be:

/usr/local/etc/procmailrc

It'd be a REALLY good idea to THOROUGHLY debug your recipes before
subjecting all users to them.

---
  Sean B. Straw / Professional Software Engineering

  Procmail disclaimer: <http://www.professional.org/procmail/disclaime
r.html>
  Please DO NOT carbon me on list replies.  I'll get my copy from the
list.

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





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