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
! person@domain.com

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
! person@domain.com
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 person@domain.com.

-- 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
! someone@domain.com
}
3 posts Page 1 of 1

Who is online

In total there are 8 users online :: 0 registered, 0 hidden and 8 guests (based on users active over the past 5 minutes)
Most users ever online was 999 on Mon May 10, 2021 1:02 am

Users browsing this forum: No registered users and 8 guests