Re: filtering - How to?



Hi,

I'm running exim as a sendmail replacement on my Debian system. I have 
fetchmail collect the mail from my POP server and deliver it to exim. Exim 
will check for a .forward file in your home directory which can contain 
rules for sending mail to different places. Here's a snippet:

# Exim filter

logfile $home/.filter.log
logwrite "$tod_log $header_from processed"

if error_message then finish endif

if $header_to contains "inhouse@southwest.com.au"
   then save $home/mail/Work/SWIS_inhouse

elif $header_from contains @southwest.com.au
   then save $home/mail/Work/SWIS

elif $header_from contains lych
   then save $home/mail/Friends/Ben_Richards


It does the trick for me.

Andrew

At 12:33  2/01/01 -0300, Fernan Aguero wrote:
>Balseros:
>
>I would like to filter my incoming mail. Can you point me to
>tutorials/guides on how to do this? Here's my setup:
>
>mail account at a remote POP server
>I'm also using a remote SMTP server
>I do have a local email account that i barely use, and also a local SMTP
>server.
>
>my mail is at ~/mail and i have several subfolders there, like
>~/mail/personal, ~/mail/lists, ~/mail/journals, etc.
>
>I'm somewhat confused with the following part of my setup. When i set up
>Balsa for the first time i told it to look for mail in
>/var/spool/mail/fernan, which is where (i think) my local mail should
>be. I also told Balsa to read email from my remote POP server. However
>if i look into /var/spool/mail/fernan i can see the messages that i
>received from my remote server?!?!?!? Also, in ~/mail i have no inbox,
>so i suppose that balsa is using /var/spool/mail/fernan as the InBox.
>Is this setup right? Or did i make it wrong?
>
>I ask this because my first attempt at using procmail failed. I tried to
>use procmail to filter incoming messages on my local account, and thus
>put a rule on ~/.procmailrc:
>
>:0:
>* ^Subject:.*HOT
>spam.hot
>
>Am i doing something wrong with procmail? Or is it something about my
>setup?

***
Andrew Kennan
andrew.kennan@team.eftel.com
"We're going to need a bigger boat."




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]