Re: Learning procmail



On Sat, 2006-04-29 at 17:41 -0500, Justin Willmert wrote:

This is a section of my ~/.procmailrc file:

# Filter Fedora List Messages
:0
* ^TO_fedora-list@xxxxxxxxxx
.INBOX.fedora-list/

First line is a comment. The second gives parameter information to
procmail (look in procmail's man page to see the different options
available. I mostly only ever use :0 though). The next line is the rule
and says if a mail header begins with a "TO" type header (To, cc, bcc,
etc.) with fedora-list@xxxxxxxxxx in the list of addresses, that this
rule matches (is true). Then the next line is which mail folder it
should move it to. In this instance, my Dovecot server separates folders
with a period, so an Inbox subdirectory is INBOX.fedora-list. The
trailing slash signals that I'm using mail folders and not mail boxes.

I'm not a procmail expert, so if I've gotten any explanation wrong, I'd
be happy if someone corrected me, but I just know that this works to
sort my mail.

This is what I use:

PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin
MAILDIR=$HOME/Maildir/
DEFAULT=$MAILDIR
LOGFILE=$HOME/.procmail_log

at the top of the procmailrc

:0:
* ^List-Id.*fedora-list.redhat.com
.Fedora\ User\ List/

for the Fedora List.
I use

* ^List-Id.*fedora-list.redhat.com

because that will only appear in the header of messages from the list.
If someone replies to me a CCs the list - their CC to me won't have that
header, so it doesn't get caught by the filter - allowing me to see it
in my regular inbox - but the copy that went to the list still gets
filtered to the list mail directory.

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list



Relevant Pages

  • Re: [SLE] Procmail + postfix
    ... > procmail all the exe, bat, pif ... ... I prefer to just reject those messages using header checks ... in postfix, but that's just me. ... filter in postfix rather than as a global procmail rule. ...
    (SuSE)
  • Re: procmail filters not working
    ... Thing I want to filter on ... Note that procmail regular expressions do have a few minor syntax differences from other programs that support regular expressions so you might have to fiddle a bit with the expressions to get them to work properly in procmail. ... Because of that your first example above will only match a subject header line and must contain the string you gave, while the 2nd example will match any header line containing that string anywhere in the line. ...
    (comp.mail.misc)
  • Re: AIG
    ... Xray has been gone so long his filter timed out;-) ... OVR:0E04 WARNING: Header 'Griffith*' is unobtainable (can't be ...
    (sci.electronics.design)
  • Re: Learning Perl
    ... } header is the header I see most commonly morphed. ... No one is actually bound to conforming to anyone's killfile or filter. ... tossing around the "troll" label much to easily. ...
    (comp.lang.perl.misc)
  • Re: [Dialog] Option to retrieve bodies of new posts does not work reliably
    ... I enabled the option "Retrieve bodies for all new posts". ... Yet the first pass (download headers) had the filter flag the "Bruce ... Try changing the filter so From uses Header too, and adjust From, e.g. ...
    (news.software.readers)