Re: filtering email via perl?
On Tue, Jun 05, 2001 at 12:59:17PM -0500, Dave Sherohman wrote:
> On Tue, Jun 05, 2001 at 10:25:26AM -0500, will trillich wrote:
> > okay. procmail and i are getting a divorce. we just don't
> > see eye-to-eye any more.
>
> I don't know what MTA you use, but if you're on speaking terms with exim,
> it's got a pretty good set of filtering capabilities that you can just
> put into .forward. Not perl, though.
but it uses the same regex engine that perl does, and the
syntax is nice and clean, so the learning curve nearly
disappeared.
to procmail, i say: "feh!"
compare these two--
# .procmailrc
:0:
* ^From:.*@.*agf(g|inance).com
agf
:0:
* ^From:.*@.*cmcone.com
cmc
:0:
* ^From:.*kat.*@serensoft.com
snoog
:0:
* ^From:.*katrill@.*aol.com
snoog
:0:
* ^Subject:.*free-thinkers
flint-school
versus
# exim filter
if $return_path matches "agf(g|inance)\.com" then
save Mail/agf
elif $return_path ends "cmcone.com" then
save Mail/cmc
elif $return_path matches "kat.*@serensoft.com"
or $return_path matches "katrill@.*aol.com" then
save Mail/snoog
elif $h_subject: contains "free-thinkers" then
save Mail/flint-school
endif
i'm feeling much better, now.
--
DEBIAN NEWBIE TIP #16 from Will Trillich <will@serensoft.com>
:
Why are *.rpm (RED HAT PACKAGES) considered spawn of Satan?
Because the Debian package system is a lot more sophisticated
than the one Red Hat uses; lots more inter-dependency information
is built in to a *.deb package. If you bypass that with an *.rpm
file, you're taking chances with your system. Try to "apt-get
install <debian-only>" packages if possible. (Also check out the
"alien" package if you must.)
Also see http://newbieDoc.sourceForge.net/ ...
Reply to: