Hi all,
Quoting Milton Cyrus <[EMAIL PROTECTED]>: > Has anyone tried multiple Amavisd-new instances storing data in one > mysql database.. I am working on a setup like this and just wanted to > know if it would fly.. I've got exactly this running happily at the moment. Two amavis/exim/SA servers are pointed to one central MySql server. Both exim mail routing and SA bayes use mysql - and we are using Linux/HA between the two servers for failover. It has been running quite happily for the past 4 months handling around 600 messages/day with no problems to report. Two good points you make: > 1: is "mail_id" Unique -- and what happens if amavisd-new tries to > store a message in de DB and there's allready a message with that > mail_id I've assumed that there is enough entropy in the mail_id generation routine that this isn't a problem. mail_id is also set as a primary key - therefore has to be unique within the msgs table. MySql will throw an error if you try to add a second message with the same mail_id. Without looking at the code, I don't know how this is handled internally within amavis - ie whether a check is done before an insert occurs. Mark or someone will be able to confirm this. > 2. run-time collisions when adding entries to MADDR, Each message insert locks the maddr table - meaning that there is no chance of a collision happening at this level. Only one message can access the table at a time - other transactions get queued and have to wait their turn. There is no possible way for a collision to happen. The id field is also acting as primary key - meaning that no two recipients can have the same id value. My 2c Richard ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ AMaViS-user mailing list AMaViS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/