Overview
A large number of emails end up in the inetpub\mailroot\Badmail folder, queues contain a large number of emails. Many emails end up in a failed state. External servers block your sent emails due to spam-like behavior.
Solution
Identify the cause
The Badmail folder stores messages that could not be forwarded to the recipient, even after attempts have been made a predefined number of times or that could not be returned to the senders by SMTP.
Emails in this folder are stored in ASCII format, so they can be opened with any text editor for analysis purposes. The Windows Event Log may shed some light on why these emails fail.
For example, event 4007 SMTP
with the below message indicates that your server is recognized as relaying SPAM, and the destination won't accept mails:
Message delivery to the host '<destination IP>' failed while delivering to the remote domain '<domain name>' for the following reason: An SMTP protocol error occurred.
The SMTP verb which caused the error is 'MAIL'. The response from the remote server is '421 4.7.0 [TSS04] Messages from <sender IP> temporarily deferred due to user complaints - 4.16.5'.
Please, address all the issues found with the help of our Knowledge Base and relevant external servers documentation/Knowledge Base.
Clear temporary files and old queues
Perform the steps described in the Virus and Spam Emails not Getting Detected by MailEssentials article, in order to ensure that MailEssentials is functioning optimally.
Recreate Quarantine databases
MailEssentials uses two quarantine databases, one for EmailSecurity and one for Antispam. Depending on the version installed on your environment, follow the steps in the articles below to re-create these databases:
- How to recreate the GFI MailEssentials EmailSecurity Quarantine database,
- How to recreate the GFI MailEssentials Antispam Quarantine database.
Reprocess the FailedMails folders
After clearing temporary files and recreating the quarantine databases, please reprocess the emails from the FailedMails folders, as described in the Reprocessing Emails Wrongly Moved to the FailedMails Folder article.
Testing
After following the above steps, MailEssentials should be in optimal condition. If the issue persists, contact GFI MailEssentials Support.