My mailboxes are on a Dovecot (IMAP) server.On DNS there is an MX record pointing to the server.To read the mail I use Roundcube.If the server is down, I lose the new mail. I would like to do two things, alternatively. First option.1) I keeep the mail on the provider's server, restoring the original MX record.2) Dovecot does not receive the mail, but should go to download it.3) I can access the server with Roundcube to read the downloaded mail, but if the server is down I can always go to read the mail on the provider's server with its webmail Second optionI install a second mail server and the two have to replicate the mail.But I don't know how to do it, so I need a guide with instructions.Furthermore Roundcube would always access only one server and if this is down, how can I connect to the second one?This is a typical situation for webmail like Yahoo, Outlook or GMail, but I'm not Yahoo, Microsoft and Google ;) Thanks in advance for any advice. -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20200603/4f87fafd/attachment.html>
Andrea Miconi wrote:> My mailboxes are on a Dovecot (IMAP) server. > On DNS there is an MX record pointing to the server. > To read the mail I use Roundcube. > If the server is down, I lose the new mail.Really? What kind of downtime makes you loose emails? If your server is down, mail delivery is tried every couple of hours for days. So - if your server is down for a day or two, no email should get lost. You might loose a couple of spam mails, as they don't do retries for performance reasons, but every halfway correctly configured MTA these days is doing this properly. It can take some time until all emails arrive after the server comes online again. If this is an issue or if you need something more professional for a business environemnt, then configure a second MX with the same SMTP and dovecot configuration, then configure replication between the two dovecot instances. https://wiki.dovecot.org/Replication HTTP is another topic. If you also need high availibilty of your roundcube frontend, then you'd need a reverse proxy/load balancer in front of your server that can detect the outage and then direct the user to the other frontend on the second MX. HTH, Stefan PS: The text part in you email is broken (no line breaks).
On 03/06/2020 11:06, Andrea Miconi wrote:> My mailboxes are on a Dovecot (IMAP) server. > On DNS there is an MX record pointing to the server. > To read the mail I use Roundcube. > If the server is down, I lose the new mail. > > I would like to do two things, alternatively. > > First option. > 1) I keeep the mail on the provider's server, restoring the original MX > record. > 2) Dovecot does not receive the mail, but should go to download it. > 3) I can access the server with Roundcube to read the downloaded mail, > but if the server is down I can always go to read the mail on the > provider's server with its webmailThis is pretty much exactly what I do. I use fetchmail [1] to download mail from my ISP and feed it to exim, which delivers everything to dovecot. I don't know whether it's possible to configure dovecot alone for this. [1] It's horrible, but it worked in 2007 and I'm intensely lazy. Nick
Use Fetchmail on the link between your provider and your email server. Schedule a fetch every 5 minutes or so.. This makes for a very flexible and resilient system. On 6/3/20 5:06 AM, Andrea Miconi wrote:> My mailboxes are on a Dovecot (IMAP) server. > On DNS there is an MX record pointing to the server. > To read the mail I use Roundcube. > If the server is down, I lose the new mail. > > I would like to do two things, alternatively. > > First option. > 1) I keeep the mail on the provider's server, restoring the original > MX record. > 2) Dovecot does not receive the mail, but should go to download it. > 3) I can access the server with Roundcube to read the downloaded mail, > but if the server is down I can always go to read the mail on the > provider's server with its webmail > > Second option > I install a second mail server and the two have to replicate the mail. > But I don't know how to do it, so I need a guide with instructions. > Furthermore Roundcube would always access only one server and if this > is down, how can I connect to the second one? > This is a typical situation for webmail like Yahoo, Outlook or GMail, > but I'm not Yahoo, Microsoft and Google ;) > > Thanks in advance for any advice. > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20200603/372e628e/attachment-0001.html>
I read about fetchmail.I understand that it doesn't work if the mail server uses an MTA. Il mercoled? 3 giugno 2020, 15:07:51 CEST, Nicholas Taylor <net20 at cam.ac.uk> ha scritto: This is pretty much exactly what I do.? I use fetchmail [1] to download mail from my ISP and feed it to exim, which delivers everything to dovecot.? I don't know whether it's possible to configure dovecot alone for this. [1] It's horrible, but it worked in 2007 and I'm intensely lazy. Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20200604/d5039f8a/attachment.html>
> If your server is down, mail delivery is tried every couple of hours for > days. So - if your server is down for a day or two, no email should get > lost.Fortunately the server went down very few times, but the last one lasted almost two daysand I lost a lot of mail on multiple mailboxes.Even though I work alone, it is still a business server and I can't afford these things.> then configure a second MX with> the same SMTP and dovecot configuration, then configure replication> between the two dovecot instances. https://wiki.dovecot.org/ReplicationI had read this page on replication, but I didn't understand how I can access the second server.Roundcube/Thunderbird are configured to access an IMAP / SMTP server that matchestheir respective IP addresses, but here the IPs would become 2x2 = 4>HTTP is another topic. If you also need high availibilty of your> roundcube frontend, then you'd need a reverse proxy/load balancer in> front of your server that can detect the outage and then direct the user> to the other frontend on the second MX.I already have Nginx as Reverse Proxy for Apache on my server.However, if I understand your suggestion, I should install a third server for this purpose only.Isn't there a guide to refer to?I wouldn't even know what to look for on Google?> PS: The text part in you email is broken (no line breaks).I do not understand.I am writing from the yahoo webmail.Many thanksA. -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20200604/aaa3a1a3/attachment.html>