2016-05-19 06:51:20 -05:00
<!DOCTYPE html>
2015-05-11 21:12:51 -05:00
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" / >
2015-07-07 08:09:17 -05:00
< title > Process more emails concurrently< / title >
2015-07-31 23:14:52 -05:00
< link rel = "stylesheet" type = "text/css" href = "./css/markdown.css" / >
2015-05-11 21:12:51 -05:00
< / head >
< body >
< div id = "navigation" >
2017-11-16 21:48:44 -06:00
< a href = "https://www.iredmail.org" target = "_blank" >
2016-04-19 12:48:51 -05:00
< img alt = "iRedMail web site"
src="./images/logo-iredmail.png"
style="vertical-align: middle; height: 30px;"
/>
< span > iRedMail< / span >
< / a >
2016-02-29 02:15:19 -06:00
// < a href = "./index.html" > Document Index< / a > < / div > < h1 id = "process-more-emails-concurrently" > Process more emails concurrently< / h1 >
2015-07-07 08:09:17 -05:00
< p > < strong > WARNING< / strong > : Processing more concurrent emails require more RAM.< / p >
2015-05-14 20:54:55 -05:00
< p > Amavisd-new is content filter, it invokes SpamAssassin and ClamAV for
2015-05-11 21:12:51 -05:00
spam/virus scanning, it also offers additional features like DKIM signing and
verification.< / p >
< p > In < a href = "./file.location.html#amavisd" > Amavisd config file< / a > , < code > $max_servers< / code > sets
the number of concurrent Amavisd processes and it must match the number set
in < code > /etc/postfix/master.cf< / code > < code > maxproc< / code > column for the < code > smtp-amavis< / code > service.
Sample settings:< / p >
< pre > < code > # File: /etc/amavisd/amavisd.conf
$max_servers = 4;
< / code > < / pre >
< pre > < code > # File: /etc/postfix/master.cf
smtp-amavis unix - - - - 4 smtp
...
< / code > < / pre >
< p > Both values should be identical for two reasons: If Amavisd offers more
processes than Postfix will ever use, Amavisd wastes resources. On the other
hand, if Postfix starts more dedicated transports than amavisd can handle
simultaneously, e-mail transport will be refused and logged as error.< / p >
< p > If many emails stalled in mail queue (check with command < code > postqueue -p< / code > ), and
your server has powerful CPU and memory, you can increase the number of
concurrent Amavisd processes, so that it can process more emails at the same
time. Sample setting:< / p >
< pre > < code > # File: /etc/amavisd/amavisd.conf
$max_servers = 10;
< / code > < / pre >
< p > Restarting Amavisd service is required.< / p >
< pre > < code > # File: /etc/postfix/master.cf
smtp-amavis unix - - - - 10 smtp
...
< / code > < / pre >
< p > Note: If you don't want to modify < code > /etc/postfix/master.cf< / code > , it's ok to set
< code > smtp-amavis_destination_concurrency_limit = 10< / code > in < code > /etc/postfix/main.cf< / code >
instead.< / p >
< p > Restarting Postfix service is required if you modified < code > /etc/postfix/master.cf< / code > ,
reloading OR restarting is required if you modified < code > /etc/postfix/main.cf< / code > .< / p >
< p > References:< / p >
< ul >
< li > < a href = "http://www.amavis.org" > Amavisd web site< / a > < / li >
2015-07-09 02:14:39 -05:00
< li > < a href = "http://www.ijs.si/software/amavisd/README.postfix.html#d0e1231" > Tuning: Maximum Number of Concurrent Processes< / a > < / li >
2015-05-11 21:12:51 -05:00
< li > < a href = "http://www.ijs.si/software/amavisd/README.postfix.html" > Integrating amavisd-new in Postfix< / a > < / li >
2016-05-19 06:51:20 -05:00
< / ul > < div class = "footer" >
2017-11-16 21:48:44 -06:00
< p style = "text-align: center; color: grey;" > All documents are available in < a href = "https://bitbucket.org/zhb/iredmail-docs/src" > BitBucket repository< / a > , and published under < a href = "http://creativecommons.org/licenses/by-nd/3.0/us/" target = "_blank" > Creative Commons< / a > license. You can < a href = "https://bitbucket.org/zhb/iredmail-docs/get/tip.tar.bz2" > download the latest version< / a > for offline reading. If you found something wrong, please do < a href = "https://www.iredmail.org/contact.html" > contact us< / a > to fix it.< / p >
2016-05-19 06:51:20 -05:00
< / div >
2017-11-05 02:33:58 -06:00
<!-- Global site tag (gtag.js) - Google Analytics -->
< script async src = "https://www.googletagmanager.com/gtag/js?id=UA-3293801-21" > < / script >
< script >
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
2015-05-11 21:12:51 -05:00
2017-11-05 02:33:58 -06:00
gtag('config', 'UA-3293801-21');
2015-05-11 21:12:51 -05:00
< / script >
< / body > < / html >