Title: Message
We have (3) SA Boxes (2.6) running Mimedefang, fronting Exchange in all 3 of our offices.  One box is at our main office and receives all mail.  The other two offices send outbound mail through their own SA box, and receive mail if the main office is down.
 
Every night, we're running a perl script (attached) that copies the MySQL database and the bayes db files to the remote office servers.  The MySQL replication appears to be working properly as I can see whitelist/blacklist items being used on the remotes, but when mail comes into one of the remote office SA boxes, it doesn't appear that any of the bayes scores are being used.  I do see the scores being utilized quite often on spam coming in to my main SA box.
 
The config was set up by an integrator, as my Linux knowledge is somewhat limited.  Is there something missing here in getting the bayes to work on the remote boxes?
 
Thanks.
 
------------------------------------------------------------------------------
Mark A. Puchalski
Network Engineer
Honigman Miller Schwartz and Cohn LLP
 
Tel  313.465.7167
Fax 313.465.8267
 
*********************************************************************
Confidential: This electronic message and all contents
contain information from the law firm of Honigman Miller
Schwartz and Cohn LLP which may be privileged,
confidential or otherwise protected from disclosure.
The information is intended to be for the addressee
only. If you are not the addressee, any disclosure, copy,
distribution or use of the contents of this message is
prohibited. If you have received this electronic message
in error, please notify us immediately (313.465.7000)
and destroy the original message and all copies.
*********************************************************************
#!/usr/bin/perl

# Add all remote mail sites to the following array to include
# them in the sync process.  (And of course, configure ssh root
# equivalence from here to there.)
@REMOTE_SITES=("xxx.x.xxx.xxx", "xxx.x.xxx.xxx");

foreach $site (@REMOTE_SITES) {
    print "Syncing remote mail host $site", "\n";
    $login = 'root@' . "$site";
    $cmd = "cd /var; tar -cO sa-bayes --exclude=sa-bayes/.lock* | ssh $login 'tar 
--directory=/var -xp'";
    system($cmd);

    $cmd = "ssh $login 'rm -f /var/sa-bayes/.lock*'";
    system($cmd);
 
    # Transfer latest configuration changes
    $cmd = "scp /etc/mail/spamassassin/sa-mimedefang.cf $login:/etc/mail/spamassassin";
    system($cmd);

    # Transfer MySQL Preference data
    open SQL, ">/home/sa-spam/current-mysql-preferences.sql";
    print SQL "use spam;\n";
    print SQL "drop table userpref;\n";
    close(SQL);
    $cmd = "mysqldump spam >> /home/sa-spam/current-mysql-preferences.sql";
    system($cmd);
    $cmd = "scp /home/sa-spam/current-mysql-preferences.sql 
$login:/tmp/current-mysql-preferences.sql";
    system($cmd);
    $cmd = "ssh $login '/opt/mysql/bin/mysql -f < /tmp/current-mysql-preferences.sql'";
    system($cmd);

    # Final command, restart MIME-Defang with new options
    $cmd = "ssh $login 'nohup kickmime'";
    system($cmd);
}

Reply via email to