[wplug] procmail help
Gentgeen
gentgeen at linuxmail.org
Tue May 23 10:27:27 EDT 2006
(Cut for space -- see thread)
Seems to be working good, except for 1 tiny thing with the @comcast.net
accounts. When a mail comes in from the @comcast.net accounts, I get a
"greater than" sign that is added to the beginning of the "From
fetchmail $DATE" line. This basically messes up the header, and
produces a really messed up email. It is not happening with the
@linuxmail accounts, so I assume it is coming from the fact that we are
using formail now in there, but not sure what exactly is doing it.
I have pasted the following below, cause I can't seem to find out where
this is coming from.
(1) Header from on of the @comcast.net accounts
(2) /etc/fetchmailrc
(3) /etc/procmailrc
(4) /home/kevin/.procmailrc
As a side thought... Should/could I put the /home/kevin/.procmailrc
stuff that forwards mail to val and ariel into the /etc/procmailrc file?
-----------------------------------------------------------------
Example email:
Notice the " > " in the 7th line. This cause the 1st 6 lines to be the
"header" and the rest to be part of the email.
>From bratzfan7 at comcast.net Tue May 23 09:46:57 2006
X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on
linuxbox.localdomain
X-Spam-Level:
X-Spam-Status: No, hits=0.2 required=3.5 tests=BAYES_00,MISSING_SUBJECT,
NO_REAL_NAME autolearn=no version=3.1.1
Time-Delivered: Tue May 23 09:47:17 EDT 2006
>From fetchmail Tue May 23 09:46:57 2006
Received: from rmailcenter89.comcast.net ([204.127.197.189])
by comcast.net (rwcrmhc13) with SMTP
id <20060523133651m1300gjd1me>; Tue, 23 May 2006 13:36:51
+0000
Received: from [24.131.84.225] by rmailcenter89.comcast.net;
Tue, 23 May 2006 13:36:50 +0000
From: bratzfan7 at comcast.net
To: bratzfan7 at comcast.net
Date: Tue, 23 May 2006 13:36:50 +0000
Message-Id:
<052320061336.17318.44730FF200071083000043A62209224627C9020E00969B0E9D
0D at comcast.net>
X-Mailer: AT&T Message Center Version 1 (Apr 11 2006)
X-Authenticated-Sender: YnJhdHpmYW43QGNvbWNhc3QubmV0
X-Original-Account: bratzfan7 at comcast.net
Time-Received: Tue May 23 09:46:57 EDT 2006
X-Virus-Status: No
X-Virus-Checker-Version: clamassassin 1.2.2 with clamscan / ClamAV
0.88.2/1478/Mon
May 22 17:01:38 2006
This is a self test
-----------------------------------------------------------------
/etc/fetchmailrc:
set postmaster "kevin"
#set bouncemail
#set no spambounce
#set properties ""
set syslog
set invisible
# Polls servers every 10 minutes
set daemon 600
########################################
# This is Kevin's Linuxmail account
########################################
poll imap.linuxmail.org with proto POP3
user 'gentgeen:linuxmail.org#linuxmail.org' there
with password 'xxxxxx'
is 'kevin' here
options fetchall
mda '/usr/bin/procmail -d kevin'
########################################
# This is the Comcast main account
#
# note that mail is passed through formail,
# and that mail is not kept on the server
########################################
poll mail.comcast.net with proto POP3
# Drops Comcast mail into Kevin's account
user 'kvsquire at comcast.net' there
with password 'yyyyyy'
is 'kevin' here fetchall
mda '/usr/bin/formail -A "X-Original-Account:
kvsquire at comcast.net" | /usr/bin/procmail -d kevin'
########################################
# This is Ariel's Comcast account
#
# note that mail is passed through formail,
# and that mail is not kept on the server
########################################
#poll mail.comcast.net with proto POP3
# Drops a copy of Ariel's mail into Kevin's account
user 'bratzfan7 at comcast.net' there
with password 'zzzzzz'
is 'kevin' here fetchall
mda '/usr/bin/formail -A "X-Original-Account:
bratzfan7 at comcast.net" | /usr/bin/procmail -d kevin'
------------------------------------------------------------------
/etc/procmailrc
PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:.
LOCKFILE=$HOME/.lockmail
:0f
| formail -A "Time-Received: `date`"
# Next set of lines for ClamAssassin - http://drivel.com/clamassassin/
:0fw
| /usr/local/bin/clamassassin
# The condition line ensures that only messages smaller than 250 kB
# (250 * 1024 = 256000 bytes) are processed by SpamAssassin. Most spam
# isn't bigger than a few k and working with big messages can bring
# SpamAssassin to its knees.
: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:
# any output on stderr will cause the "F" in "From"
# to be dropped. This will re-add it.
:0
* ^^rom[ ]
{
LOG="*** Dropped F off From_ header! Fixing up. "
:0 fhw
| sed -e '1s/^/F/'
}
:0f
| formail -A "Time-Delivered: `date`"
-------------------------------------------------------------------
/home/kevin/.procmailrc
SHELL=/bin/bash
MAILDIR=$HOME/Mail
DEFAULT=$MAILDIR/inbox
LOGFILE=$HOME/Mail/procmail.log
VERBOSE=no
##########################################
# Get Spam out of the way
:0:
* ^X-Spam-Status: Yes
$MAILDIR/SPAM/.
##########################################
# Family Email account
:0:
* ^X-Original-Account:.*kvsquire at comcast.net
{
# 'c' means 'copy': this forwards a copy to
# Val and keeps processing. Without the 'c' it
# would forward the copy and stop immediately.
:0 c
! val
# This recipe will place mail into Kevin's mailbox.
:0
$MAILDIR/Other_Acct/kvsquire/.
}
###########################################
# Ariel's Email account
:0:
* ^X-Original-Account:.*bratzfan7 at comcast.net
{
# This forwards a copy to Ariel and
# keeps processing.
:0 c
! ariel
# This recipe will place mail into Kevin's mailbox.
:0
$MAILDIR/Other_Acct/kvsquire/.
}
############################################
#
# Below here are formulas for sorting @linuxmail.org mail into
# the different $MAILDIR folders for me.
# These all seem to be working just fine
############################################
--
http://gentgeen.homelinux.org
#############################################################
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