You are here: Foswiki>HomeInfra Web>Mail (29 Jun 2017, AdminUser)Edit Attach

Scalable mail cluster

This is one way to build a scalable mail infrastructure. Besides GlusterFS, the performance is pretty good.

"Business Case" for this setup:
  • Postfix, because it is written by a Dutchman and it supports the Proxy Protocol. Proxy protocol will preserve the original IP address and forward that to the back-end. The original IP address is needed for DNS-based blacklisting of spammers.
  • HAProxy, because it supports/invented the Proxy Protocol
  • GlusterFS, because it is a cool way to experiment with a clustered file-system and easy to setup
  • Lighttpd, because it is not Apache
  • Dovecot, OpenLDAP and Bind are just de facto standard applications

digraph {

label="Scalable Mail Cluster";

modem [label="NAT"; shape="rect"];

internet -> modem; modem -> revproxy; modem -> imap;

subgraph cluster_1 { label="load balancer"; style="bold"; color="brown"; revproxy [label="HAProxy"; shape="box3d"]; } revproxy -> smtp0; revproxy -> smtp1;

subgraph cluster_025 { label="SMTP"; style="bold"; color="brown"; smtp0 [label="Postfix"; shape="box3d"]; spamd0 [label="spamd"]; smtp0 -> spamd0; spamd0 -> smtp0; }

subgraph cluster_125 { label="SMTP n"; style="bold,dashed"; color="brown"; smtp1 [label="Postfix"; shape="box3d"; style="dashed"]; spamd1 [label="spamd", style="dashed"]; smtp1 -> spamd1 [style="dashed"]; spamd1 -> smtp1 [style="dashed"]; } smtp0 -> ldap; smtp1 -> ldap [style="dashed"];

subgraph cluster_9 { label="GlusterFS"; style="bold"; color="green"; maildir [shape="folder"]; } smtp0 -> maildir; smtp1 -> maildir; smtp0 -> dns [lhead=cluster_6]; smtp1 -> dns [lhead=cluster_6; style="dashed"]; imap -> maildir;

subgraph cluster_143 { label="IMAP"; style="bold"; color="brown"; imap [label="dovecot"; shape="box3d"]; }

subgraph cluster_53 { label="RBL / DNSBL"; style="bold"; color="brown"; dns [label="bind"; shape="box3d"]; }

subgraph cluster_89 { label="LDAP"; style="bold"; color="brown"; ldap [label="openldap"; shape="box3d"]; } imap -> ldap [lhead=cluster_8]; }
Topic revision: r9 - 29 Jun 2017, AdminUser - This page was cached on 30 Jun 2017 - 10:01.

This site is powered by FoswikiCopyright © by Eddy Vervest