While looking at ways to better handle policy selection for users, from a GUI standpoint, I was also experimenting with sql_select_policy's
(I could never get it to work the way I wanted to, but) During testing, I was adding 'limit 1' to query. Does that help? With my background in real-time, embedded systems, I can't help to think that it would have to. Example: default from amavisd.conf-default: $sql_select_policy = 'SELECT *,users.id'. ' FROM users LEFT JOIN policy ON users.policy_id=policy.id'. ' WHERE users.email IN (%k) ORDER BY users.priority DESC'; Adding limit 1: sql_select_policy = 'SELECT *,users.id'. ' FROM users LEFT JOIN policy ON users.policy_id=policy.id'. ' WHERE users.email IN (%k) ORDER BY users.priority DESC limit 1'; If there were four or more policies available (@. @domain.com user [EMAIL PROTECTED]). It will sort first, and instead of sending back 4 policies (which amavisd-new only takes the first one anyway), why not just limit it to the first one in the sort order anyway? Maybe this isn't THAT much of a change, but in a situation where you have 70,000 users in the users table, and 70,000 policies, might it not help? -- Michael Scheidell, CTO SECNAP Network Security Corporation See us in Atlanta at SecureWorld: http://www.secnap.com/events ________________________________________________________________________ _ This email has been scanned and certified safe by SpammerTrap(tm). For Information please see http://www.spammertrap.com ________________________________________________________________________ _ _________________________________________________________________________ This email has been scanned and certified safe by SpammerTrap(tm). For Information please see http://www.spammertrap.com _________________________________________________________________________ ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ AMaViS-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/
