App-Qmail-DMARC
view release on metacpan or search on metacpan
lib/App/Qmail/DMARC.pm view on Meta::CPAN
package App::Qmail::DMARC;
our $VERSION = '0.61';
__END__
=head1 NAME
qmail-dmarc - verify using DMARC and queue a mail message for delivery
=head1 DESCRIPTION
qmail-dmarc is designed to be called by qmail-smtpd instead of qmail-queue
and will verify if incoming e-mail conforms to the DMARC policy of its
sender domain:
=over 4
=item 1.
If the environment variable C<RELAYCLIENT> exists, no verification is done,
and the e-mail is immediately passed to C<qmail-queue>.
=item 2.
In any other case, we check if the message contains a valid DKIM signature
matching the domain of the C<From:> header field.
If this is the case, the e-mail is passed to C<qmail-queue>.
=item 3.
If not, but the message has a C<From:> domain contained in
C</var/qmail/control/rcpthosts> and the environment variable C<DMARC_REJECT>
is set to a true value, the message is rejected with message
C<554 Valid DKIM signature required for sender domain ...>
=item 4.
If not, a SPF check is done, and a C<Received-SPF:> header field is added to
the message.
Then we check if the message is aligned with its sender's DMARC policy.
A C<DMARC-Status:> header field is added.
If the message does not align to the policy, the policy advises to reject such
messages and when the environment variable C<DMARC_REJECT> is set to a true
value, the message will be rejected with C<554 Failed DMARC test.>
=item 5.
In any other case the message is passed on to C<qmail-queue>.
=back
Diagnostic messages are written as a single line to standard error,
so you should find them in your C<qmail-smtpd>'s log.
=head1 OPTIONS
Apart from controlling the rejection of messages via the environment variable
C<DMARC_REJECT>, none.
It just works the way I need it.
If you need it to operate in any other way, please let me know.
=head1 BUGS
Please report any bugs or feature requests to
C<bug-app-qmail-dmarc at rt.cpan.org>, or through the web interface at
L<https://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-Qmail-DMARC>.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
=head1 SUPPORT
You can find documentation for this module with the perldoc command.
( run in 1.161 second using v1.01-cache-2.11-cpan-13bb782fe5a )