1

I realize that this may be better suited for StackOverflow.com instead, however as I'm not much of a developer, I worry those answers may be way too developer-centric. Although, I would like some nitty-gritty details where possible and in a dumbed-down version.

I'm looking to understand what makes a mail server faster or able to handle larger queues. For example, qmail boasted about being incredibly fast, however I've recently come across commercial mail servers which dwarf qmail as far as handling number of emails (ex: queue sizes of 50,000+ are no big deal) and match it in speed. (Sorry, I don't want to name names)

What I know so far (correct me if I'm wrong):

Speed:

  • SMTP protocol can be taken advantage of in sending multiple e-mails in the same network connection saving time in setting up and tearing down socket connections. They also will group e-mails for a particular domain together and will send those over the same connection.

  • Multi-threaded deliveries

Queue sizes:

  • Breaking down messages into multiple directories (ex: /var/qmail/queue/mess/{0..20}/)
  • File system in use (I hear XFS is better at handling lots of smaller files vs huge files)
uzzi09
  • 193
  • 5

1 Answers1

1

using epoll/event based system instead of just multithreading can also make the mail server more efficient [think difference between traditional apache setup vs nginx].

if you're willing to risk the reliability of your server you might avoid fsyncing when writing to your spool directory or host it in ramdisk. if you're sane and responsible - you'll go for raid with battery backed cache.

if your mail server has non-trivial routing / policy logic - you might consider [pre]compiling it instead of interpreting the rules for each of the messages.

pQd
  • 29,981
  • 6
  • 66
  • 109