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

Re: fetchmail questions



* Alan Chandler <alan@chandlerfamily.org.uk> spake thus:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Friday 14 December 2001 11:59 pm, Stig Brautaset wrote:
> > * Alec <alec1976nyc@yahoo.com> spake thus:
> >> Hi
> >>
> >> Is it possible to get fetchmail to dump messages from my yahoo account
> >> into, say "~/yahoo", instead of mixing it with the other mail in
> >>"/var/mail/alec".
> >
> > Not that I know of, as fetchmail delivers the mail it fetches from your
> > yahoo account to your local MTA (mail transfer agent -- in your case,
> > probably Exim) for further delivery. Exim puts your mail in
> > /var/mail/alec for collection.
> >
> 
> exim doesn't have to - its not to difficult to alter /etc/exim/exim.conf and 
> create a transport to deliver messages to a mbox called ~/yahoo or a maildir 
> called ~/yahoo.  

I know it don't, but that would be curing the symptoms, not the desease
IMHO. This is what procmail is for (and is very, very good at). 

putting these few lines in ~/.procmailrc achives what the OP wants:

MAILDIR=~/Mail
DEFAULT=misc
:0:
* ^To.*alec197nyc@yahoo\.com
yahoo

or, if he wants Maildir format:

MAILDIR=~/Mail
DEFAULT=misc/
:0
* ^To.*alec197nyc@yahoo\.com
yahoo/

> Look at the transports  -particularly "local-delivery:" and see how it uses 
> appendfile to add it to the /var/spool/mail/x{local-part} file.  You can 
> easily create your own transport to write into /home/{local-part}/yahoo - and 
> then create a director which detects the message (for instance say a special 
> user "xyz" use a "local_parts = xyz" )and chooses the right transport.
> 
> In fetchmail you would then "poll yahoo mail" [don't know the exact form for 
> doing this] and then say something like "user me there is xyz here"

Interesting approach, but I think going the procmail way will be a lot
easier, especially if one wants to start doing other filtering as well.
(I don't doubt exim can do it, but in this case I don't think it is the
right tool for the job).


Stig

-- 
brautaset.org
Registered Linux User 107343



Reply to: