Rick Roe wrote:
I get a lot of spam whose From addresses are users that don't exist on
my system (random names like [EMAIL PROTECTED], [EMAIL PROTECTED], etc).
I recently set up a scheme to manually blacklist all From addresses on
my domains and un-blacklist the fifty or so "real" addresses mail can
legitimately come from (the system aliases like postmaster, daemon,
and so forth, and a small handful of real users each with a handful of
aliases), using blacklist_from and unblacklist_from in the local
config file.
when you say "From addresses", do you mean envelope senders or From headers?
- if envelope senders, configure your MTA to reject such mail. In postfix,
smtpd_recipient_restrictions =
...
reject_unlisted_sender
...
will do. similar checks are available in other open source MTAs.
- if From headers, then whether to reject at MTA time or not is your
choice. purists don't like rejecting based on headers unless they break
smtp rules, which is not the case here. with postfix, you'd need a
policy_service (or a milter) or a proxy_filter (header checks won't help
as you can't list all invalid addresses).
This is a rather fragile system, though -- anytime I go to add any new
users or aliases, I'll have to edit my local.cf files to match. My
user population is rather static, so it's not a big deal, but it seems
like there should be a simpler, more automatic way to do this. Am I
missing something?
write a script to update the rule file, and make it called by your user
creation tool.