Morning, folks

In case you receive a lot of mail, you must have wondered: "How the hell
can Denis cope with all these mailing lists?" 
(The reall question is "How can Chmouel do it?" since he gets much more
mail than I do - his answer is "use gnews". )

Well, I do not use gnews, I use pine, which is tricky on its own, but
today I would like to present you one tool which does wonder
irrespecteably on the mail-program which you use: PROCMAIL 

* PROCMAIL is a program that fetches your incoming mail, proccesses it
acording to the rules you set-up in .procmailrc and generally makes your
life much easier. 
* DOCUMENTATION: For details on procmail, see following man
pages: procmail, procmailrc and procmailex. There are also some extremely
usefull web pages on procmail, for instance:  http://www.procmail.org/jari/pm-tips.html
Generally, procmail can do wonders, but it is also good at sorting your
incoming mail according to any rules you can think of.

Here are some excepts from my .procmailrc:
Lines begining with "#" are comments.

[DENIS]

# Sort incoming Mandrake mailing lists in their folders
:0:
* Precedence: list
* X-Loop:.*\/\<[a-z\-]+\@linux\-mandrake.com
{
  LIST = $MATCH
  :0:
  * LIST ?? ()\/[a-z\-]+
  {
    LIST = $MATCH
    :0 c:
    * LIST ?? fun
    * BH ?? \<(sound)\< 
    ! [EMAIL PROTECTED]         
    :0:
        mail/Mandrake/$LIST             
   }
}

# autoreply
:0 Whc: autoreply.lock
 * !^FROM_DAEMON
 * !^X-Loop: [EMAIL PROTECTED]
  | formail -rD 32768 vacation.cache
  :0 ehc         # if the name was not in the cache
    | (formail -rA"Precedence: junk" \
        -A"X-Loop: [EMAIL PROTECTED]" ; \
        cat ~/.plan \
                  ) | $SENDMAIL -oi -t

# Long messages (>100000 bytes) go to their folder. 
# Sender gets a autoreply message.
# I have been using this when I had modem connection 
# at home and ethernet at the university, to avoid downloading 
# huge messages at home.  

:0 :
 * >100000
 * !^FROM_DAEMON
 * !^X-Loop: [EMAIL PROTECTED]
 * !portmap
{
  :0 c
    | (formail -rA"Precedence: junk" \
        -A"X-Loop: [EMAIL PROTECTED]" ; \
        cat ~/.procmail-long ; \
                 ) | $SENDMAIL -oi -t
  :0
        mail/long-letters
}

# carbon copy all the short messages (BODY<160 letters) to my handy!
# it works by making a score 160, than -1 for each letter. (score>0) means
# "do it" (not used at the moment either, I do not have a handy...)
:0 Bh:
* 160^0 
* -1^1 .
{
  :0 c
    | (formail -I "Subject: 3922" -I "To: [EMAIL PROTECTED]" \
       -I "From: [EMAIL PROTECTED]" )| $SENDMAIL -oi [EMAIL PROTECTED]
}

[SYMPA]
# messages with no-no words bounce back, with a warning message 
:O EHBhb:
 * BH ?? unsubscribe
 * !^From:.*mandrakesoft\.com
   | (/usr/bin/formail -r -k ; cat ~/WARNING)\
      | $SENDMAIL -oi -t
# messages which have more than 100 kb bounce too.
:O HBbh:
 * >102400
   | (/usr/bin/formail -r -k; \
      echo "\nwe accept only messages shorter than 100kb!\n")\
         | $SENDMAIL -oi -t

Hey list.

:~>I have been thinking about, if it is possible to sort/split the list in
:~>some way. Reason:
:~>My mother-language is not english, so it is rather time-consuming for me
:~>to read-trough all the mails in this list - and there are many, with the
:~>result, that I am forced to run fast trough the mails, only reading the
:~>subject - and if not of interest - delete. But - sometimes it happens
:~>that I havent been on the net for a couple of days, resulting in more
:~>than 100 mails waiting - I then often deletes to many, and thats is
:~>anoying when you finds out that a number in the tread is missing.
:~>I would suggest som main groups like 'networking' 'mailprograms'
:~>'multimedia' 'the Mandrake 7.1 - issue'
:~>Just a proposal
:~>Mogens Jęger
:~>

-- 
-----------------------------------------------------
Dr. Denis Havlik                <http://www.ap.univie.ac.at/users/havlik>
Mandrakesoft            |||     e-mail: [EMAIL PROTECTED]
Quality Assurance      (@ @)    (private: [EMAIL PROTECTED])    
-------------------oOO--(_)--OOo---------------------
Newbies aren't necessarily stupid nor uninformed, just lacking in
experience with this specific OS. ([EMAIL PROTECTED])


Reply via email to