SpamAssassin timeout and cannot delete temp emails. - ORF Forums

SpamAssassin timeout and cannot delete temp emails. RSS Back to forum


I have SpamAssassin configured as an external agent. For the most part, it works just fine. Occasionally, SA chokes on a particular email. I get two notification emails from ORF every hour or two. One email says, "Timeout waiting for External Agent "SpamAssassin" to finish". A second email says, "Could not delete email file [path to temp eml]".

A new copy of the same problem email is created in the temp folder each time this happens. If I don't delete them manually, the number keeps growing.

The SA timeout is already set to 300 seconds.

The folder for temporary emails is excluded from Windows Defender scans and monitoring.

Looking at the eml files in the temp folder, I see that the emails so far have not been spam. I'd like to just have SA skip them and have ORF send them on. What is the best, supported way to do that?

by aeleus 3 months ago

@aeleus: Hello aeleus,

The EML files in the External Agent test's "temp" folder are just copies of the incoming emails that ORF could not delete, not quarantined or blocked emails, so they don't need to be resent. Feel free to delete them, or schedule a task to clean the folder, say once a week. That being said, I will bring this incident to the attention of our developers to see if they could add an automated/periodic "clean up" feature to the External Agent test to avoid situations like this.

As for the timeout value set for the SA agent, I strongly suggest you reduce it to 15-60 seconds. Especially if you operate a high-traffic mail server. If SA becomes unresponsive and ORF has to hold each incoming email in memory for 300 seconds waiting for SA to respond, this could cause service issues if ORF runs out of available memory. Not to mention that the sending server might simply give up waiting for your server's response.

I suggest you check the SA logs to see if you can find out why the filter is hanging and change its settings if necessary.

by Daniel Novak (Vamsoft) 3 months ago
(in reply to this post)


@Daniel Novak (Vamsoft): Thanks for the quick response, Daniel.

That's good to know that the eml's are just copies.

ORF has been creating temp emails and sending notifications (about every two hours) about a single problem email for over 24 hours now. When (or how) does it finally give up?

by aeleus 3 months ago
(in reply to this post)


@aeleus: If you have configured ORF to notify you about errors, you will receive an email whenever an event with an "Error" severity gets logged. (ORF Administration Tool: System > Log > Email Notifications > Configure)

by Daniel Novak (Vamsoft) 3 months ago
(in reply to this post)

New comment

Fill in the form below to add a new comment. All fields are required. If you are a registered user on our site, please sign in first.

It will not be published.
hnp1 | hnp2