I wanted to allow for my server to send mail via direct SMTP connections
locally but still block other servers that claim to be one of my local
domains, so I wrote a plugin to do this, which can be seen at
https://svn.urth.org/svn/qpsmtpd-plugins/trunk/check_forged_local_domain
One thing that would make this nicer would be if the server knew what IP
addresses it is listening on. Unfortunately, this information is not
passed from the daemon-running script into the main code.
I don't know if this is possible, though. For now, the plugin relies on an
additional config file, localips, to determine what ip addresses the
server listens on.
I've been running this in production here on urth.org for a while, and
haven't heard any complaints of unfairly bounced mail, so if others want
to try it out, here you go.
If you want to test it out, you can just comment out the "return DENY"
line and run with debug logging on to see what it does.
On a side note, it'd be nice to be able to turn on debug logging per
plugin, and it'd be nice if all plugins supported a "tell me what you
would do but do not do it" mode so people could install them and see what
effect they'd have if they were doing what they say they'd do ;)
-dave
/*===================================================
VegGuide.Org www.BookIRead.com
Your guide to all that's veg. My book blog
===================================================*/