[Mimedefang] Re: Quick Mods question
Jeremy Mates
jmates at sial.org
Fri Dec 26 17:06:26 EST 2003
* Ben Kamen <bkamen at benjammin.net>
> in 'filter begin' - is it valid for me to place the following...
> ---------------------------------------------------------------------------
> if (@Recipents eq 'someuser at mydomain.com' & $Subject eq 'message delivery failure') {
Until Perl6[1], eq will not work on an array, and & is bitwise, not the &&
logcial. I would use 'and' instead of &&, and check the subject before
iterating through the recipients.
if ($Subject eq 'message delivery failure' and
grep { $_ eq 'someuser at mydomain.com' } @Recipents) {
The rest of the code looks fine.
[1] or use Quantum::Superpositions in the meantime:
use Quantum::Superpositions;
if ($Subject eq 'message delivery failure' and
any(@Recipients) eq 'someuser at mydomain.com') {
More information about the MIMEDefang
mailing list