From philarete at mindspring.com Fri Jul 20 21:50:03 2001 From: philarete at mindspring.com (Brock Sides) Date: Thu Aug 5 00:07:18 2004 Subject: [Memphis.pm] Mail::Audit Message-ID: <20010720215003.B2920@harmless.yellowsnow.org> For anyone who missed my presentation last night on Mail::Audit, or who just wanted a refresher, here's an article on perl.com about the module: I'll add a few notes of my own: (1) Sendmail is very picky about your .forward file. Neither it, nor anything in the path above it, can be group or world writable. If you're using RH, you're umask is set to 002 by default, so files you create are group writable by default. You'll get an bounce saying "Unsafe for mailing to programs". (2) Any filters need to be located in /etc/smrsh. Otherwise smrsh (the restricted shell sendmail spawns) will not execute it. (3) The pod documentation refers to a method called "put", which adds headers to messages. It's real name in the code is "put_header". Here's my example from last night: #!/usr/bin/perl -wT # Always use the -T flag when processing untrusted data, such as an # email message. See "perldoc perlsec" for details. use Mail::Audit; my $message = new Mail::Audit; if ($message->subject =~ /XXX/) { $message->reject("I don't like spam!"); } $message->accept; __END__ -- Brock Sides philarete@mindspring.com One OS to rule them all, one OS to find them, One OS to bring them all and in the darkness bind them, In the land of Redmond, where the shadows lie. ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ----------------------------------------------------------------------------