Hi, luckydog xf wrote on 30.03.2019 12:05:
1. How to setup high availability for postfix and dovect? Does common method like HAproxy or Nginx proxy apply them? I'm quite familiar with HAproxy, keepalived and Nginx, but I'm not sure whether they're applicable to postfix and dovecot or not. 2. Can I separate postfix and dovecot, running on two servers? Just share Mailbox folder using NFS or storage? I think it's doable, right?
The answer depends on you HW architecture, budget and SLA for high availability. Dovecot has a director module which itself can form a sort of cluster (called 'ring') connected to a muliple backend servers that optionally share maildir from one or multiple NFS servers. You can do HA for directors using simple load balanicing+availability check. On lower end I'd better do this on a router/load balancer/any other dumb cheap device.
Postfix does not have any native clustering abilities but one can do just trivial balancing based on IP address (as with Dovecot directors for SMTP service available for your users.
Most MTAs will be happy enough with multiple MXs listed with same or different priority in your DNS records, but one can also do load balancing there.
I'd separate Dovecot directors from backends but will do Postfix with Dovecot director on a single OS.
3. Anyway to store email attachment only once? i.e. someone sends an email with an attachment, and this email could be forwarded to another recipients. Anyway to store it only once?
No way. Attachment is a part of a message body. Deduplication on storage system or OS level may help here. Setting up file sharing/groupware service may help better.
-- Andrew Evdokimov