[Mimedefang] MX resolves to localhost

Matthew.van.Eerde at hbinc.com Matthew.van.Eerde at hbinc.com
Mon Aug 16 17:03:39 EDT 2004


Mike Batchelor wrote:
> I want to reject mail for domains that resolve to 127.0.0.1 or that
> have MX records with hostnames that resolve to 127.0.0.1

? Do you mean you have relay_based_on_MX turned on and email to these domains is being accepted?  Solution: turn off relay_based_on_MX.

Or do you mean you are accepting MAIL FROM: bad.example.com, and bad.example.com has MX 127.0.01?

If so, some kind of verify-sender algorithm could help.  When you get
MAIL FROM: joe at example.com
connect to the mail servers of example.com and try to
MAIL FROM: <>
RCPT TO: joe at example.com

If this is rejected, then you in turn reject the MAIL FROM: with a 5xx Sorry, if joe at example.com doesn't want to receive mail from <>, I don't want mail from him.

The theory goes that if bad.example.com goes to 127.0.0.1, then your test of RCPT TO: joe at bad.example.com will be against localhost - and localhost should certainly deny this as it would be an open relay otherwise.

Matthew.van.Eerde at hbinc.com                      805.964.4554 x902
Hispanic Business Inc./HireDiversity.com         Software Engineer
perl -e"map{y/a-z/l-za-k/;print}shift" "Jjhi pcdiwtg Ptga wprztg,"



More information about the MIMEDefang mailing list