Postfix and dovecot High avaliability

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Postfix and dovecot High avaliability

luckydog xf
Hello, list,

I'm doing research for our company's email system, user would use MUA(outlook or foxmail, and mobile phone client)  so I have a few questions.

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. 

Note: Haproxy/Nginx proxy would proxy request to one of target servers based on schedule algorithm and health status of application servers

As you know, email is critical  service and is an infrastructure for a company, but you may run into hardware fails and service is not available if you run email system in a single server.

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?

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? 

Thanks and please forgive me if I ask easy and stupid questions since I'm just a beginner.

Reply | Threaded
Open this post in threaded view
|

Re: Postfix and dovecot High avaliability

Andrew Evdokimov
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

Reply | Threaded
Open this post in threaded view
|

Re: Postfix and dovecot High avaliability

Angel L. Mateo
El 30/3/19 a las 22:42, Andrew Evdokimov escribió:
>
>> 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.
>
        dovecot has this feature, named sis. With this feature enabled, it
stores attachments in different files and the same attachment (in
different messages or mailboxes) is stored just once with hard links.

--
Angel L. Mateo Martínez
Sección de Telemática
Área de Tecnologías de la Información
y las Comunicaciones Aplicadas (ATICA)
http://www.um.es/atica
Tfo: 868889150
Fax: 868888337
Reply | Threaded
Open this post in threaded view
|

Re: Postfix and dovecot High avaliability

luckydog xf
Thank you all, guys.

On Mon, Apr 1, 2019 at 2:35 PM Ángel L. Mateo <[hidden email]> wrote:
El 30/3/19 a las 22:42, Andrew Evdokimov escribió:
>
>> 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.
>
        dovecot has this feature, named sis. With this feature enabled, it
stores attachments in different files and the same attachment (in
different messages or mailboxes) is stored just once with hard links.

--
Angel L. Mateo Martínez
Sección de Telemática
Área de Tecnologías de la Información
y las Comunicaciones Aplicadas (ATICA)
http://www.um.es/atica
Tfo: 868889150
Fax: 868888337