Resolving Dovecot and SpamAssassin: External Emails Not Accepted, Outside Addresses Not Sent
Introduction
Dovecot and SpamAssassin are two essential components of an email server. However, issues can arise when these two services fail to work together, such as external emails not being accepted or outside addresses not being sent. This article will provide a detailed context on this topic, covering key concepts, subtitles, and paragraphs, as well as code blocks for better understanding.
Understanding the Issue
When Dovecot and SpamAssassin encounter problems, it can lead to significant spam issues, even though the server is not an open relay. Suspecting a parameter order issue is likely the cause of the problem.
Configuring Dovecot and SpamAssassin
Dovecot Configuration
protocol lmtp {
lmtp_max_mail_size = 104857600
lmtp_max_recipients_per_transaction = 100
lmtp_max_header_size = 4096
lmtp_max_data_size = 104857600
lmtp_recipient_delimiter = space
lmtp_accept_pipe_commands = NO
}
service lmtp {
inet_listener lmtp {
port = 24
}
}
SpamAssassin Configuration
vi /etc/mail/spamassassin/local.cf
required_hits 5.0
rewrite_header Subject [SPAM] ${IF{score}{>}{5.0}{Subject}{Subject}}
Testing the Solution
Send a test email from an external address to verify that the issue has been resolved.
References
By following the steps outlined in this article, you should be able to resolve issues with Dovecot and SpamAssassin, ensuring that external emails are accepted and outside addresses can send emails. If you encounter any further problems, consider consulting additional resources or seeking professional assistance.