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

Re: using exim for simple mail delivery



I think what you really need is fetchmail and procmail I am afraid. But
not to worry a basic setup is not too difficult.

Fetchmail

To get your mail from a pop3 account create a .fetchmailrc in your home
directory that looks like this


defaults proto pop3
set daemon 120
poll somemailserver.bigisp.com
	user "fredsmith" has password "secret"

When you run fetchmail this will poll the pop3 account once very two
minutes and drag your mail down. To test it you can comment out the
daemon line (with a #) and run fetchmail -vv to get plenty of debuging.


Procmail

First you need a .forward file that should look like this


"|IFS=' ' && exec /usr/bin/procmail || exit 75 #fredsmith"

Now you need a .procmailrc like this:


# Procmail main config file
SHELL=/bin/sh
MAILDIR=${HOME}/Maildir
LOGFILE=${HOME}/.procmail/procmail.log
LOG="--- Logging $(LOGFILE) for $(LOGNAME), "
VERBOSE=yes
:0
* ^TO_.*debian-user@lists.debian.org
debian-user/

:0
* ^TO_.*debian-laptop@lists.debian.org
debian-laptop/

:0
* ^TO_.*wm-user@windowmaker.org
wm-user/


:0:
inbox/

This will sort you mail as it arrives into so that it goes into a
maildir type folder called inbox unless its from either the debian-user,
debian-laptop or wm-user maillists in which case it gets dropped into
the relevent folders. This is a very simple procmail setup you can spend
a lot of time playing with procmail.

Mutt

A simple Mutt setup to read the above folders would look like this:


set realname="Fred Smith"
my_hdr From: Fred Smith <fredsmith@bigisp.com>
my_hdr X-Operating-System: Debian 3.0
## Mailboxes

set move=no
set mbox_type=Maildir
set folder=~/Maildir/
set mbox=+/inbox
set spoolfile=+/inbox
set copy=yes
set record=+sent
set pager_context=5
set pager_index_lines=7
set edit_headers
set editor="vim +/^$ -c 'set tw=72'"

mailboxes !+inbox +debian-user +debian-laptop +wm-user

## Control Headers
ignore *
unignore from: date subject to cc reply-to:
unignore organization organisation
unignore user-agent: x-agent: x-mailer: x-newsreader

lists debian-user debian-laptop wm-user
subscribe debian-user debian-laptop wm-user 


That should get you going. Check the procmail and fetchmail man pages or
websites for the permisions that need to be used on their rc files. I
can never remebere them off hand.

Pat



Reply to: