Skip to main content

I run a heavy duty Mailserver. Any tips on tuning gnarwl?

Posted in

Several:

  • Strip down your configfile. Comments and empty lines are waste, as well as config directives specifying default values.
  • Set the loglevel low, once your setup works.
  • Creating new blockfiles takes gnarwl a considerable amount of IO resources. You might want to pre-create them using damnit.
  • Make sure, to index all the attributes from the querystring in your LDAP database. Otherwise lookups may by very slow. Use anonymous binding and don't set the protocol to autodetect. Keep your entire database in RAM if possible.
  • Compile gnarwl with a smaller line input buffer (--with-maxline=NUMBER). The default is set very high (2.1kb), to make sure, no lines are truncated. Unless someone sends mail using a really broken MUA, 256 bytes should still do the trick.
  • Try to avoid retrieving email addresses from "To:" and "Cc:" headers (even though it is the default), as these headers may contain more than one entry. This results in a number of useless and/or redundant database queries.