[plug] Procmail question

Anthony J. Breeds-Taurima tony at cantech.net.au
Mon Aug 12 14:33:50 WST 2002


On Mon, 12 Aug 2002, Trevor Phillips wrote:

> I use Procmail to filter my mail into IMAP folders server-side (using Cyrus 
> IMAP via deliver). Is it possible to combine this with rules to alter the 
> Subject line of the message?
> 
> ie; I want to not only be able to shove a matching message in a folder, but 
> also prepend FOO to the subject line...
> 
> Is this possible? (And if it is, how do I do it? ^_^)

Prolly something like:

:0
* ^From: tony at cantech.net.au
{
	:0fw
	| /usr/bin/perl -0 -pe 's/^(Subject:\s*)(.*)$/${1}FOO ${2}/s'
	
	: <insert you IMAP deliver rule here>
}

Just guessing though.

Yours Tony

   Jan 22-25 2003           Linux.Conf.AU            http://linux.conf.au/
		  The Australian Linux Technical Conference!



More information about the plug mailing list