Quarantine folder

Your question

Hello,

We are integrating Clamav-milter with Stalwart. Question is there a method to add a quarantine folder to Stalwart? When setting the OnInfected option to Quarantine in the clamav-milter.conf the infected email still appears in the inbox, well at least in Bulwark. Was there ever an option Settings > MTA > Quarantined?

In order to not have the infect email appear in the inbox we would have to set the OnInfected to Reject. However, there are some use cases where we wouldn’t want to Reject the email.

Thanks for all the great work so far!

There’s no server-side quarantine store in Stalwart, and there wasn’t a Settings > MTA > Quarantined option. When a milter (or MTA hook) quarantines a message, Stalwart only adds an X-Quarantine header and then delivers the message normally, which is why clamav-milter’s OnInfected Quarantine still lands it in the inbox. OnInfected Reject is the only setting that stops delivery, at SMTP time.

To divert infected mail without rejecting it, let the milter keep tagging the message (the X-Quarantine header, or ClamAV’s own result header) and add a Sieve rule that matches that header and files the message into a Junk or custom quarantine folder with fileinto (or discards it). That gives you the “don’t reject, but keep it out of the inbox” behaviour you’re after.