On Wed, Mar 29, 2006 at 11:51:14AM +1100, Jeff Waugh wrote:
> <quote who="David">
>
> > What I would prefer to do is send a flagging email to both myself and my
> > business partner... just a subject line such as: "email waiting in foo
> > acount".
> >
> > Can procmail do that?
>
> So what you'd want to do in procmail is a two step process:
>
> - clone the message (c on the : line)
> - use formail to replace/prepend the subject (use |)
>
> - clone the message if the previous stanza matched (c and e from memory)
> - mail it to both accounts (use !)
>
> Because you cloned the message in both stanzas, the email will be processed
> by them, but also ultimately delivered to the account.
>
> Shouldn't take much reading of the procmail/procmailex manpages to figure
> out how those fit together. :-)
perhaps to you... to mere mortals I'm afraid life isn't that simple :(
I've looked very hard at the procmail docs, but it just made me cross-eyed and
very confused. I've tried this:
$formail -A "To: [EMAIL PROTECTED]" -A "Subject: You Have Email" < /dev/null |
sendmail -t
which works from the command line, but it doesn't seem to work when piped in
procmailrc
At the moment I have this:
:0
{
:0 c
! [EMAIL PROTECTED] #make a simple copy for me
:0 c
| mail [EMAIL PROTECTED] -s "You Have Email!" < /dev/null
}
and that seems to do the job OK.
I found this procmail site which was a big help:
http://laku19.adsl.netsonic.fi/~era/procmail/quickref.html
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html