At my domain we get a lot of dictionary attacks(spammers try to send to everyoneUnderTheSun@mydomain.com
). I set up the getadsmtp.pl script - it fetches all valid email addresses from an exchange server over LDAP, and these are used in the relay_recipient_maps table. It worked great, but I wanted something more...
I wanted to integrate the user-list with DSPAM's webUI(for authentication), and afaik to avoid same-system duplication, I'd have to move this list to mysql.... so I installed the postfix-mysql package, created a database for users/passwords(encrypted), and changed my postfix install accordingly:
old main.cf line:
relay_recipient_maps = hash:/etc/postfix/exchange_recipients
contents of /etc/postfix/mysql-recipients.cf:
user = mail_admin
password = ********
dbname = mail
query = SELECT email FROM users WHERE email='%s'
hosts = 127.0.0.1
It works for the relay_recipient_maps purpose, and presumably I can rig it to do the authentication for the DSPAM WebUI, but here's my question: Will it run this mysql query EVERY time an email comes in? and will this tax the system too much? I cron'd the getadsmtp.pl script, but it was pulling certain addresses that I wanted to keep internal, so I'd have to manually prune the list every time I ran the script, impossible if its cron'd to run every hour so not really an option. Has anyone tried any of this this? Are there any other options out there? I'm still kindof a noob....