I am attempting to set up a procmailrc file, and there are two
problems I have not been able to resolve. I am using procmail as
a mail delivery agent called by fetchmail. The purpose is to
fetch mail over POP3 from a single ISP mail account, then deliver
it to one or more accounts on my local Linux machine based on the
To: and Subject: lines.
The first problem is I have not found a way to set up a list of
recipes such that each recipe has an independent chance to
deliver mail to its related account, yet have one final recipe
that gets run only if _none_ of the earlier ones was successful.
If procmail sees several names in the To: or Subject: lines, I
want the message to be delivered to everyone whose names are
found. However, if it can't deliver to anybody, I want it to
deliver it to me.
The second problem is procmail insists on modifying the 'From '
line, no matter what command line switches I have tried. All
'From ' lines say the message came from the account that ran
fetchmail and procmail. I'd like to have the 'From ' lines be
left alone, or at most update the timestamp.
Any suggestions?
(I'm not sure I'm going to be successful in getting subscribed to
this list, so I would humbly request you reply directory to me as
well as to the list.)
Thanks.
Robert Riches
richesr1(_at_)inetarena(_dot_)com
Here is my present fetchmailrc, with some fields modified to
protect the guilty:
set syslog
set postmaster "me"
set nobouncemail
set properties ""
set daemon 300
set logfile /home/incomail/fetchmail.log
poll mail.ispdomain.com with proto POP3
user "ispaccnt" there with password "isppassword"
is incomail here and wants mda "/usr/bin/procmail"
Here is my present procmailrc file:
# This is the .procmailrc file for the incoming mail
# go-between, account "incomail".
:0 c
$HOME/archive
:0
{
:0 c
* (^(TO|Subject):.*(fred|fredrika))
! fred
:0 c
* (^(TO|Subject):.*joe)
! joe
:0 c
* (^(TO|Subject):.*(sam|samuel))
! sam
:0 c
#
# Don't do the test. Let this be a catch-all.
#
# * (^(TO|Subject):.*me)
! me
}
# all should have been caught above, so don't do it again
#
:0
/dev/null
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail