29 Sep 2013 01:21:47 UTC
- Distribution: Mail-Audit
- Module version: 2.228
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (3)
- Testers (781 / 2 / 0)
- KwaliteeBus factor: 1
- 59.23% Coverage
- License: perl_5
- Perl: v5.6.0
- Activity24 month
- Download (36.29KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version++ed by:1 non-PAUSE userRJBS Ricardo SIGNES 😄and 3 contributors
- Simon Cozens
- Meng Weng Wong
- Ricardo SIGNES
- Reverse dependencies
- CPAN Testers List
- Dependency graph
Take me over?The maintainer of this distribution is looking for someone to take over! If you're interested then please contact them via email.
Mail::Audit::KillDups - Mail::Audit plugin for duplicate suppression
use Mail::Audit qw(KillDups); $Mail::Audit::KillDups::dupfile = "/home/simon/.msgid-cache"; my $mail = Mail::Audit->new; $mail->killdups;
This is a Mail::Audit plugin which provides a method for checking and supressing duplicate messages; that is, mails with message-ids which have been previously seen.
Checks the incoming message against a file of previously seen message ids, ignores it if it's already seen, and adds it if it hasn't been.
$Mail::Audit::KillDups::dupfilecontains the name of the file used; if you don't set this, it will be .msgid-cache in the current directory. (Probably your home directory.)
The data in
$Mail::Audit::KillDups::dupfilewill be treated as a ring buffer, where the end of the buffer will be delimited by two newline characters. When the file size exceeds
$Mail::Audit::KillDups::cache_bytesbytes, the message id will be written at the beginning of the file. Old message ids in the file will be overwritten. The default cache size is 10000 bytes, which is enough space for about 200 message-ids.
The semantics are tortured; the return values are as follows:
false - not a duplicate +1 - an error occured during dupcheck -1 - message is a duplicate
Meng Weng Wong
This software is copyright (c) 2000 by Simon Cozens.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.