fetchmail-friends
[Top] [All Lists]

Re: [fetchmail]can fetchmail place mail into folder?

2004-02-20 13:21:44
Can Fetchmail just place mail into a folder instead of using the
local delivery agent?

Not as such, but a "local delivery agent" that delivers to a folder
can be written in one line of shell code in the fetchmailrc file.
For example:

  mda "( echo -n 'From %F ' ; date '+%a %b %e %R:%S %Y' ; /bin/cat ; echo '' ) 
~/Mail/InComing"

This is essentially the same as what I am currently using, but note
that, as written, it provides no locking and hence no protection
against races between delivery and a mailreader.  It also does not
handle resource-exhaustion problems (full disk).  It works well
enough for me because I run fetchmail manually and check for problems
before manually deleting the mail from the server.  I would *not*
recommend this setup for fully-automated operation.

You may need to tweak it a bit -- that "From " line is formatted as
my mailreader requires and is therefore somewhat non-standard.


<Prev in Thread] Current Thread [Next in Thread>