|
|
|
|
||||||
| comp.mail.imap Discussion of IMAP-based mail systems. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 (permalink) |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#2 (permalink) |
|
Messages: n/a
Hébergeur: |
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----- |
|
|
|
#3 (permalink) |
|
Messages: n/a
Hébergeur: |
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 |
|
![]() |
| Outils de la discussion | |
|
|