29Ekim Açık Kaynak açılış Akademik Bilişim 2012 Akademik Bilişim 2012 Uşak akgül all Alt+Ctrl+Delete altlinux Anatolya installer apache apache2 arm AtlantiS autoindex backup bağlantı banana bash bash script belediye betik bind9 boot bootloader bootparametre böl burg cache canlicdrom cdrom centos CHKUSER chrome clone clonezilla CloneZilla ile Remote Disk Clone işlemi cron crontab çöp dd denizaltı denizaltı kablo Desteği destek Dil Disk disket dizin şifreleme django djb dkim dns DNS sistemi docker Domain download drbl dvd e-posta eğitim eklenti EniXma eposta eQmail esxi ev ev almak fake fakemail feed feedbro ffmpeg find Firefox format fortran free FreeBSD freenas ftp full backup Gazze Genel Gentoo Getgnu.org gezegen git github gitweb Gmail gnupg Gökşin Akdeniz görev Görsel gpg grub grub2 günlük Güvenlik Hacker harddisk hizmet hosting id_rsa imap index indimail indir internet ipv4 ipv6 iso israil İşletim Sistemi kablo kernel kernellogo key klonlamak komut konsol koruma lampp. httpd lilo link linux liste listeci listmanager live livecd LKD loader login logo mail mail hosting Mail-in-a-Box mailcow mailman mailserver mandriva-tr.org matrax Mint mirror mlmmj modül MTA multisite mustafa akgül Müteahhit mx MySQL netinternet Netqmail network nfs nginx ngrok not.py online radyo opendkim openssl önyükleme özgür yazılım panel pano parola paste patch paylaşım pdf perl pfsense pfsense full backup phpmyadmin pi plan Planet planetplanet plesk pop3 postfix postfixadmin proje proxy putty python qmail qmailtoaster randmap Ras webserver Raspberry pi Raspberry Pi raspi rawdisk recovery remote repository resim resimler rss rsync rsyncd rsyncd etiketi s/qmail Saldırı Samba screen script sendonly smtp server senronizasyon server servis shell sistem Slackarm slackware Slackware slackware-live slackware.org.tr slackware arşiv httrack truva linux hatıralar slacky.eu smtp sosyal ağ spam spf sql backup sqlite sqlite3 sqlite3 to wordpress ssh ssh_key ssh-key SSL ssl sertifika subversion sudo sunucu svn swap swapfile syslinux system system images şifreleme takasfile Tatil Tavuk Teneke Kebabı Tenekede Tavuk theme thunderbird TightVNC tmux Tokat Kebabı tokat kebabı sobası etiketi Trash Trash-cli Truva Linux truvalinux Turkcell tuxweet Türkçe türkiye ubuntu UNIX uzak varnish veri Virtualbox vmware Vodafone vps Vsftp vsftpd Wampp web Web server web Sunucu webp webserver webserver Akıllı Tahta wget WINN Windows wordpress Wordpress wordpress multisite www xampp Xnest yansı yansılama yansılamak yapıştır yazmak Yedekleme Yemek zulüm

Postfix smtp outgoing load balancing

I got good workaround for balancing smtp outgoing from postfix mailing list archives(not using expensive real load balancer). suppose we have 4 smtp servers for outgoing email, and we need to configure/load balance like this:
                                                             +------------+
| |
+----------> smtp backend a -------->| |
| | |
clients --------> smtp lb -----> smtp backend b -------->| Intenet |
| | |
+----------> smtp backend c -------->| |
| |
+------------+


Here’s the configuration :

Postfix section


main.cf (smtp lb/load balancer)
/etc/postfix/main.cf:
relayhost = example.com

Here’s the configuration :

Dns sections.


named.conf
/etc/named.conf:

options {
directory "/var/named/data";
};

zone "example.com" in {
type master;
file "example.com";
};

example.com zone file

/var/named/data/example.com
$TTL 2D;

@ IN SOA a.ns.example.com hostmaster.example.com (
1 ; Serial
10800 ; Refresh after 3 hours
3600 ; Retry after 1 hour
604800 ; Expire after 1 week
3600 ) ; Minimum TTL of 1 hour
@ IN NS a.ns
@ IN NS b.ns
a.ns IN A 192.0.2.1
b.ns IN A 192.0.2.2

@ IN MX 0 a.mx
@ IN MX 0 b.mx
@ IN MX 0 c.mx

a.mx IN A 192.0.2.3
b.mx IN A 192.0.2.4
c.mx IN A 192.0.2.5

By default relayhost(in main.cf) will listing all available mx on example.com and randomly shuffles mx with equal preference(Postfix client makes a random selection between equal-preference MX hosts), in this case these mx are our smtp backend for balancing outgoing mail.





 

Source : postfix manual (relayhost)

Kaynak site: https://www.kutukupret.com/2009/10/03/postfix-smtp-outgoing-load-balancing/
Labels: , ,

Yorum Gönder

[blogger][facebook][disqus][spotim]

Author Name

İletişim Formu

Ad

E-posta *

Mesaj *

Blogger tarafından desteklenmektedir.