Quoting "William L. Thomson Jr." <wlt-ml at o-sinc.com>:> You are not alone! > > On Wednesday, July 06, 2016 01:15:34 PM Remko Lodder wrote: >> Dear list, >> >> I have setup a master-master replication setup. My primairy MX's send >> email >> over on a DNS loadbalanced way, so DNS is doing some kind of round-robin >> way of sending mail to both master servers. >> >> I found out, that on one of the two machines, the email synchronisation >> is >> heavily delayed. Lets assume server A receives a mail from the MX; it >> synchronises almost instantly with the other server. >> >> Whenever server B receives the email, it could take up to several hours >> to >> synchronise the email, it seems that it is not detected prior. > > I have been dealing with this for months. > http://www.dovecot.org/list/dovecot/2016-March/103680.html > > For a band aid I use? this crontab entry. On the 2nd mail server. > > */15 * * * *? ?root? ? /usr/bin/doveadm sync -u "*" remote:mail1 > <snip>Are you guys using LMTP to deliver from your MX server to the mailbox server? I have a similar setup, but not yet synched, because as I understand it - using 'deliver' to drop mail into an NFS mount won't inititate a sync.? I have to migrate my procmail scripts to sieve (and use the execute plugin) and change my final delivery to be a redirect to LMTP.?? Not sure how replication will work when running old procmail scripts from sieve... In any case..? If you're piping to dovecot's deliver/dovecot-lda, here is a rudimentary LMTP script I hacked together that I planned to use to replace deliver with...?? I'd grab the 'master' mailbox server IP for each user for the command line. #!/usr/bin/perl use Net::LMTP; use Getopt::Std; $opts{'s'} = "localhost"; $opts{'p'} = "24"; $opts{'f'} = 'root@' . `hostname`; chomp($opts{'f'}); chomp($opts{'s'}); getopts("hs:p:f:u:", \%opts); if ($opts{'h'}) { ??? print " lmtpsend [-s lmtpserver] [-f fromaddress] [-u subject] toaddress [...] ? lmtpsend will send an email from the commandline. ? Options: ??? -s lmtpserver????? Sets the lmtpserver for where to send the mail through. ??? -f fromaddress???? Sets the email address to be used on the From: line. ??? -u subject???????? Sets the email subject to be used from the Subject line. ??? toaddress????????? Where you want the email sent to. "; ??? exit; } die "no recepients to send mail to" if ($#ARGV < 0); @emailbody = <STDIN> ; # send the message $message = Net::LMTP->new($opts{'s'},$opts{'p'}) || die "can't talk to server $opts{'s'}\n"; $message->mail($opts{'f'}); $message->to(@ARGV) || die "failed to send to the recepients ",join(",", at ARGV),": $!"; $message->data(); $message->datasend("To: " . join(", ", at ARGV) . "\n"); $message->datasend(@emailbody); $message->dataend(); $message->quit; Rick
> On 11 Jul 2016, at 17:36, Rick Romero <rick at havokmon.com> wrote: > > Quoting "William L. Thomson Jr." <wlt-ml at o-sinc.com>: > >> You are not alone! >> >> On Wednesday, July 06, 2016 01:15:34 PM Remko Lodder wrote: >>> Dear list, >>> >>> I have setup a master-master replication setup. My primairy MX's send >>> email >>> over on a DNS loadbalanced way, so DNS is doing some kind of round-robin >>> way of sending mail to both master servers. >>> >>> I found out, that on one of the two machines, the email synchronisation >>> is >>> heavily delayed. Lets assume server A receives a mail from the MX; it >>> synchronises almost instantly with the other server. >>> >>> Whenever server B receives the email, it could take up to several hours >>> to >>> synchronise the email, it seems that it is not detected prior. >> >> I have been dealing with this for months. >> http://www.dovecot.org/list/dovecot/2016-March/103680.html >> >> For a band aid I use this crontab entry. On the 2nd mail server. >> >> */15 * * * * root /usr/bin/doveadm sync -u "*" remote:mail1 >> <snip> > > Are you guys using LMTP to deliver from your MX server to the mailbox > server?Local delivery on the destination server is LMTP but the transport between MX and destination server is just plain SMTP. I could try and revert to dovecot-lda and see what that does? Cheers remko> > I have a similar setup, but not yet synched, because as I understand it - > using 'deliver' to drop mail into an NFS mount won't inititate a sync. I > have to migrate my procmail scripts to sieve (and use the execute plugin) > and change my final delivery to be a redirect to LMTP. Not sure how > replication will work when running old procmail scripts from sieve... > > In any case.. If you're piping to dovecot's deliver/dovecot-lda, here is > a rudimentary LMTP script I hacked together that I planned to use to > replace deliver with... I'd grab the 'master' mailbox server IP for > each user for the command line. > > #!/usr/bin/perl > > use Net::LMTP; > use Getopt::Std; > > $opts{'s'} = "localhost"; > $opts{'p'} = "24"; > $opts{'f'} = 'root@' . `hostname`; > chomp($opts{'f'}); > chomp($opts{'s'}); > getopts("hs:p:f:u:", \%opts); > > if ($opts{'h'}) { > print " > lmtpsend [-s lmtpserver] [-f fromaddress] [-u subject] toaddress [...] > > lmtpsend will send an email from the commandline. > > Options: > -s lmtpserver Sets the lmtpserver for where to send the > mail through. > -f fromaddress Sets the email address to be used on the > From: line. > -u subject Sets the email subject to be used from > the Subject line. > toaddress Where you want the email sent to. > > "; > exit; > } > > die "no recepients to send mail to" if ($#ARGV < 0); > > @emailbody = <STDIN> ; > > # send the message > > $message = Net::LMTP->new($opts{'s'},$opts{'p'}) || die "can't talk to > server $opts{'s'}\n"; > > $message->mail($opts{'f'}); > $message->to(@ARGV) || die "failed to send to the recepients > ",join(",", at ARGV),": $!"; > $message->data(); > $message->datasend("To: " . join(", ", at ARGV) . "\n"); > $message->datasend(@emailbody); > $message->dataend(); > $message->quit; > > Rick
Quoting Remko Lodder <remko at freebsd.org>:>> On 11 Jul 2016, at 17:36, Rick Romero <rick at havokmon.com> wrote: >> >> Quoting "William L. Thomson Jr." <wlt-ml at o-sinc.com>: >> >>> You are not alone! >>> >>> On Wednesday, July 06, 2016 01:15:34 PM Remko Lodder wrote: >>>> Dear list, >>>> >>>> I have setup a master-master replication setup. My primairy MX's send >>>> email >>>> over on a DNS loadbalanced way, so DNS is doing some kind of >>>> round-robin >>>> way of sending mail to both master servers. >>>> >>>> I found out, that on one of the two machines, the emailsynchronisation>>>> is >>>> heavily delayed. Lets assume server A receives a mail from the MX; it >>>> synchronises almost instantly with the other server. >>>> >>>> Whenever server B receives the email, it could take up to severalhours>>>> to >>>> synchronise the email, it seems that it is not detected prior. >>> >>> I have been dealing with this for months. >>> http://www.dovecot.org/list/dovecot/2016-March/103680.html >>> >>> For a band aid I use? this crontab entry. On the 2nd mail server. >>> >>> */15 * * * *? ?root? ? /usr/bin/doveadm sync -u "*" remote:mail1 >>> <snip> >> >> Are you guys using LMTP to deliver from your MX server to the mailbox >> server? > > Local delivery on the destination server is LMTP but the transportbetween> MX and destination server is just plain SMTP. > > I could try and revert to dovecot-lda and see what that does? > ?I don't think that'll help.? From what I understand, LMTP is required for replication on delivery. Out of curiousity, why do you use SMTP from the MX to the destination server instead of LMTP? ?
On Monday, July 11, 2016 10:36:13 AM Rick Romero wrote:> Are you guys using LMTP to deliver from your MX server to the mailbox > server?I am not at this time. My use of NFS is for other reasons. All services SMTP, POP, and IMAP are on the same system. I have not tried it without NFS to see if that is causing the problem or not. I do not believe it to be a NFS issue but it might. -- William L. Thomson Jr. Obsidian-Studios, Inc. http://www.obsidian-studios.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: This is a digitally signed message part. URL: <http://dovecot.org/pipermail/dovecot/attachments/20160711/b3452b6b/attachment.sig>