[wplug] Procmail/Fetchmail and multible accounts

Gentgeen gentgeen at linuxmail.org
Sat Dec 17 10:33:29 EST 2005


Dear List,

I have 3 email accounts that I need to see.  (I have changes the email
names to keep them off the achieves.)
  
  * My own personal            == gentgeen at linuxmail.org
  * My shared one with my wife == kevin_val at comcast.net
  * My daughter's one          == daughter at comcast.net

Putting aside the communist comments about reading her mail -- she is 7
and she knows I have full access to ANYTHING on our network since 
everything goes though my computer first.  (I love that fact that I can
kill the kids network with "eth1 down" and I can keep working) :-)

Right now I use fetchmail to hand out "copies" of the email. I am
thinking there has to be a better way.  Right now, fetchmail hits
kevin_val at comcast.net twice and then hits daughter at comcast.net three
times.  Seems like a lot of extra network traffic that I should be able
to eliminate, but can't seem to figure out how.

As you can see, I am using Procmail, and I think that will be where
I do the magic, but I just can't make heads or tails of the docs, nor
can I find an example of what I need that I can get working.  Any help
or pointers will be greatly appreciated.




My Fetchmail config (if it matters):
------------------------------------------------------------
set postmaster "kevin"
set syslog
set invisible
set daemon 300

########################################
# This is Kevin's Linuxmail account
######################################## 
poll imap.linuxmail.org with proto POP3
       user 'gentgeen at linuxmail.org' there 
       with password 'PASSWORD' 
       is 'kevin' here 
       options fetchall
       mda '/usr/bin/procmail -d kevin'

########################################
# This is the Comcast main account
########################################
poll mail.comcast.net with proto POP3
        # Drops Comcast mail into Kevin's account
        user 'kevin_val at comcast.net' there with password 'PASSWORD'
        is 'kevin' here keep
        mda '/usr/bin/procmail -d kevin'       

        # Drops Comcast mail into Val's account
        user 'kevin_val at comcast.net' there with password 'PASSWORD'
        is 'val' here fetchall
        mda '/usr/bin/procmail -d val'

########################################
# This is Daughter's Comcast account
########################################
poll mail.comcast.net with proto POP3
        # Drops a copy of Daughter's mail into Kevin's account
        user 'daughter at comcast.net' there with password 'PASSWORD'
        is 'kevin' here keep
        mda '/usr/bin/procmail -d kevin' 

        # Drops a copy of Daughter's mail into Val's account
        user 'daughter at comcast.net' there with password 'PASSWORD'
        is 'val' here keep
        mda '/usr/bin/procmail -d val'       

        # Drops Daughter's mail into Daughter's account
        user 'daughter at comcast.net' there with password 'PASSWORD'
        is 'DAUGHTER' here 
        mda '/usr/bin/procmail -d DAUGHTER'


My Procmail config (with extra comments removed):
---------------------------------------------------------
PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:.
MAILDIR=$HOME/Mail      # You'd better make sure it exists

LOGFILE=$MAILDIR/from
LOCKFILE=$HOME/.lockmail

:0f
| formail -A "Time-Received: `date`"

# Next set of lines for ClamAssassin - http://drivel.com/clamassassin/
:0fw
| /usr/local/bin/clamassassin

# Only messages smaller than 250 kB are processed by SpamAssassin.
:0fw
* < 256000
| /usr/bin/spamc

# If the message was actually skipped, we want to know
:0Ef
| formail -A "X-Spam-Skipped:  Yes =Message not tested by SpamAssassin="

# Work around procmail bug
:0
* ^^rom[ ]
{
  LOG="*** Dropped F off From_ header! Fixing up. "

  :0 fhw
  | sed -e '1s/^/F/'
}  
   
:0f
| formail -A "Time-Delivered: `date`"

----------------------------------------------------------------




-- 
*****************************************************************
 Associate yourself with men of good quality if you esteem    
 your own reputation; for 'tis better to be alone then in bad 
 company.        - George Washington, Rules of Civility


More information about the wplug mailing list