Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
We don't bite newbies here... much
 
PerlMonks  

Mail::Audit and three-arg-opens

by merlyn (Sage)
on Jun 05, 2012 at 18:25 UTC ( #974517=perlmeditation: print w/ replies, xml ) Need Help??

I was tweaking my procmailrc today. My procmailrc recognizes a number of common pattern-based spam items and logs those into logs that I rotate on a regular basis. Anything else gets fed into a Mail::Audit-based "Sortmail" script. As I was testing a minor tweak, I noticed that the logfile for Sortmail (driven by the Mail::Audit object) wasn't getting any messages.

Long story short... I had opened the Mail::Audit logfile as "-", because I wanted it to use stdout, which in my procmailrc I had directed to the proper log.

But RJBS recently changed Mail::Audit from using the two-arg open for this name to the three-arg open for this name, and this was only apparent once I had used the CPAN diff tools (only in the source, and not documented, sadly).

Yes, I had created a 30MB logfile named "-" in my home directory. After carefully removing that file, and using an explicit filename for logfile, all was good.

But this is a heads-up for anyone else who might have presumed that "-" means stdout in Mail::Audit... you might be logging somewhere odd right now. :)

-- Randal L. Schwartz, Perl hacker

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Comment on Mail::Audit and three-arg-opens
Reaped: Re: Mail::Audit and three-arg-opens
by NodeReaper (Curate) on Jun 07, 2012 at 13:25 UTC
Reaped: Re: Mail::Audit and three-arg-opens
by NodeReaper (Curate) on Jun 10, 2012 at 13:03 UTC
Reaped: Re: Mail::Audit and three-arg-opens
by NodeReaper (Curate) on Jun 12, 2012 at 12:54 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://974517]
Approved by moritz
Front-paged by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2014-04-17 02:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (437 votes), past polls