Hello, I'd like to disable spamassassin check for mail coming from relay clients. Is there a way to do that with the config file /etc/qpsmtpd/plugins without modifying the plugin code ?
So far, I added the following lines to the spamassasin plugin code in the hook_data_post function : # no spam check for relay client if ( $self->qp->connection->relay_client ) { $self->log(LOGDEBUG,"No spam check from relay client"); return (OK); } So the beginning of my hook_data_post function looks like : sub hook_data_post { # check_spam my ($self, $transaction) = @_; $self->log(LOGDEBUG, "check_spam"); return (DECLINED) if $transaction->body_size > 500_000; # no spam check for relay client if ( $self->qp->connection->relay_client ) { $self->log(LOGDEBUG,"No spam check from relay client"); return (OK); } ... The code is working. But is there a more elegant way to do that ? Can you add an option to the spamassassin plugin like "disable_check_for_relay_client" ? I am using the debian relase of qpsmtpd. Thanks, Julien