some strange behavior with mxsync
2005-09-28 by Fredrik Nyberg DC
I am testing the mxsync function and it is stable, but I have some discrepancies in the databases. If a host that is currently in the database, either greylisted or auto-whitelisted, and is deemed ok for auto-whitelisting AND the host is NOT the same as before BUT in the same D-class network (I use subnetmatch /24) the following happens: server_1 updates its database correctly, but does not update the IP, since it matches the subnetmatch. server_2, which we are syncing to, writes a new entry with the current IP and does NOT remove the old entry which matches the subnetmatch. Please note that server_2 does no actual work, it only recieves mxsync-data. An example: maillog: Sep 27 11:17:30 milter-greylist: j8R8HUIk007657: addr 85.37.17.69 from <community@...> rcpt <XXXXX@...>: autowhitelisted for more 864:00:00 Sep 27 11:17:30 milter-greylist: (mxsync): addr 85.37.17.69 from <community@...> rcpt <XXXXX@...>: autowhitelisted for 864:00:00 server_1: dump.server_1:85.37.17.70 <community@...> <XXXXX@...> 1130919450 AUTO # 2005-11-02 10:17:30 server_2: dump.server_2:85.37.17.69 <community@...> <XXXXX@...> 1130919450 AUTO # 2005-11-02 10:17:30 dump.server_2:85.37.17.70 <community@...> <XXXXX@...> 1129999192 AUTO # 2005-10-22 19:39:52 Could it be that mxsyncing does not check for subnetmatch? I will try to look at the code myself, but any help would be appreciated. Another thing: it seems to me that the database is not flushed to disk on exit. atexit is used, but it's manpage says it needs exit() or a return from main() to be run. The current init.d script for redhat uses killproc to kill the process, should perhaps a signalhandler be used instead of atexit? Thanks again, Fredrik Nyberg