procmail
[Top] [All Lists]

Re: How to notify another e-mail address

2000-12-15 10:49:11
At 7:45 AM -0500 12/15/00, Nils Vogels is rumored to have typed:

If I were you, I'd do that in Perl.

   Yipe...why would you waste the resources to run a perl process when you
can do the same thing using procmail, formail, sendmail, and a pipe or two?
(Nuts...I wish "pipe" ended in "mail" so I could remain consistant...  ;)

Have a copy of all of your messages delivered to the perl script and make the
script grab the needed adresses by using regexes.

   (*sigh*) Yuck. FYI, procmail handles regexes just peachie, thanks. All he
wants is the From: header field (which will contain the sender's address and
the name, if available; if not, he wouldn't get it nor need it anyway).
Personally, I don't quite understand _why_ he wants to do something like this
(heck, why not just forward the mail from account one to account two and be
done with it; or run a cronjob to check to see if the account one mailbox
contains _any_ mail [exists and non-zero size] and alert account two that
there's mail to be picked up?), but it's easily accomplished in procmail
without wasting all the resources perl requires. (I do not dislike perl, but
I _do_ dislike using an elephant gun to shoot mosquitos.) Hum...I suppose if
he was alerting an account on a tiny-screen Internet-enabled cell phone that
he has mail in a "real" account this might almost make sense, but otherwise I
don't grok.

   As to _how_ he can accomplish this, I suggest the original requester read
through the man pages for procmail and formail, and possibly the mini-FAQ at
http://www.dcs.ed.ac.uk/home/procmail/faq/mini-faq.html ; it should become
quickly apparent how to accomplish what he wants to do.

         Charlie (who finally got his electricity back after the storm...)


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail