Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DBMail: users

Imap Sync

 

 

DBMail users RSS feed   Index | Next | Previous | View Threaded


mysql.jorge at decimal

Jan 9, 2009, 2:03 AM

Post #1 of 14 (2520 views)
Permalink
Imap Sync

People,

I'm looking for a way to synchronize two dbmail imap servers.

the scenario is:



one dbmail imap in a place, where the users will be around 20 users
accessing just one account.

In this server must exist a tool, so synchronize all email in this email,
with another imap server, for example 5 in 5 minutes.

The sync must be done in two ways, and MUST never create duplicates of the
same message.



Whats the best tool to?


shane at time-travellers

Jan 9, 2009, 4:18 AM

Post #2 of 14 (2416 views)
Permalink
Re: Imap Sync [In reply to]

Jorge,

On Fri, 2009-01-09 at 10:03 +0000, Jorge Bastos wrote:
> People,
>
> I’m looking for a way to synchronize two dbmail imap servers.
>
> the scenario is:
>
>
>
> one dbmail imap in a place, where the users will be around 20 users
> accessing just one account.
>
> In this server must exist a tool, so synchronize all email in this
> email, with another imap server, for example 5 in 5 minutes.
>
> The sync must be done in two ways, and MUST never create duplicates of
> the same message.
>
>
>
> Whats the best tool to?

It sounds like you want to install DBMail on both sites, but have them
both connect to a single SQL database.

That way they will not need to synchronize - rather they will be
accessing the same information.

I don't know what the performance implications are for this approach,
but I suspect one of the sites will be slower than the other, because of
network latency. Since this is simple to set up, I suggest you try it
and measure if it is fast enough. (And hopefully post the results to
this list either way!)

--
Shane

_______________________________________________
DBmail mailing list
DBmail [at] dbmail
https://mailman.fastxs.nl/mailman/listinfo/dbmail


andrea at brancatelli

Jan 9, 2009, 4:40 AM

Post #3 of 14 (2414 views)
Permalink
Re: Imap Sync [In reply to]

Il giorno ven, 09/01/2009 alle 10.03 +0000, Jorge Bastos ha scritto:

> one dbmail imap in a place, where the users will be around 20 users
> accessing just one account.
> In this server must exist a tool, so synchronize all email in this
> email, with another imap server, for example 5 in 5 minutes.
> The sync must be done in two ways, and MUST never create duplicates of
> the same message.


If I understood well what you're trying to accomplish, the best solution
is enabling mysql (circular) replication between the two sites. You can
tell both mysql generate auto-increments' unique keys with steps of two
instead of one and with another setting you can specify an offset for
the auto_increment. That means that the first site will have everything
in the DB indexed as 0, 2, 4, 6, 8 and so on, while the other one will
have 1, 3, 5, 7, 9, 11 and so on. This way you can freely mix the two
databases with mysql replication without any data colliding.

For dbmail everything will be pretty much transparent.

There's a very clear explanation of this here:
http://www.onlamp.com/pub/a/onlamp/2006/04/20/advanced-mysql-replication.html

The good thing is that as long there's connectivity the two places will
be instantly aligned. If there's no connetivity things will just sit
there waiting to realing. Magical, isnt'?

Let me know if I understood well your problem.


mysql.jorge at decimal

Jan 9, 2009, 4:42 AM

Post #4 of 14 (2414 views)
Permalink
RE: Imap Sync [In reply to]

Thanks for the answer shane, but no, i don't want to use the same BD.

Just want to synchronize a particular account, on both sides



> -----Original Message-----
> From: dbmail-bounces [at] dbmail [mailto:dbmail-bounces [at] dbmail] On
> Behalf Of Shane Kerr
> Sent: sexta-feira, 9 de Janeiro de 2009 12:19
> To: DBMail mailinglist
> Subject: Re: [Dbmail] Imap Sync
>
> Jorge,
>
> On Fri, 2009-01-09 at 10:03 +0000, Jorge Bastos wrote:
> > People,
> >
> > I’m looking for a way to synchronize two dbmail imap servers.
> >
> > the scenario is:
> >
> >
> >
> > one dbmail imap in a place, where the users will be around 20 users
> > accessing just one account.
> >
> > In this server must exist a tool, so synchronize all email in this
> > email, with another imap server, for example 5 in 5 minutes.
> >
> > The sync must be done in two ways, and MUST never create duplicates
> of
> > the same message.
> >
> >
> >
> > Whats the best tool to?
>
> It sounds like you want to install DBMail on both sites, but have them
> both connect to a single SQL database.
>
> That way they will not need to synchronize - rather they will be
> accessing the same information.
>
> I don't know what the performance implications are for this approach,
> but I suspect one of the sites will be slower than the other, because
> of
> network latency. Since this is simple to set up, I suggest you try it
> and measure if it is fast enough. (And hopefully post the results to
> this list either way!)
>
> --
> Shane
>
> _______________________________________________
> DBmail mailing list
> DBmail [at] dbmail
> https://mailman.fastxs.nl/mailman/listinfo/dbmail

_______________________________________________
DBmail mailing list
DBmail [at] dbmail
https://mailman.fastxs.nl/mailman/listinfo/dbmail


andrea at brancatelli

Jan 9, 2009, 4:43 AM

Post #5 of 14 (2410 views)
Permalink
RE: Imap Sync [In reply to]

Il giorno ven, 09/01/2009 alle 12.42 +0000, Jorge Bastos ha scritto:

> Thanks for the answer shane, but no, i don't want to use the same BD.
> Just want to synchronize a particular account, on both sides


Mmm then I didn't understand... :-)
Attachments: stock_smiley-1.png (0.85 KB)


mysql.jorge at decimal

Jan 9, 2009, 6:35 AM

Post #6 of 14 (2421 views)
Permalink
RE: Imap Sync [In reply to]

Wrong Andrea J

On SIDE A, will be the dbmail server (internal only), with just one account being accessed by 20 users localy, that will synchronize with a public dbmail that about 1000 accounts, but I just want to synchronize that particular account. And it must be using a synchronization tool.

The two sites won’t be connected directly.





From: dbmail-bounces [at] dbmail [mailto:dbmail-bounces [at] dbmail] On Behalf Of Andrea Brancatelli
Sent: sexta-feira, 9 de Janeiro de 2009 12:41
To: DBMail mailinglist
Subject: Re: [Dbmail] Imap Sync



Il giorno ven, 09/01/2009 alle 10.03 +0000, Jorge Bastos ha scritto:




one dbmail imap in a place, where the users will be around 20 users accessing just one account.
In this server must exist a tool, so synchronize all email in this email, with another imap server, for example 5 in 5 minutes.
The sync must be done in two ways, and MUST never create duplicates of the same message.




If I understood well what you're trying to accomplish, the best solution is enabling mysql (circular) replication between the two sites. You can tell both mysql generate auto-increments' unique keys with steps of two instead of one and with another setting you can specify an offset for the auto_increment. That means that the first site will have everything in the DB indexed as 0, 2, 4, 6, 8 and so on, while the other one will have 1, 3, 5, 7, 9, 11 and so on. This way you can freely mix the two databases with mysql replication without any data colliding.

For dbmail everything will be pretty much transparent.

There's a very clear explanation of this here: http://www.onlamp.com/pub/a/onlamp/2006/04/20/advanced-mysql-replication.html

The good thing is that as long there's connectivity the two places will be instantly aligned. If there's no connetivity things will just sit there waiting to realing. Magical, isnt'?

Let me know if I understood well your problem.


arnt at gulbrandsen

Jan 9, 2009, 6:42 AM

Post #7 of 14 (2413 views)
Permalink
Re: Imap Sync [In reply to]

Jorge Bastos writes:
> On SIDE A, will be the dbmail server (internal only), with just one
> account being accessed by 20 users localy, that will synchronize with
> a public dbmail that about 1000 accounts, but I just want to
> synchronize that particular account. And it must be using a
> synchronization tool.

Imapsync.

Arnt
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
https://mailman.fastxs.nl/mailman/listinfo/dbmail


mysql.jorge at decimal

Jan 9, 2009, 7:49 AM

Post #8 of 14 (2414 views)
Permalink
RE: Imap Sync [In reply to]

Imapsync works a bit wrong :S
At least with me, it creates a lot of duplicated messages...


> -----Original Message-----
> From: dbmail-bounces [at] dbmail [mailto:dbmail-bounces [at] dbmail] On
> Behalf Of Arnt Gulbrandsen
> Sent: sexta-feira, 9 de Janeiro de 2009 14:43
> To: dbmail [at] dbmail
> Subject: Re: [Dbmail] Imap Sync
>
> Jorge Bastos writes:
> > On SIDE A, will be the dbmail server (internal only), with just one
> > account being accessed by 20 users localy, that will synchronize with
> > a public dbmail that about 1000 accounts, but I just want to
> > synchronize that particular account. And it must be using a
> > synchronization tool.
>
> Imapsync.
>
> Arnt
> _______________________________________________
> DBmail mailing list
> DBmail [at] dbmail
> https://mailman.fastxs.nl/mailman/listinfo/dbmail

_______________________________________________
DBmail mailing list
DBmail [at] dbmail
https://mailman.fastxs.nl/mailman/listinfo/dbmail


arnt at gulbrandsen

Jan 9, 2009, 8:28 AM

Post #9 of 14 (2410 views)
Permalink
Re: Imap Sync [In reply to]

Jorge Bastos writes:
> Imapsync works a bit wrong :S
> At least with me, it creates a lot of duplicated messages...

You need to use the right options. I don't know what they are with
dbmail (I'm not a dbmail user).

Arnt
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
https://mailman.fastxs.nl/mailman/listinfo/dbmail


paul at nfg

Jan 9, 2009, 10:08 AM

Post #10 of 14 (2412 views)
Permalink
Re: Imap Sync [In reply to]

Arnt Gulbrandsen wrote:
> Jorge Bastos writes:
>> Imapsync works a bit wrong :S
>> At least with me, it creates a lot of duplicated messages...
>
> You need to use the right options. I don't know what they are with
> dbmail (I'm not a dbmail user).

Yeah right :-)

But Arnt is quit correct: using the right imapsync settings you won't
get duplicates.

--
________________________________________________________________
Paul Stevens paul at nfg.nl
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands________________________________http://www.nfg.nl
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
https://mailman.fastxs.nl/mailman/listinfo/dbmail


mysql.jorge at decimal

Jan 9, 2009, 10:14 AM

Post #11 of 14 (2418 views)
Permalink
RE: Imap Sync [In reply to]

> > You need to use the right options. I don't know what they are with
> > dbmail (I'm not a dbmail user).
>
> Yeah right :-)
>
> But Arnt is quit correct: using the right imapsync settings you won't
> get duplicates.
>


Going to investigate that :P

_______________________________________________
DBmail mailing list
DBmail [at] dbmail
https://mailman.fastxs.nl/mailman/listinfo/dbmail


michael.monnerie at is

Jan 11, 2009, 3:59 AM

Post #12 of 14 (2390 views)
Permalink
Re: Imap Sync [In reply to]

On Freitag 09 Januar 2009 Jorge Bastos wrote:
> Going to investigate that

I found an old script that did:

imapsync --host1 old.server --user1 old.user --password1 old.pwd
--authmech1 LOGIN \
--host2 new.server --user2 new.user --password2 new.pwd
--authmech2 LOGIN \
--skipheader '(^X-|^Received|^MIME-|^Content-Type|^Disposition-|^From|
^Cc|^Reply-|^Subject|^To|^DomainKey).*' --skipsize \
--delete2 --expunge2 \
--syncinternaldates &>/dev/null

But do not remember if it works correctly (but I'd guess so). May be
good as a starting point.

mfg zmi
--
// Michael Monnerie, Ing.BSc ----- http://it-management.at
// Tel: 0660 / 415 65 31 .network.your.ideas.
// PGP Key: "curl -s http://zmi.at/zmi.asc | gpg --import"
// Fingerprint: AC19 F9D5 36ED CD8A EF38 500E CE14 91F7 1C12 09B4
// Keyserver: wwwkeys.eu.pgp.net Key-ID: 1C1209B4
Attachments: signature.asc (0.19 KB)


mysql.jorge at decimal

Jan 11, 2009, 4:03 AM

Post #13 of 14 (2405 views)
Permalink
RE: Imap Sync [In reply to]

Tks Michael,



> -----Original Message-----
> From: dbmail-bounces [at] dbmail [mailto:dbmail-bounces [at] dbmail] On
> Behalf Of Michael Monnerie
> Sent: domingo, 11 de Janeiro de 2009 12:00
> To: DBMail mailinglist
> Subject: Re: [Dbmail] Imap Sync
>
> On Freitag 09 Januar 2009 Jorge Bastos wrote:
> > Going to investigate that
>
> I found an old script that did:
>
> imapsync --host1 old.server --user1 old.user --password1 old.pwd
> --authmech1 LOGIN \
> --host2 new.server --user2 new.user --password2 new.pwd
> --authmech2 LOGIN \
> --skipheader '(^X-|^Received|^MIME-|^Content-Type|^Disposition-|^From|
> ^Cc|^Reply-|^Subject|^To|^DomainKey).*' --skipsize \
> --delete2 --expunge2 \
> --syncinternaldates &>/dev/null
>
> But do not remember if it works correctly (but I'd guess so). May be
> good as a starting point.
>
> mfg zmi
> --
> // Michael Monnerie, Ing.BSc ----- http://it-management.at
> // Tel: 0660 / 415 65 31 .network.your.ideas.
> // PGP Key: "curl -s http://zmi.at/zmi.asc | gpg --import"
> // Fingerprint: AC19 F9D5 36ED CD8A EF38 500E CE14 91F7 1C12 09B4
> // Keyserver: wwwkeys.eu.pgp.net Key-ID: 1C1209B4


_______________________________________________
DBmail mailing list
DBmail [at] dbmail
https://mailman.fastxs.nl/mailman/listinfo/dbmail


michael.monnerie at is

Jan 19, 2009, 8:18 AM

Post #14 of 14 (2328 views)
Permalink
Re: Imap Sync [In reply to]

On Sonntag 11 Januar 2009 Jorge Bastos wrote:
> Tks Michael,

Update: I needed imapsync now to convert my internal mailserver from
Cyrus to DBmail, and used this, it works:
imapsync --host1 $oldhost --user1 $olduser --password1 $oldpwd
--authmech1 LOGIN \
--host2 $newhost --user2 $newuser --password2 $newpwd
--authmech2 LOGIN \
--skipsize \
--syncinternaldates

With the "--exclude" part some messages were not transferred.

mfg zmi
--
// Michael Monnerie, Ing.BSc ----- http://it-management.at
// Tel: 0660 / 415 65 31 .network.your.ideas.
// PGP Key: "curl -s http://zmi.at/zmi.asc | gpg --import"
// Fingerprint: AC19 F9D5 36ED CD8A EF38 500E CE14 91F7 1C12 09B4
// Keyserver: wwwkeys.eu.pgp.net Key-ID: 1C1209B4

_______________________________________________
DBmail mailing list
DBmail [at] dbmail
https://mailman.fastxs.nl/mailman/listinfo/dbmail

DBMail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.