Hi,
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.
My first idea was to do something like this:
FILED=no
:0 c
* (^(TO|Subject):.*(fred|fredrika))
{
FILED=yes
:0
! fred
}
[[ etc. ]]
:0
* FILED ?? no
! me
But then a simpler idea came to mind:
LASTFOLDER=NotDeliveredToAnybody
:0 c
* (^(TO|Subject):.*(fred|fredrika))
! fred
[[ etc. ]]
# If any of the above succeeded, then LASTFOLDER will be modified
# (doesn't seem to work though if you use if the above deliveries
# are blocks like:
# :0c
# * ^TO_fred
# {
# LOG="message for fred"
# :0
# ! fred
# }
#
# in which case LASTFOLDER may not be updated to reflect "! fred"
# out here)
:0
* LASTFOLDER ?? NotDeliveredToAnybody
! 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.
I should think that
mda "/usr/bin/procmail -f -"
would work... not? I've only ever used procmail from sendmail so I
don't grok its behavior when invoked directly from fetchmail...
-collin
--
Neither I nor my employer will accept any liability for any problems
or consequential loss caused by relying on this information.
Collin Park Not a statement of my employer.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail