How can I optimize the performance of Amavis for processing large volumes of email?

Optimize the Number of Amavis Processes

How fast Amavis can process email is directly tied to Max servers option under Warden -> Settings -> Filter Settings. More information:

https://www.danami.com/clients/knowledgebase/139/How-can-I-speed-up-how-fast-Amavis-processes-email.html

Enable a Local Caching DNS Resolver

You can speed up DNS queries used by Amavis by enabling a local caching DNS resolver. More information:

https://www.danami.com/clients/knowledgebase/187/How-can-I-setup-a-local-caching-DNS-resolver-to-speed-up-DNS-queries-used-by-Amavis.html

Enable the Redis Storage Engine

For very high volume servers we recommend switching from the default MySQL storage back end used for anti-spam Bayes learning to the Redis back end. More information:

https://www.danami.com/clients/knowledgebase/188/How-can-I-configure-the-anti-spam-learning-in-Warden-to-use-Redis-for-storing-bayes-data-.html

Enable the plugin

This plugin will compile the SpamAssassin rules into native-code in order to provide significant speedups in rule evaluation. More information:

https://www.danami.com/clients/knowledgebase/190/How-can-I-enable-the-Rule2XSBody-plugin-to-speed-up-anti-spam-rules-by-compiling-them-into-native-code.html

Enable the Shortcircuit plugin

This plugin can stop processing rules once a specific rule is matched. Shortcircuiting a test will force all other pending rules to be skipped, if that test is hit (saving on CPU usage). More information:

https://www.danami.com/clients/knowledgebase/281/How-can-I-use-the-Shortcircuit-plugin-to-reduce-CPU-load.html

Whitelist Specific Senders

If you have certain senders that are sending out large amounts of email (newsletters) then you can exclude them from anti-spam scanning under Warden -> Settings -> Policy Banks. More information:

https://www.danami.com/clients/knowledgebase/124/What-are-Amavis-policy-banks-and-how-are-they-used-in-Warden.html

Optimize MySQL/MariaDB

Optimizing MySQL is outside the scope of this article but we recommend that administrators optimize MySQL/MariaDB using the Plesk Performance Booster found under Tools and Settings -> General Settings -> Performance Booster. More information:

https://www.danami.com/clients/knowledgebase/258/How-can-I-optimize-MySQLorMariaDB-for-Warden-using-the-Plesk-Performance-Booster-tool-.html

Disable the TxRep plugin (optional)

If your server processes a lot of email and your MySQL/MariaDB is overloaded you may want to disable the TxRep plugin as it will add about 10 additional DB queries per email (Amavis will still perform well with it disabled). You can disable it under Warden -> Settings -> Plugin Settings -> uncheck the TxRep checkbox and press the update button to apply the changes.

Disable the Real-time Learning in Warden (optional)

Servers with a lot of mailboxes may want to disable the real-time sieve learning in Warden as this will cut down on CPU usage during peak periods. Warden will then fall back to nightly learning during off hours. More information:

https://www.danami.com/clients/knowledgebase/126/How-can-I-disable-the-real-time-learning-in-Warden.html

Viewing the Processing Time

To view how long a message took to be processed by Amavis go to Warden -> Logs -> Message log and click on the plus icon next to an entry. The processing time will be listed at the end on the message (in milliseconds).

  • optimize, performance
  • 0 Los Usuarios han Encontrado Esto Útil
¿Fue útil la respuesta?

Artículos Relacionados

How can I change the interface language of the extension?

You can change the interface language under Settings -> Application Settings -> Locale...

How can I disable admin email notifications in Amavis?

Amavis has different default options for controlling where virus, spam, banned file attachments,...

How can I whitelist or blacklist a mail server from greylisting?

To Whitelist a Mail Server From Greylisting Navigate to Warden -> Settings ->...

How can I enable third party anti-virus signatures within Warden to improve the ClamAV detection rate?

Warden supports enabling third party anti-virus signatures to improve the detection rate. These...

How can I setup a local caching DNS resolver to speed up DNS queries used by Amavis?

Run the following command to check if local DNS caching is enabled: host -tTXT...