Global Email Deletion Settings Possible?

Is it possible to create global email server settings related to automatic deletion of content in Spam Mail Folders and Deleted Mail folders? I very much appreciate the ability to do this at the Virtual domain level, but global setting for all virtual domain email users would be even better!

Status: 
Active

Comments

Welshman's picture
Submitted by Welshman on Sat, 04/22/2017 - 11:58

Think you can do this in the usermin settings.

There's no UI for this, but you could do it using the command-line API and a shell loop.

For example, a script like :

for dom in `virtualmin list-domains --with-feature mail --name-only`; do
  virtualmin modify-spam --domain $dom --spamclear-days 30
done