NAME

Mail::Qmail::Filter::Base::CalloutVerification – verify existance of e-mail addresses via SMTP callout

DESCRIPTION

This base class is used by filters that want to verify the existance of e-mail addresses by doing SMTP callouts:

Mail::Qmail::Filter::VerifySender

verifies the RFC5321.MailFrom address

Mail::Qmail::Filter::VerifyFrom

verifies the RFC5322.From address

The address is rejected in any of the following constellations:

  • There is no valid MX or A RR for its domain.

  • An authorititative MX can be reached and returns error code 550 when trying to send an e-mail to the address.

In any other cases (such as timeouts or other errors), we do not reject the e-mail, to avoid false positives

OPTIONAL PARAMETERS

net_dns_resolver_params

reference to a hash of parameters to pass when creating the Net::DNS::Resolver object to resolve sender domains

Default: {}

net_smtp_params

reference to a hash of parameters to pass to Net::SMTP->new when creating SMTP connections

Default: { Hello => undef, Timeout => 5 }

Special case: An undefined value for Hello causes this module to set that parameter by calling "hostfqdn()" in Net::Domain.

dump_spam_to

If the message is rejected, copy it into a file in the given directory. The file will be named <epoch_time_when_script_started>_<pid>

SEE ALSO

"COMMON PARAMETERS FOR ALL FILTERS" in Mail::Qmail::Filter

ATTRIBUTES TO BE DEFINED BY THE CHILD CLASS

address_type

String describing the type of address we want to verify, e.g. "sender" or "from", to be used in messages. The word " address" will automatically be appended.

IMPLEMENTATION NOTES

I think this should better be implemented as as role instead of a base class, but Mo does not support that, and I hesitate to upgrade to Moo just for that.

LICENSE AND COPYRIGHT

Copyright 2025 Martin Sluka.

This module is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:

http://www.perlfoundation.org/artistic_license_2_0

Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license.

If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license.

This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder.

This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 90:

Non-ASCII character seen before =encoding in '–'. Assuming UTF-8

Around line 149:

Unterminated C<...> sequence