Hi all,
Using the dnsbl plugin I'm looking for a possibility to whitelist a
given EMail-Adress to avoid that a message from that sender is denied
when the sender uses a smtp-host which is listed in a blocklist
(unfortunately the smtp hosts for orange.fr are tagged as spam sending
hosts, that makes it nearly impossible to get mails from France as
Orange is one of the biggest ISPs there).
I've added the address in question to whitelistsenders for the
whitelist_soft plugin , that works fine on hook connect, but the mails
are still denied in hook rcpt by the dnsbl plugin.
As far as I understand the code the dnsbl plugin takes care of hosts
whitelisted by the whitelist_soft plugin, but not the sender.
Would it work if I add the following:
my $whitelist = $connection->notes('whitelisthost');
+ my $whitelist_sender = $transaction->notes('whitelistsender');
if ( $note ) {
if ( $rcpt->user =~ /^(?:postmaster|abuse|mailer-daemon|root)$/i ) {
$self->log(LOGWARN, "Don't blacklist special account: ".$rcpt->user);
}
elsif ( $whitelist ) {
$self->log(LOGWARN, "Whitelist overrode blacklist: $whitelist");
+ elsif ( $whitelist_sender ) {
+ $self->log(LOGWARN, "Whitelist-Sender overrode blacklist:
$whitelist_sender");
}
elsif ( $connection->relay_client() ) {
$self->log(LOGWARN, "Don't blacklist relay/auth clients");
}
else {
return ($self->{_dnsbl}->{DENY}, $note);
}
Having not really programming skills I would like to know if at least
that would do what I want or if there is perhaps another way to do it ?
Christian