[Dovecot] Mailboxes separated from IMAP server
Hello folks,
At my university we are trying to implement a distributed email backend, but I have some troubles,
The topology:
Server A: Postfix+LMTP # MTA Server B: Dovecot+LMTP # Just mailboxes Server C: Dovecot # POP3/IMAP
Right now the Server A can leave a received email to the Server B, but I don't know how to communicate Server C to the Server B to retrieve the emails.
I think that we should use IMAP protocol, but I am confused about how to connect them, I don't know if we have to use a proxy IMAP server, or another thing.
Can anyone give me an idea?
Regards,
Reymer Antonio Vargas Solano
Am 21.10.2013 21:23, schrieb Reymer Antonio Vargas Solano:
At my university we are trying to implement a distributed email backend, but I have some troubles,
The topology:
Server A: Postfix+LMTP # MTA Server B: Dovecot+LMTP # Just mailboxes Server C: Dovecot # POP3/IMAP
Right now the Server A can leave a received email to the Server B, but I don't know how to communicate Server C to the Server B to retrieve the emails.
I think that we should use IMAP protocol, but I am confused about how to connect them, I don't know if we have to use a proxy IMAP server, or another thing.
Can anyone give me an idea?
http://en.wikipedia.org/wiki/Storage_area_network http://en.wikipedia.org/wiki/Clustered_file_system
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 21.10.2013 21:30, schrieb Reindl Harald:
Am 21.10.2013 21:23, schrieb Reymer Antonio Vargas Solano:
At my university we are trying to implement a distributed email backend, but I have some troubles,
The topology:
Server A: Postfix+LMTP # MTA Server B: Dovecot+LMTP # Just mailboxes Server C: Dovecot # POP3/IMAP
Right now the Server A can leave a received email to the Server B, but I don't know how to communicate Server C to the Server B to retrieve the emails.
I think that we should use IMAP protocol, but I am confused about how to connect them, I don't know if we have to use a proxy IMAP server, or another thing.
Can anyone give me an idea?
some more ideas , but based on another server setup/layout use loadbalancer to serveral mailservers ( postfix/dovecot/amavis ) with shared storage ( gfs, nfs, ocfs2 , ceph ,drbd ) etc , shared ldap, sql auth backends etc
http://sys4.de/de/blog/2013/06/10/loadbalancing-mit-keepalived-postfix-dovec...
http://sys4.de/de/blog/2013/06/06/postfix-dovecot-ceph-cluster-storage/
sorry only german
or
http://www.kutukupret.com/2011/06/19/postfix-realtime-maildir-replication-us...
there are a lot of chances how to solve it, deeply depends how many mailboxes inkl quota you want to goal, and how much traffic is awaited, and at the end what is your budget target.
http://en.wikipedia.org/wiki/Storage_area_network http://en.wikipedia.org/wiki/Clustered_file_system
Best Regards MfG Robert Schetterer
[*] sys4 AG
http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer Aufsichtsratsvorsitzender: Florian Kirstein -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJSZYW5AAoJEP8jBObu0LlEP7sIAJ0DzkJPAjHcChgyih7JBuOw 4BasW4fxKbYcqZhkMdSdrnCMQ6HU3kFKu1IIj7fB25HKcJcZ+vDn7jvG1W+XmZgJ dqolm5vVtK3Map+xYiMrHoPSUgQQzYuL/r1C2zIsR7G4H4qOQRTCqAPCGjFBnCwD tv+i60qukBmwAtEdeTWlUct1MWMyQWuNSiVSmy12NskVFk2yunvwTmHyp0eokuhp ybxw5sEpqCXiMgHTdDAxct2oCYFPSTzBUt0ZaVxZHvyeQhU99CQSzFDcpGgnv6ck pdacW0yGzM2yEG1OjsHCC7TwQlNEcVB5Ndz6ZuMWePPtWFY+WA1ojfplT7U13mo= =FtoI -----END PGP SIGNATURE-----
Thanks about the information, don't worry about the german.
Regards,
ravs
On Mon, Oct 21, 2013 at 1:51 PM, Robert Schetterer <rs@sys4.de> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 21.10.2013 21:30, schrieb Reindl Harald:
Am 21.10.2013 21:23, schrieb Reymer Antonio Vargas Solano:
At my university we are trying to implement a distributed email backend, but I have some troubles,
The topology:
Server A: Postfix+LMTP # MTA Server B: Dovecot+LMTP # Just mailboxes Server C: Dovecot # POP3/IMAP
Right now the Server A can leave a received email to the Server B, but I don't know how to communicate Server C to the Server B to retrieve the emails.
I think that we should use IMAP protocol, but I am confused about how to connect them, I don't know if we have to use a proxy IMAP server, or another thing.
Can anyone give me an idea?
some more ideas , but based on another server setup/layout use loadbalancer to serveral mailservers ( postfix/dovecot/amavis ) with shared storage ( gfs, nfs, ocfs2 , ceph ,drbd ) etc , shared ldap, sql auth backends etc
http://sys4.de/de/blog/2013/06/10/loadbalancing-mit-keepalived-postfix-dovec...
http://sys4.de/de/blog/2013/06/06/postfix-dovecot-ceph-cluster-storage/
sorry only german
or
http://www.kutukupret.com/2011/06/19/postfix-realtime-maildir-replication-us...
there are a lot of chances how to solve it, deeply depends how many mailboxes inkl quota you want to goal, and how much traffic is awaited, and at the end what is your budget target.
http://en.wikipedia.org/wiki/Storage_area_network http://en.wikipedia.org/wiki/Clustered_file_system
Best Regards MfG Robert Schetterer
[*] sys4 AG
http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer Aufsichtsratsvorsitzender: Florian Kirstein -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJSZYW5AAoJEP8jBObu0LlEP7sIAJ0DzkJPAjHcChgyih7JBuOw 4BasW4fxKbYcqZhkMdSdrnCMQ6HU3kFKu1IIj7fB25HKcJcZ+vDn7jvG1W+XmZgJ dqolm5vVtK3Map+xYiMrHoPSUgQQzYuL/r1C2zIsR7G4H4qOQRTCqAPCGjFBnCwD tv+i60qukBmwAtEdeTWlUct1MWMyQWuNSiVSmy12NskVFk2yunvwTmHyp0eokuhp ybxw5sEpqCXiMgHTdDAxct2oCYFPSTzBUt0ZaVxZHvyeQhU99CQSzFDcpGgnv6ck pdacW0yGzM2yEG1OjsHCC7TwQlNEcVB5Ndz6ZuMWePPtWFY+WA1ojfplT7U13mo= =FtoI -----END PGP SIGNATURE-----
Am 21.10.2013 22:16, schrieb Reymer Antonio Vargas Solano:
Thanks about the information, don't worry about the german.
interesting that you answered my links about shared and clustered storage with "are you kidding me? Is not how or where to store the mailboxes"
well, remind me not try to answer your questions in the future
On Mon, Oct 21, 2013 at 1:51 PM, Robert Schetterer <rs@sys4.de> wrote:
Am 21.10.2013 21:30, schrieb Reindl Harald:
Am 21.10.2013 21:23, schrieb Reymer Antonio Vargas Solano:
At my university we are trying to implement a distributed email backend, but I have some troubles,
The topology:
Server A: Postfix+LMTP # MTA Server B: Dovecot+LMTP # Just mailboxes Server C: Dovecot # POP3/IMAP
Right now the Server A can leave a received email to the Server B, but I don't know how to communicate Server C to the Server B to retrieve the emails.
I think that we should use IMAP protocol, but I am confused about how to connect them, I don't know if we have to use a proxy IMAP server, or another thing.
Can anyone give me an idea?
some more ideas , but based on another server setup/layout use loadbalancer to serveral mailservers ( postfix/dovecot/amavis ) with shared storage ( gfs, nfs, ocfs2 , ceph ,drbd ) etc , shared ldap, sql auth backends etc
http://sys4.de/de/blog/2013/06/10/loadbalancing-mit-keepalived-postfix-dovec...
http://sys4.de/de/blog/2013/06/06/postfix-dovecot-ceph-cluster-storage/
sorry only german
or
http://www.kutukupret.com/2011/06/19/postfix-realtime-maildir-replication-us...
there are a lot of chances how to solve it, deeply depends how many mailboxes inkl quota you want to goal, and how much traffic is awaited, and at the end what is your budget target.
http://en.wikipedia.org/wiki/Storage_area_network http://en.wikipedia.org/wiki/Clustered_file_system
Are you kidding me? Is not how or where to store the mailboxes... is how to connect an imap server to another IMAP server that have mailboxes!
ravs
On Mon, Oct 21, 2013 at 1:30 PM, Reindl Harald <h.reindl@thelounge.net>wrote:
Am 21.10.2013 21:23, schrieb Reymer Antonio Vargas Solano:
At my university we are trying to implement a distributed email backend, but I have some troubles,
The topology:
Server A: Postfix+LMTP # MTA Server B: Dovecot+LMTP # Just mailboxes Server C: Dovecot # POP3/IMAP
Right now the Server A can leave a received email to the Server B, but I don't know how to communicate Server C to the Server B to retrieve the emails.
I think that we should use IMAP protocol, but I am confused about how to connect them, I don't know if we have to use a proxy IMAP server, or another thing.
Can anyone give me an idea?
http://en.wikipedia.org/wiki/Storage_area_network http://en.wikipedia.org/wiki/Clustered_file_system
no i am not kidding you
what i linked is how in professional environments typically things are done - virtually nobody would talk from one IMAP server to another one to deliver mails to the client
with clustedred and replicated filesystems you have all servers accesing the same mail storage and your DNS-record has all of the servers listed
http://en.wikipedia.org/wiki/Round-robin_DNS
so before you assume someone is kidding you google how load balancing is done in large environments, read the links others provide and if you are not on a that large environment one server would be enough
Am 21.10.2013 22:10, schrieb Reymer Antonio Vargas Solano:
Are you kidding me? Is not how or where to store the mailboxes... is how to connect an imap server to another IMAP server that have mailboxes!
On Mon, Oct 21, 2013 at 1:30 PM, Reindl Harald <h.reindl@thelounge.net <mailto:h.reindl@thelounge.net>> wrote:
Am 21.10.2013 21:23, schrieb Reymer Antonio Vargas Solano: > At my university we are trying to implement a distributed email backend, > but I have some troubles, > > The topology: > > Server A: Postfix+LMTP # MTA > Server B: Dovecot+LMTP # Just mailboxes > Server C: Dovecot # POP3/IMAP > > Right now the Server A can leave a received email to the Server B, but I > don't know how to communicate Server C to the Server B to retrieve the > emails. > > I think that we should use IMAP protocol, but I am confused about how to > connect them, I don't know if we have to use a proxy IMAP server, or > another thing. > > Can anyone give me an idea? http://en.wikipedia.org/wiki/Storage_area_network http://en.wikipedia.org/wiki/Clustered_file_system
I know how HA n LB works, is just that is not what I'm looking for for example if you have and imap server that stores the mailboxes in a LUNs of a SAN, that only store the emails received for the postfix servers, transfered by LMTP way, how you can configure another IMAP server that use POP and IMAP protocols without access the SAN just communicating with the other Dovecot server...
On Mon, Oct 21, 2013 at 2:20 PM, Reindl Harald <h.reindl@thelounge.net>wrote:
no i am not kidding you
what i linked is how in professional environments typically things are done - virtually nobody would talk from one IMAP server to another one to deliver mails to the client
with clustedred and replicated filesystems you have all servers accesing the same mail storage and your DNS-record has all of the servers listed
http://en.wikipedia.org/wiki/Round-robin_DNS
so before you assume someone is kidding you google how load balancing is done in large environments, read the links others provide and if you are not on a that large environment one server would be enough
Are you kidding me? Is not how or where to store the mailboxes... is how to connect an imap server to another IMAP server that have mailboxes!
On Mon, Oct 21, 2013 at 1:30 PM, Reindl Harald <h.reindl@thelounge.net<mailto: h.reindl@thelounge.net>> wrote:
Am 21.10.2013 21:23, schrieb Reymer Antonio Vargas Solano: > At my university we are trying to implement a distributed email
backend, > but I have some troubles, > > The topology: > > Server A: Postfix+LMTP # MTA > Server B: Dovecot+LMTP # Just mailboxes > Server C: Dovecot # POP3/IMAP > > Right now the Server A can leave a received email to the Server B, but I > don't know how to communicate Server C to the Server B to retrieve
Am 21.10.2013 22:10, schrieb Reymer Antonio Vargas Solano: the
> emails. > > I think that we should use IMAP protocol, but I am confused about
how to
> connect them, I don't know if we have to use a proxy IMAP server,
or
> another thing. > > Can anyone give me an idea? http://en.wikipedia.org/wiki/Storage_area_network http://en.wikipedia.org/wiki/Clustered_file_system
fine - so i make my answer more precise:
if it comes to that you should re-think your achitecture instead seek for workarounds which will hide the problem for some time and sonner or later make a re-design of the architecture much harder than starting to do so earlier
but your choice.....
Am 21.10.2013 22:25, schrieb Reymer Antonio Vargas Solano:
I know how HA n LB works, is just that is not what I'm looking for for example if you have and imap server that stores the mailboxes in a LUNs of a SAN, that only store the emails received for the postfix servers, transfered by LMTP way, how you can configure another IMAP server that use POP and IMAP protocols without access the SAN just communicating with the other Dovecot server...
On Mon, Oct 21, 2013 at 2:20 PM, Reindl Harald <h.reindl@thelounge.net <mailto:h.reindl@thelounge.net>> wrote:
no i am not kidding you what i linked is how in professional environments typically things are done - virtually nobody would talk from one IMAP server to another one to deliver mails to the client with clustedred and replicated filesystems you have all servers accesing the same mail storage and your DNS-record has all of the servers listed http://en.wikipedia.org/wiki/Round-robin_DNS so before you assume someone is kidding you google how load balancing is done in large environments, read the links others provide and if you are not on a that large environment one server would be enough Am 21.10.2013 22:10, schrieb Reymer Antonio Vargas Solano: > Are you kidding me? Is not how or where to store the mailboxes... is how to connect an imap server to another IMAP > server that have mailboxes! > > On Mon, Oct 21, 2013 at 1:30 PM, Reindl Harald <h.reindl@thelounge.net <mailto:h.reindl@thelounge.net> <mailto:h.reindl@thelounge.net <mailto:h.reindl@thelounge.net>>> wrote: > > > > Am 21.10.2013 21:23, schrieb Reymer Antonio Vargas Solano: > > At my university we are trying to implement a distributed email backend, > > but I have some troubles, > > > > The topology: > > > > Server A: Postfix+LMTP # MTA > > Server B: Dovecot+LMTP # Just mailboxes > > Server C: Dovecot # POP3/IMAP > > > > Right now the Server A can leave a received email to the Server B, but I > > don't know how to communicate Server C to the Server B to retrieve the > > emails. > > > > I think that we should use IMAP protocol, but I am confused about how to > > connect them, I don't know if we have to use a proxy IMAP server, or > > another thing. > > > > Can anyone give me an idea? > > http://en.wikipedia.org/wiki/Storage_area_network > http://en.wikipedia.org/wiki/Clustered_file_system
Ok, thanks for your time Reindl Harald, I'll consider your ideas!
On Mon, Oct 21, 2013 at 2:29 PM, Reindl Harald <h.reindl@thelounge.net>wrote:
fine - so i make my answer more precise:
if it comes to that you should re-think your achitecture instead seek for workarounds which will hide the problem for some time and sonner or later make a re-design of the architecture much harder than starting to do so earlier
but your choice.....
Am 21.10.2013 22:25, schrieb Reymer Antonio Vargas Solano:
I know how HA n LB works, is just that is not what I'm looking for for example if you have and imap server that stores the mailboxes in a LUNs of a SAN, that only store the emails received for the postfix servers, transfered by LMTP way, how you can configure another IMAP server that use POP and IMAP protocols without access the SAN just communicating with the other Dovecot server...
On Mon, Oct 21, 2013 at 2:20 PM, Reindl Harald <h.reindl@thelounge.net<mailto: h.reindl@thelounge.net>> wrote:
no i am not kidding you what i linked is how in professional environments typically things are done - virtually nobody would talk from one IMAP server to another one to deliver mails to the client with clustedred and replicated filesystems you have all servers accesing the same mail storage and your DNS-record has all of the servers listed http://en.wikipedia.org/wiki/Round-robin_DNS so before you assume someone is kidding you google how load balancing is done in large environments, read the links others provide and if you are not on a that large environment one server would be enough Am 21.10.2013 22:10, schrieb Reymer Antonio Vargas Solano: > Are you kidding me? Is not how or where to store the mailboxes...
is how to connect an imap server to another IMAP > server that have mailboxes! > > On Mon, Oct 21, 2013 at 1:30 PM, Reindl Harald < h.reindl@thelounge.net <mailto:h.reindl@thelounge.net> <mailto:h.reindl@thelounge.net <mailto:h.reindl@thelounge.net>>> wrote: > > > > Am 21.10.2013 21:23, schrieb Reymer Antonio Vargas Solano: > > At my university we are trying to implement a distributed email backend, > > but I have some troubles, > > > > The topology: > > > > Server A: Postfix+LMTP # MTA > > Server B: Dovecot+LMTP # Just mailboxes > > Server C: Dovecot # POP3/IMAP > > > > Right now the Server A can leave a received email to the Server B, but I > > don't know how to communicate Server C to the Server B to retrieve the > > emails. > > > > I think that we should use IMAP protocol, but I am confused about how to > > connect them, I don't know if we have to use a proxy IMAP server, or > > another thing. > > > > Can anyone give me an idea? > > http://en.wikipedia.org/wiki/Storage_area_network > http://en.wikipedia.org/wiki/Clustered_file_system
On 2013-10-21 4:25 PM, Reymer Antonio Vargas Solano <reymervargas@gmail.com> wrote:
I know how HA n LB works, is just that is not what I'm looking for for example if you have and imap server that stores the mailboxes in a LUNs of a SAN, that only store the emails received for the postfix servers, transfered by LMTP way, how you can configure another IMAP server that use POP and IMAP protocols without access the SAN just communicating with the other Dovecot server...
In that case you may be interested in the dovecot proy feature:
http://wiki2.dovecot.org/HowTo/ImapProxy
--
Best regards,
*/Charles/*
On 2013-10-21 3:23 PM, Reymer Antonio Vargas Solano <reymervargas@gmail.com> wrote:
At my university we are trying to implement a distributed email backend, but I have some troubles,
The topology:
Server A: Postfix+LMTP # MTA Server B: Dovecot+LMTP # Just mailboxes Server C: Dovecot # POP3/IMAP
Right now the Server A can leave a received email to the Server B, but I don't know how to communicate Server C to the Server B to retrieve the emails.
I think that we should use IMAP protocol, but I am confused about how to connect them, I don't know if we have to use a proxy IMAP server, or another thing.
It all depends on what you want to accomplish...
First, I'm guessing your subject is not precisely correct - the IMAP server IS 'the mailboxes'...
So, I guess you meant separate MTA and IMAP servers?
If so, then...
a) you could set up dsync to sync server C with B
b) you could do the same with imapsync (best to use dsync though, unless you're stuck with dovecot versions prior to 2.2.# due to brain-dead distro limitations or corporate policies)
c) you could use some kind of distributed filesystem
Why the 2 dovecot servers? If it is for load, how many users on each (maybe you don't need 2)? If for redundancy, then definitely dsync, but there are other issues to consider (if HA is your goal)...
--
Best regards,
*/Charles /*
Sorry about the subject! Thanks for your time I'll try to implement dsync..
I pretend to use 2 dovecot servers because one of them just have the LMTP protocol and the other one have the load of the connections that uses protocols IMAP and POP
Regards,
ravs ravs
On Mon, Oct 21, 2013 at 1:48 PM, Charles Marcus <CMarcus@media-brokers.com>wrote:
On 2013-10-21 3:23 PM, Reymer Antonio Vargas Solano < reymervargas@gmail.com> wrote:
At my university we are trying to implement a distributed email backend, but I have some troubles,
The topology:
Server A: Postfix+LMTP # MTA Server B: Dovecot+LMTP # Just mailboxes Server C: Dovecot # POP3/IMAP
Right now the Server A can leave a received email to the Server B, but I don't know how to communicate Server C to the Server B to retrieve the emails.
I think that we should use IMAP protocol, but I am confused about how to connect them, I don't know if we have to use a proxy IMAP server, or another thing.
It all depends on what you want to accomplish...
First, I'm guessing your subject is not precisely correct - the IMAP server IS 'the mailboxes'...
So, I guess you meant separate MTA and IMAP servers?
If so, then...
a) you could set up dsync to sync server C with B
b) you could do the same with imapsync (best to use dsync though, unless you're stuck with dovecot versions prior to 2.2.# due to brain-dead distro limitations or corporate policies)
c) you could use some kind of distributed filesystem
Why the 2 dovecot servers? If it is for load, how many users on each (maybe you don't need 2)? If for redundancy, then definitely dsync, but there are other issues to consider (if HA is your goal)...
--
Best regards,
*/Charles /*
I've got a working setup very similar to this.
You want to setup server C as a proxy to B. Server B also needs to have Dovecot IMAP running on it so it has something to proxy to = IMAP <PROXY> IMAP
I'm using MySQL as the backend for Dovecot, so depending on how you're setup this should give you the basic idea anyway.
In your dovecot.conf file on Server C you just need to specify a Proxy as part of the password_query...
password_query =
SELECT
password
,username AS user
,'y' as proxy
,'<IP ADDRESS OF B>' as host
FROM
mailbox
WHERE
username = '%u'
AND active='1'
On 22/10/2013, at 8:48 AM, Charles Marcus wrote:
On 2013-10-21 3:23 PM, Reymer Antonio Vargas Solano <reymervargas@gmail.com> wrote:
At my university we are trying to implement a distributed email backend, but I have some troubles,
The topology:
Server A: Postfix+LMTP # MTA Server B: Dovecot+LMTP # Just mailboxes Server C: Dovecot # POP3/IMAP
Right now the Server A can leave a received email to the Server B, but I don't know how to communicate Server C to the Server B to retrieve the emails.
I think that we should use IMAP protocol, but I am confused about how to connect them, I don't know if we have to use a proxy IMAP server, or another thing.
Hello Regan,
I am using LDAP to store users and passwords.
I will try your setup, I think it could work!
On Mon, Oct 21, 2013 at 2:29 PM, Regan Yelcich <reganyelcich@gmail.com>wrote:
I've got a working setup very similar to this.
You want to setup server C as a proxy to B. Server B also needs to have Dovecot IMAP running on it so it has something to proxy to = IMAP <PROXY> IMAP
I'm using MySQL as the backend for Dovecot, so depending on how you're setup this should give you the basic idea anyway.
In your dovecot.conf file on Server C you just need to specify a Proxy as part of the password_query...
password_query =
SELECT
password
,username AS user
,'y' as proxy
,'<IP ADDRESS OF B>' as host
FROM
mailbox
WHERE
username = '%u'
AND active='1'On 22/10/2013, at 8:48 AM, Charles Marcus wrote:
On 2013-10-21 3:23 PM, Reymer Antonio Vargas Solano < reymervargas@gmail.com> wrote:
At my university we are trying to implement a distributed email backend, but I have some troubles,
The topology:
Server A: Postfix+LMTP # MTA Server B: Dovecot+LMTP # Just mailboxes Server C: Dovecot # POP3/IMAP
Right now the Server A can leave a received email to the Server B, but I don't know how to communicate Server C to the Server B to retrieve the emails.
I think that we should use IMAP protocol, but I am confused about how to connect them, I don't know if we have to use a proxy IMAP server, or another thing.
participants (5)
-
Charles Marcus
-
Regan Yelcich
-
Reindl Harald
-
Reymer Antonio Vargas Solano
-
Robert Schetterer