On Sat, 2002-04-06 at 04:54, José Romildo Malaquias wrote:
> 
> I am happy using fetchmail to fetch my mail messages from my ISP provider
> POP3 server. When received in my local mail box, these messages passes
> through procmail, which put them in defferent mail folders according
> to some criteria I have established in the procmail recipe file.
> 
> Now I need to fetch mail messages also from a new server (my university).
> These mail should not be classified by my procmail recipe as are the
> ones from the ISP provider. Instead they should go directly to a
> specific mail folder.

You might notice, if you read your message headers, that the end mail
server always ends up in one of the "Received" headers.  You can set up
procmail to filter base on those headers:
Received: from hostname (ipaddr)
  by your.mail.server with SMTP; 10 Jan 1999 23:10:04 -0000

Given the mail server "your.mail.server", you could tell procmail to
match lines like the above in your first rule, and put those in a
"specific mail folder".

Your alternative is to modify the messages, adding a header of your own
to filter on.  The following might be more aesthetically pleasing:

# Configuration created Sat Apr  6 09:05:07 2002 by fetchmailconf
set logfile "/home/romildo/.fetchmail.log"
set postmaster "romildo"
set bouncemail
set no spambounce
set properties ""
set daemon 10  # Every ten seconds... isn't that a little much?

defaults
        fetchall, forcecr, no keep;

poll pop.uber.com.br:
        user 'romildo' there with password 'jrm3760' is 'romildo' here,
        mda "formail -a 'X-Source: pop.uber.com.br' | procmail";

poll my.university:
        user 'romildo' there with password 'password' is 'romildo' here,
        mda "formail -a 'X-Source: my.university' | procmail ";



Given such a config file, procmail could filter messages based on the
X-Source header.



Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to