On 2002.01.03, in [EMAIL PROTECTED],
rhad [EMAIL PROTECTED] wrote:
1) understand how exactly mutt recieves email. In my first several
attempts, I slowly gathered the impression that mutt wanted me to configure
at least sendmail and fetchmail in addition to mutt. I.e.: that mutt acts
only as a viewing agent to the standard unix mail programs. In the
successive attempts to understand sendmail and fetchmail (neither of which I
have ever used--at least knowingly) I have become slightly lost. The mutt
manual delves, IMHO, more into mutt configuration and uses, than actually
explaining how the heck to get it to recieve email.
I find it easier to think in simpler terms, just looking at definitions
and relationships. Mutt reads mail folders (it doesn't receive mail from
SMTP), and it hands off new mail to an MTA (it doesn't inject mail into
SMTP). A folder can be stored on your local filesystem, or it can be
stored on a networked mail server and read via a mail access protocol
(POP3 or IMAP) -- not the same as mail delivery!
To get new mail into your folders, you need other software. That
software can be a common unix mail delivery agent like mail.local,
procmail, deliver, maildrop, etc. Or it can be a program for downloading
mail via an access protocol, like fetchmail. (There are other favorites,
but I always forget their names.) Or it can be the delivery software
on your mail server, which feeds your POP and IMAP folders themselves.
So, to get new mail, you need at least one of three things:
1. A mail delivery agent (MDA) to pass messages from the mail
transport agent (MTA) to a folder;
2. A program like fetchmail to pull messages down from a POP3 or
IMAP server;
3. A mutt configuration that allows mutt to read messages directly
from POP and IMAP message stores.
Chances are that you already have at least one of these available, if
you've ever used a mail program on the same system as mutt is on.
2) Is there somebody out there who would not mind a potentially lengthy
email-fest to help me figure this out? I have (what I consider) to be a
rather weird setup:
I want mutt to handle three email accounts: this one, at my university, and
2 yahoo accounts. I do not live at the university, but am on DSL in the
surrounding area. Therefore, I have one dedicated outgoing mail server for
all of the accounts (swbell-DSL), and 3 pop servers for incoming mail. I
use suse linux 7.3, and I keep all my machines behind a NAT-based router
with a static IP.
My workstation has an SMTP server on which I receive most of my mail.
It uses sendmail plus procmail to deliver mail into a wide assortment
of folders in my home directory. I also have one IMAP account and seven
POP3 accounts. I check the IMAP account only occasionally, but I want
the POP3 accounts to give me mail on fairly short order. Here are some
ideas that come from my setup.
Reading from local folders
--
Normally I just run mutt with defaults:
$ mutt
Mutt starts up on my local inbox, which is where all the new mail I care
to read lands. Procmail stores some messages elsewhere, but I don't
generally worry about those until some external stimulus makes me.
When that happens, I read the other folder:
$ mutt -f =ignore
or I change to it from inside mutt by pressing c and entering
=ignore.
Direct IMAP
---
I use a relatively recent 1.3 version of mutt, so the IMAP and POP
support is a little different from 1.2.5's. My mutt setup reads mail
from my inbox ($MAIL -- /var/mail/username) by default, since most of my
incoming mail lands there. When I want to read mail from IMAP, I just
run mutt with different arguments:
$ mutt -f imap://imap.server.name/
or
$ mutt -f '{imap.server.name}'
(Actually I use it via SSL:
$ mutt -f imaps://imap.server.name/
but that doesn't matter -- I mention it only because it's great that
mutt supports it.)
POP3 via Fetchmail
--
To read my POP3 messages, I have fetchmail configured to download my POP
messages from all servers every 10 minutes. Fetchmail hands them off
to sendmail and then procmail so that they get processed by the same
procmail rules as my SMTP mail. Lines from my .fetchmailrc file look
like this:
poll pop.mail.yahoo.com protocol pop3 username USER password PASS \
smtp localhost
I have a line similar to that for each server I want fetchmail to
handle. And in my crontab, I have this:
0,10,20,30,40,50 * * * * /opt/bin/fetchmail /dev/null 21
This cron task makes my new POP mail come down every 10 minutes from any
of the seven POP3 accounts.
Direct POP3
---
In truth, I have more POP3 accounts, but I don't want these messages
saved to my workstation's disk -- I want to browse them remotely. So,
when I compiled mutt, I used the --enable-pop switch to enable POP3
browsing mode. (I also use --enable-imap, --with-krb5, and --with-ssl,
by the way.) With POP3 browsing,