Re: Setting up replication - First steps...

2016-12-08 Thread Arie Peterson
SH Development wrote:
> […]
> So I believe my first step is to set up another server, on another IP,
> different hostname, with Dovecot and Postfix, and simply use the files from
> the /etc directories of the existing server to configure it (changing the
> IP and hostname of course).
> 
> Am I on the right track so far?
> 
> Next steps involve setting up replication with dsync?
> 
> If I have successfully setup replication between the two servers, does this
> mean users can then actually log into either server and have their “stuff”
> intact?  So I could set up DNS failover in case the primary server fails? 
> Would this make the setup acceptable for secondary MX as everything should
> sync to the primary server when it comes back online?

Yes, this is exactly what I've set up for my site a few weeks ago: the 
secondary server has almost exactly the same configuration as the primary one, 
and the secondary server is listed as MX20.

Replication with dsync works pretty smoothly. I've myself noticed one case 
where a mass email deletion took somewhat longer than expected to propagate to 
the other server. As a user, most of the time it's like you're dealing with a 
single server.


Re: Setting up replication - First steps...

2016-12-08 Thread Cedric Malitte
I'm also about to deploy such a setup for a "small" mail server.
I'll use mysql replication, but only one master server will be writable.

I've used virtual machines to test, and so far so good.

My plan is to use each server in separate datacenters from the same
provider and route the users by dns.
I use easydns and made some tests, seems to work fine for failover.



2016-12-08 7:29 GMT-05:00 Arie Peterson :

> SH Development wrote:
> > […]
> > So I believe my first step is to set up another server, on another IP,
> > different hostname, with Dovecot and Postfix, and simply use the files
> from
> > the /etc directories of the existing server to configure it (changing the
> > IP and hostname of course).
> >
> > Am I on the right track so far?
> >
> > Next steps involve setting up replication with dsync?
> >
> > If I have successfully setup replication between the two servers, does
> this
> > mean users can then actually log into either server and have their
> “stuff”
> > intact?  So I could set up DNS failover in case the primary server fails?
> > Would this make the setup acceptable for secondary MX as everything
> should
> > sync to the primary server when it comes back online?
>
> Yes, this is exactly what I've set up for my site a few weeks ago: the
> secondary server has almost exactly the same configuration as the primary
> one,
> and the secondary server is listed as MX20.
>
> Replication with dsync works pretty smoothly. I've myself noticed one case
> where a mass email deletion took somewhat longer than expected to
> propagate to
> the other server. As a user, most of the time it's like you're dealing
> with a
> single server.
>


Migrate from dovecot 1.1 to 2.2 Maildir to 2.2 mdbox

2016-12-08 Thread Daniel Betz
Hello list,

im am trying to migrate customer mails via dsync from an old dovecot 1.1 setup 
to an new installed dovecot 2.2.25 setup with mdbox.
Upgrading the old dovecot 1.1 to 2.2 with Maildir isnt an problem and the 
replication to the new setup works well too.

The only problem now is, that the POP3 UIDL are completely wrong on the target 
setup.
Im using for Maildir pop3_uidl_format = %f
With mdbox i cant use it anymore.

But what do i need for mdbox ?
Or is there an way to migrate the POP3 uidl list to the mdbox ?

I could live with it, when i were able to mark the mails older 14 days as read. 
Is there an way to do this on many mailboxes ?

I have read in Release News from 2.2.26 that there are some fixes with POP3 
UIDL .. what is it in detail and could it help me ?

Hop you can point me to the right direction.


Regards,
Daniel






Freundliche Grüße,

Daniel Betz
System Design Engineer / Senior Systemadministration
___

domainfactory GmbH
Oskar-Messter-Str. 33
85737 Ismaning
Germany

Telefon:  +49 (0)89 / 55266-364
Telefax:  +49 (0)89 / 55266-222

E-Mail:   db...@df.eu
Internet: www.df.eu

Registergericht: Amtsgericht München
HRB-Nummer 150294, Geschäftsführer:
Tobias Mohr, Stephan Wolfram


doveadm

2016-12-08 Thread Eric Broch

Hello list,

I'm interested in setting up dovecot replication but when I run the command
doveadm user '*', which is necessary as indicated here: 
http://wiki2.dovecot.org/Replication,  I get the following output:


Error: User listing returned failure
Fatal: user listing failed

It also indicates the following on the wiki2: "Make sure that user 
listing is configured for your userdb, this is required by replication 
to find the list of users that are periodically replicated"


I use a vpopmail backup so the question is how do I "Make sure that user 
listing is configured for...userdb"?


This is my userdb settings for vpopmail:

userdb {
  args = cache_key=%u quota_template=quota_rule=*:backend=%q
  driver = vpopmail
}

Thank-you

Eric


Re: Migrate from dovecot 1.1 to 2.2 Maildir to 2.2 mdbox

2016-12-08 Thread Robert Schetterer
Am 08.12.2016 um 11:23 schrieb Daniel Betz:
> Hello list,
> 
> im am trying to migrate customer mails via dsync from an old dovecot 1.1 
> setup to an new installed dovecot 2.2.25 setup with mdbox.
> Upgrading the old dovecot 1.1 to 2.2 with Maildir isnt an problem and the 
> replication to the new setup works well too.
> 
> The only problem now is, that the POP3 UIDL are completely wrong on the 
> target setup.
> Im using for Maildir pop3_uidl_format = %f
> With mdbox i cant use it anymore.
> 
> But what do i need for mdbox ?
> Or is there an way to migrate the POP3 uidl list to the mdbox ?
> 
> I could live with it, when i were able to mark the mails older 14 days as 
> read. Is there an way to do this on many mailboxes ?
> 
> I have read in Release News from 2.2.26 that there are some fixes with POP3 
> UIDL .. what is it in detail and could it help me ?
> 
> Hop you can point me to the right direction.
> 
> 
> Regards,
> Daniel

For such an extrem version migration with format change you should
better use imapsync, this will also give the chance for dry runs and
testing before live migration and going production

like

https://sys4.de/de/blog/2013/04/26/mail-migration-mit-imapsync/

i "guess" you will fail migrate with POP3 uidl in that scenario in any case

> 
> 
> 
> 
> 
> 
> Freundliche Grüße,
> 
> Daniel Betz
> System Design Engineer / Senior Systemadministration
> ___
> 
> domainfactory GmbH
> Oskar-Messter-Str. 33
> 85737 Ismaning
> Germany
> 
> Telefon:  +49 (0)89 / 55266-364
> Telefax:  +49 (0)89 / 55266-222
> 
> E-Mail:   db...@df.eu
> Internet: www.df.eu
> 
> Registergericht: Amtsgericht München
> HRB-Nummer 150294, Geschäftsführer:
> Tobias Mohr, Stephan Wolfram
> 



Best Regards
MfG Robert Schetterer

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Schleißheimer Straße 26/MG, 80333 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein


doveadm-server uses 100% cpu and never finishes, dsync backup also never finishes

2016-12-08 Thread Patrick van Zweden
Hi Guys,

I have a quite interesting problem.

I have two servers that replicate to each-other. Suddenly one of the accounts 
is starting to eat a very large amount of disk space on, what basically is the 
replica for this account. doveadm-server seems to hang and keeps on filling the 
disk.
I came across this message in the logs:

Dec  8 07:36:40  dovecot: dsync-server(): Fatal: 
pool_system_malloc(6291528): Out of memory
Dec  8 07:36:40  dovecot: dsync-server(): Fatal: master: 
service(doveadm): child 883 returned error 83 (Out of memory (service doveadm { 
vsz_limit=256 MB }, you may need to increase it) - set DEBUG_OUTOFMEM=1 
environment to get core dump)

I’ve increased the vsz_limit to 5G so it has stopped complaining. Only… the 
process never seems to finish. I’ve tried to export the mailbox using dsync:
dsync -Dv backup -u 'x' sdbox:/tmp/patrick_export/
However this process never finishes either. It looks like it stays in one of 
the mailboxes and keeps on trying to copy messages.

Format of the mailbox is sdbox
Version of dovecot on all servers: 2.2.9

Any pointers for solving this problem?

Kind regards,

Patrick

--
Patrick van Zweden





signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: 2.2.27 panic file mail-index-map.c: line 549 (mail_index_map_lookup_seq_range): assertion failed: (first_uid > 0)

2016-12-08 Thread Toni Mattila

Hi,

On 06-Dec-16 12:11, Aki Tuomi wrote:

I was able to repeat this bug, thank you for your report.


Noticed tss commited 
https://github.com/dovecot/core/commit/b7a0844fb8dffbf7f1dd0b5c6d30c22ff8cb6bec 
so testing that now.


Cheers,
Toni


Correct user for replication

2016-12-08 Thread John Fawcett
Hi

I've set up replication with the settings below.

With these settings, aggregator runs as user dovecot and replicator as
user root. Are those the recommended settings or should I change them,
in particular for replicator which is running as a privileged user?

service aggregator {
  fifo_listener replication-notify-fifo {
mode = 0666
user = vmail
  }
  unix_listener replication-notify {
mode = 0666
user = vmail
  }
}
service replicator {
  unix_listener replicator-doveadm {
mode = 0660
group = mail
  }
}

service doveadm {
  inet_listener {
port = 999
ssl = yes
  }
}
ssl_client_ca_file = /etc/pki/tls/cert.pem

doveadm_password = secret

plugin {
  mail_replica = tcps:hostname.domainname.tld:999
}

thanks

John


Re: 2.2.27 panic file mail-index-map.c: line 549 (mail_index_map_lookup_seq_range): assertion failed: (first_uid > 0)

2016-12-08 Thread Aki Tuomi



On 08.12.2016 22:43, Toni Mattila wrote:

Hi,

On 06-Dec-16 12:11, Aki Tuomi wrote:

I was able to repeat this bug, thank you for your report.


Noticed tss commited 
https://github.com/dovecot/core/commit/b7a0844fb8dffbf7f1dd0b5c6d30c22ff8cb6bec 
so testing that now.


Cheers,
Toni


Thank you. Please let us know how it went!

Aki