Additional "Must Have" Software - Fetchmail/Procmail/Pine/Msmtp


The .fetchmail file contains info on the server, protocol, userID, and password. A sample file:

poll popd.ix.netcom.com proto POP3 user XXXX with password ZZZZ is zaurus here
poll popd.ix.netcom.com proto POP3 user AAAA with password BBBB is zaurus here

In this example I am picking up mail from two different IDs on Netcom (now Mindspring), and proto is followed by the protocol you are using - POP3 in this example, but it could also be IMAP or a number of others. XXXX and AAAA are the actual userIDs and ZZZZ and BBBB are the actual passwords.

Fetchmail normally delivers the messages picked up via SMTP to port 25 on localhost, but in this case it uses a Procmail as a MDA (mail delivery agent) to do this. It expects Procmail in /usr/bin. Procmail's behavior is controlled by its .procmail file. A sample file:

PATH=/bin:/usr/bin:/usr/bin
MAILDIR=$HOME/mail
LOGFILE=/mnt/card/mail/proclog
## Uncomment the below for extra info for debugging
#VERBOSE=yes
# All mail from cchmc.org goes to the cchmc mailbox
:0:
* ^FROM.*cchmc.org
cchmc
# Secrecy News newsletters go to the FAS mailbox
:0:
* ^FROM.*fas.org
FAS
# AHRMM newsletters go to the AHRMM mailbox
:0:
* ^TO.*AHRMM*
AHRMM
# All other mail goes into a mailbox called newmail
:0:
newmail

In the above, Procmail parses the mail into cchmc, FAS, AHRMM, and newmail mailboxes in the /home/zaurus/mail directory, and a log file to my SD card. Then they can be read via Pine.

Here's the ouput from running fetchmail -k -v The -k switch is to keep the e-mails on the server, the -v is for verbose output. Go to the Fetchmail manual for additional switches and information.

fetchmail: 5.9.11 querying popd.ix.netcom.com (protocol POP3) at Sat Jul 30 12:00:13 2005: poll started
fetchmail: POP3< +OK NGPopper vEL_5_9_3 at ix.netcom.com ready <8816.1122739202@onempop-velvet.atl.sa.earthlink.net>
fetchmail: POP3> CAPA
fetchmail: POP3< +OK
fetchmail: POP3< user
fetchmail: POP3< pass
fetchmail: POP3< top
fetchmail: POP3< uidl
fetchmail: POP3< .
fetchmail: POP3> USER XXXX
fetchmail: POP3< +OK
fetchmail: POP3> PASS
fetchmail: POP3< +OK XXXX has 2 messages (163034 octets).
fetchmail: POP3> STAT
fetchmail: POP3< +OK 2 163034
fetchmail: POP3> LAST
fetchmail: POP3< +OK 2
2 messages (2 seen) for XXXX at popd.ix.netcom.com (163034 octets).
fetchmail: POP3> LIST
fetchmail: POP3< +OK
fetchmail: POP3< 1 5298
fetchmail: POP3< 2 157736
fetchmail: POP3< .
skipping message XXXX@popd.ix.netcom.com:1 (5298 octets) not flushed
skipping message XXXX@popd.ix.netcom.com:2 (157736 octets) not flushed
fetchmail: POP3> RETR 2
fetchmail: POP3< +OK 163034 octets
reading message XXXX@popd.ix.netcom.com:2 of 2 (31296 octets)# not flushed
fetchmail: POP3> QUIT
fetchmail: POP3< +OK
fetchmail: 5.9.11 querying popd.ix.netcom.com (protocol POP3) at Sat Jul 30 12:00:19 2005: poll completed
fetchmail: 5.9.11 querying popd.ix.netcom.com (protocol POP3) at Sat Jul 30 12:00:19 2005: poll started
fetchmail: POP3< +OK NGPopper vEL_5_9_3 at ix.netcom.com ready <18684.1122739207@onempop-canada.atl.sa.earthlink.net>
fetchmail: POP3> CAPA
fetchmail: POP3< +OK
fetchmail: POP3< user
fetchmail: POP3< pass
fetchmail: POP3< top
fetchmail: POP3< uidl
fetchmail: POP3< .
fetchmail: POP3> USER AAAA
fetchmail: POP3< +OK
fetchmail: POP3> PASS
fetchmail: POP3< +OK AAAA has 1 messages (1850 octets).
fetchmail: POP3> STAT
fetchmail: POP3< +OK 1 1850
fetchmail: POP3> LAST
fetchmail: POP3< +OK 1
1 message (1 seen) for AAAA at popd.ix.netcom.com (1850 octets).
fetchmail: POP3> LIST
fetchmail: POP3< +OK
fetchmail: POP3< 1 1850
fetchmail: POP3< .
skipping message AAAA@popd.ix.netcom.com:1 (1850 octets) not flushed
fetchmail: POP3> QUIT
fetchmail: POP3< +OK
fetchmail: 5.9.11 querying popd.ix.netcom.com (protocol POP3) at Sat Jul 30 12:00:22 2005: poll completed
fetchmail: normal termination, status 0

Here is the Procmail output (from a different run):

procmail: [7185] Sat Jul 30 12:00:17 2005
procmail: Locking "newmail.lock"
procmail: [7185] Sat Jul 30 12:00:18 2005
procmail: Assigning "LASTFOLDER=newmail"
procmail: Opening "newmail"
procmail: Acquiring kernel-lock
procmail: [7185] Sat Jul 30 12:00:19 2005
procmail: Unlocking "newmail.lock"
procmail: Notified comsat: "zaurus@0:/home/zaurus/mail/newmail"
From zaurus Sat Jul 30 12:00:17 2005
Subject: Outpatient Surgery E-Weekly
Folder: newmail 31048

And here are Pine screen shots:











Note: For some reason I am unable to get the mail into Pine's INBOX. I also have not yet found an arm distro of Sendmail or Exim to do outbound e-mail....

Final Note: Search the threads at the OESF forums to get information on setting up and using msmtp to queue/send outbound mail. I did get it set up, but have discontinued the use of my SL-C3000 for e-mail, RSS, web, etc. functionality in favor of using my Blackberry 8700g

© SNi 07/16/06