Derrick T. Woolworth wrote:
I'm strongly considering writing a courierfilter that will do the following:

1. For routed domains/hosts, check a database for valid users and reject if the incoming message isn't to a valid user. Make the filter logs the rejection in a way I can parse it from the logs.

You don't need a courierfilter for that. Use the database of valid addresses, and build an alias file that redirects them to their destinations. Make those routed domains "hosteddomains". Courier will reject invalid recipients immediately, and presumably, you are already looking at those messages in the logs, so you don't need to extend what you're already doing.

2. Write an external program that will monitor the logs - and actually I'll just have syslog write to my program which will then write the logs into /var/log/maillog - but take this log output, parse it, and when a remote host is obviously interrogating or trying some dictionary of names against a domain I host, I'll have the system add the remote hosts IP to smtpaccess.

It's almost certainly more reliable and less programming to simply watch the log file that syslog is writing, rather than intercepting the data in that way.




-------------------------------------------------------
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
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to