Hello,<br><br>I&#39;m building a new specialized mail server using twisted.mail and wanted to get some feedback from the twisted community.<br><br>Some background:<br><br>The goal of the mail server is to answer and categorize all our bounces.&nbsp; This includes bounces from our outbound mail servers that never make it to a remote server or queue timeouts (i call these conversational bounces) and bounces via the return-path (non-conversational bounces) that made it to the remote mailserver but get bounced after remote mailserver acceptance.
<br><br>If you are familiar with non-conversational bounces you&#39;ll know that you are not guaranteed to get a bounce email in a standard format.&nbsp; It all depends on the foreign mailserver software and policies.<br><br>To handle the variations in bounce messages, I&#39;m going to make a bounce server that is configurable via addition of new rules similar to the ipchains.&nbsp; Each rule is a regex and the rules will look similar to the Mailman bounce code regex&#39;s.&nbsp; These rules are stored in a db with a whole test system written around the rules to protect against bad rule entry and fallback points to previous rule sets.&nbsp; For the purposes of the server, the idea is to start at the top of the rule chain and work your way down.&nbsp; So really, I&#39;m just talking about a bunch of regex&#39;s w/processing if a regex is hit or a final action if the none of the regex&#39;s are hit.&nbsp; &nbsp;
<br><br>I&#39;ve already built a specialized twisted mail server with a db lookup on incoming mail that handles some of our other email (roughly 7-10K emails per day) so I&#39;m pretty familiar with the way twisted.mail works.&nbsp; Where I need some help is in the area of higher-volume matters.&nbsp; I anticipate this mailserver could get between 40-80K emails per day.&nbsp; ( I work for a Email Service Provider, our bounce percentage rates are low ). &nbsp;
<br><br>My questions are as follows:<br><br>1) I&#39;ve used qmail in the past.&nbsp; If you are familiar with qmail, you configure a locals number which tells you the number of concurrent emails qmail can process locally.&nbsp; This is different from the number of smtp connections ( I&#39;m not so much worried about that ).&nbsp; qmail just forks a new process up to the locals number and queues up other mail.
<br><br>in eomRecieved what is the best manner to safeguard that I don&#39;t knock over the server by processing 100 emails in short succession with the regex&#39;s?<br><br>2) Are there any examples of a high volume email server that somewhat follows my processing requirements? I&#39;ve googled around and not found any examples.&nbsp; It feels like I should be looking for a queue implementation within a 
twisted.mail server.&nbsp; I&#39;ve looked at some of the Queue classes within the twisted.mail code and I wanted to know if this is the right direction?<br><br>3) If you have experience using twisted.mail have you had any problems with this volume of mail with some sort of minor/major processing on each incoming mail.&nbsp; If you&#39;ve just saved to disk have you had problems with a load of say 200-300K emails per day?
<br><br>I appreciate any help or comments. <br><br>thanks<br><br>-rob<br><br>