procmailrc recipe

Advanced feature discussion, beta programs and unsupported "Labs" features.
3 posts Page 1 of 1
by nhdesign » Thu Oct 27, 2022 7:55 am
Good morning,

In my .procmailrc will this work to both append the email to an existing file
and also forward the email?

:0c
* ^subject:.*jacket
$HOME/trash/forwarded
! [email protected]

Thanks,
NHD
by joemuller » Fri Oct 28, 2022 3:03 pm
You'll want the following:

Code: Select all

:0h
* ^Subject:.*jacket
$HOME/trash/forwarded
! [email protected]
The above will scan the message headers, matching on a subject line ending in 'jacket'. The last two lines store a copy of the message in the mailbox file ~/trash/forwarded, then forward a copy to [email protected].

-- Joe M.
I'm a proud employee of Sonic.net! :-)
by nhdesign » Mon Oct 31, 2022 5:46 am
Does not seem to work for me,
But the following does work,


:0c
* ^subject:.*jacket.*puffy|\
{
:0c
$HOME/ztrash.procmail/forwarded
:0
! [email protected]
}
3 posts Page 1 of 1