Re: Gathering mail from multiple POP servers
On Thu, Jan 25, 2001 at 06:52:16PM -0500, Samuel Hathaway wrote:
> Hello,
>
> I have been thinking about this for a while, and haven't really found much
> comprehensible documentation on it...
>
> I like to be able to check my mail from several locations. I also have a
> bunch of pop mail accounts. I want to have my debian box "collect" mail from
> all of those accounts and put each account's mail into a separate mail box
> in my home directory. Then, I'd like to be able to access all of these mail
> boxes (as well any others I create to store mail in) through a IMAP
> interface. I can probably figure out the IMAP part once I have the mail
> gathering set up.
>
> Could someone recommend a HOWTO or tell me how to do this? Thanks in
> advance.
you can use fetchmail to yank email from pop3 or imap
servers. here's my ~/.fetchmailrc :
# fetchmail -a -u trillich mail.speedex.net
defaults
user ispLoginName is will
password hiddn4now
server mail.speedex.net
poll mail.pinncomp.net protocol pop3
user remoteName is will
password isSekrit
fetchall
then when i "fetchmail" (or leave "fetchmail -d 300" running to
yank stuff every so often) it gets email from
<ispLoginName@mail.speedex.net> and
<remoteName@mail.pinncomp.net> ... directing them both to
<will@localhost>
but wait -- you need to have EXIM set up, first (i think).
it'll take a few weeks before you understand THAT manual! exim
listens for incoming mail connections, which is what fetchmail
forwards your 'email yanks' to. i'll let someone else step in
with a wise configuration setup there.
then with debian, exim defaults to looking for a ~/.procmailrc
file and if it exists, your email is filtered thru procmail
according to the recipes you've got there. here's a sample:
# based on settings from aclark@ghoti.org ('fish'.org')
PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin
MAILDIR=$HOME/Mail
PROCMAILDIR=$HOME/.procmail
LOGFILE=$PROCMAILDIR/procmail.log
SENDMAIL=/usr/sbin/sendmail
DEBIAN=$MAILDIR/debian
DEFAULT=$MAILDIR/inbox
#
# pinncomp and speedex mail (via fetchmail)
#
:0:
* ^TO_.*@.*\/(pinncomp|speedex)\....
$MATCH
# stow it into mbox "pinncomp.com" or "speedex.net"
#
# debian mailing lists
#
:0
* ^X-Loop: debian-.+@lists.debian.org
* ^X-Loop: debian-\/[^@]+
{ DN=`echo $MATCH | tr '[A-Z]' '[a-z]'` }
:0A:
$DEBIAN-$DN
#
# if all else fails, forward it to different local user
#
:0
!otherguy
# <otherguy@localhost> will get anything else that isn't
# routed above
there's an awful lot you can do with all these -- it's kinda
like killing a mosquito with a nuclear bomb...
"man fetchmail" has several nice examples to get you started.
also,
man exim.conf
man procmailrc
man procmailex
--
See, if you were allowed to keep the money, you wouldn't
create jobs with it. You'd throw it in the bushes or
something. But the government will spend it, thereby
creating jobs. -- Dave Barry
will@serensoft.com *** http://www.dontUthink.com/
volunteer to document your experience for next week's
newbies -- http://www.eGroups.com/messages/newbieDoc
Reply to: