PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Logiciels d'hébergement > comp.mail.imap > imapsync two way synchronization of deletes and explunges
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.mail.imap Discussion of IMAP-based mail systems.

imapsync two way synchronization of deletes and explunges

Réponse
 
LinkBack Outils de la discussion
Vieux 27/04/2006, 18h01   #1 (permalink)
astan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut imapsync two way synchronization of deletes and explunges

Synopsis:
I am using imapsync to synchronize two Courier IMAP servers for the
purpose of having a local repository of all mail for my users. My
problem is that deletes do not synchronize between the system.

Details:

mail.example.com is a courier server running out on the Internet
somewhere. It is running Courier-IMAP, and I don't have shell access
to it.

mail2.example.com is a courier server running inside the office. I am
root.

I have approximately 60 users. All of the users use Outlook. Despite
my threatening nuclear holocaust if they continue to do so, they will
continue to do so.

imapsync is running within a script on mail2.example.com. The script
is as follows:
_________________________________________
>#cat retrieve.sh

#!/bin/bash

{ while IFS=',' read u1 p1
do
imapsync --host1 mail.example.com --user1 "$u1@example.com" --password1
"$p1" --host2 mail2.example.com --user2 "$u1@mail2.example.com"
--password2 "$p1" --delete2

find /home/vpopmail/domains/mail2.example.com/$u1/Maildir -type f -a
-name '[0-9]*' > /tmp/mail_transfer_lockfile

/usr/bin/adjust_time.pl

done } < /etc/imapsync/users
__________________________________________
Translation: read in username / password pairs from
/etc/imapsync/users and sync the accounts.

It works... mostly.

The crux of the issue is that I have (will) configure Outlook on each
system to get mail from mail2.example.com (the local server). When a
user deletes or expunges a message on mail2.example.com, it does not
replicate that delete or expunge back to mail.example.com. Hence,
deleted messages reappear magically several minutes after they are
deleted. This makes users sad (confused, terrified, unable to cope...)

One solution would be to do two syncs, i.e. mail.example.com -->
mail2.example.com, then mail2.example.com --> mail.example.com.
Unfortunately, imapsync is resource intensive, and this will increase
the delay on mail transfer from 6 minutes to 15+. Another would be a
theoretical and as yet unimplemented --delete1 option to imapsync (more
elegant, but doesn't exist).

Any other suggestions? Will post summary back to group and sacrifice a
beer to the proper authority for any assistance.

  Réponse avec citation
Vieux 27/04/2006, 23h42   #2 (permalink)
Sam
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: imapsync two way synchronization of deletes and explunges

astan writes:

> Synopsis:
> I am using imapsync to synchronize two Courier IMAP servers for the
> purpose of having a local repository of all mail for my users. My
> problem is that deletes do not synchronize between the system.


> user deletes or expunges a message on mail2.example.com, it does not
> replicate that delete or expunge back to mail.example.com. Hence,
> deleted messages reappear magically several minutes after they are
> deleted. This makes users sad (confused, terrified, unable to cope...)


Well, what did you expect? When a specific message exists on one server,
but not on the other one, how do you expect an automated script to tell the
difference between this message being a newly-delivered message on the first
server, or the message getting deleted from the second server, instead? You
can certainly make an educated guess, based on some ancillary metadata, but
you cannot determine this with 100% certainty.

The only way to do this properly would be if the synchronization script,
itself, keeps an internal database of which messages should be on which
server, and I do not believe that imapsync does that.

> Any other suggestions?


Stop making your own life difficult. If you want to receive mail from the
Internet, then do exactly that: receive mail from the Internet. Don't have
it shipped off to some mysterious server out there, and then use some
hacked up script to try to download it from an external mail box.

Configure a real mail server, point the MXes to your machine, and move on
with your life. Why do you insist on making things more complicated than
they need to be?


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQBEUUjIx9p3GYHlUOIRAtHyAJ4xxGl9FUW7JLWXP9KZBh MG8sYKZACaA+/R
ElXFCG2eMUXliSry1LW6yvg=
=9vtl
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 28/04/2006, 07h30   #3 (permalink)
gilles.lamiral@laposte.net
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: imapsync two way synchronization of deletes and explunges

Hello aaron,

1) If you can remove the well transfered messages on host1 then use
the --delete --expunge1 options but REMOVE the --delete2 option
from your command line. This way the messages from host1 will be
transfered to host2 and removed from host1.

2) Instead of using the qad script adjust_time.pl you can can simply
use the option --syncinternaldates:

imapsync ... --delete --expunge1 --syncinternaldates

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 09h10.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09775 seconds with 11 queries