From: Scott Hughes [mailto:[email protected]]
Sent: Monday, April 18, 2011 2:51 PM
To: [email protected]
Subject: [qmailtoaster] Replication
This must just be my weekend and week for email fun!
This weekend I spent both days setting up a second email server and getting
replication going per Jake's video. Mostly went well, but I did have some
issues with Unison. I had to run it multiple times for it to sync all of
the domains/users/email over to the new server.
Now I notice that the Unison is having issue sync'ing up some of the Dovecot
files. Examples would be: dovecot-uidlist / dovecot.index.cache /
dovecot.index.log
I notice that this happens in multiple areas of the users email accounts.
For example: /Maildir, /Maildir/.Deleted Items, /Maildir/.INBOX.Sent,
/Maildir/.INBOX.Trash, etc
Anyone have any ideas on why these Dovecot files would be causing a sync
issue? I don't recall this the first time I built a replicating server, but
that was on Courier not Dovecot.
On another note, I also question if my script file (sync-qmail) with all the
unison commands is actually running or not. I see it firing off every 10
minutes in the cron log, but when I run 'top' I do not see unison running.
If I fire off the sync-qmail from the command line it runs for about 3
minutes and I can see it using top. I am sure I am missing something here.
Here is some more information about the strange cron issue I seem to have.
I watched the cron log AND ran top at the same time and when cron supposedly
fired off Unison, I never saw it run.
Here is what I have in my crontab (I took out the ">/dev/null 2>/dev/null"
in the second line to see if I could get output in the cron log - no luck):
17 2 * * * pyzor discover
00 01 * * * /usr/sbin/qtp-backup
10 16 * * * /etc/webmin/cron/tempdelete.pl #Delete Webmin temporary files
0-59/5 * * * * /usr/local/sbin/dovecot-check 2>&1 > /dev/null
# */10 * * * * root /usr/local/sbin/sync-qmail >/dev/null 2>/dev/null
*/10 * * * * root /usr/local/sbin/sync-qmail
And here is my 'sync-qmail' script:
#!/bin/sh
/usr/bin/unison /home/vpopmail/domains
ssh://66.255.244.211:11122///home/vpopmail/domains/ -owner -group -batch
-terse
/usr/bin/unison /var/qmail/control
ssh://66.255.244.211:11122///var/qmail/control/ -owner -group -batch -terse
/usr/bin/unison /var/qmail/users
ssh://66.255.244.211:11122///var/qmail/users/ -owner -group -batch -terse
/usr/bin/unison /etc/tcprules.d ssh://66.255.244.211:11122///etc/tcprules.d/
-owner -group -batch -terse
/usr/bin/unison /etc/httpd ssh://66.255.244.211:11122///etc/httpd/ -owner
-group -batch -terse
/usr/bin/unison /etc/mail ssh://66.255.244.211:11122///etc/mail/ -owner
-group -batch -terse
/usr/bin/unison /opt/spamdyke/etc
ssh://66.255.244.211:11122///opt/spamdyke/etc/ -owner -group -batch -terse
/usr/bin/unison /var/lib/squirrelmail/prefs
ssh://66.255.244.211:11122///var/lib/squirrelmail/prefs/ -owner -group
-batch -terse
I can't figure out where I am going wrong in this. Seems like it should
work just fine.
Scott