
jms1 at jms1
Feb 11, 2010, 7:58 AM
Post #6 of 6
(1602 views)
Permalink
|
|
Re: Block Incoming from my Domain that is not local
[In reply to]
|
|
On 2010-02-05, at 1851, Michael R Marria wrote: > > It seems I should be able to dump, not accept or some way > eliminate mail from "mydomain.com" that is not originated from my server. > > Thus, email to my clients from support [at] mydomain should actually be from me, my server and I. > > Is there any easy way to divert this? this sounds like the problem that SPF tries to solve. i say "tries" to solve, because it's not a perfect solution... although it's a lot better than nothing. (1) make sure all of your users are using your server, with AUTH, in order to send their outbound mail. (2) make sure your qmail is patched with something which includes SPF functionality, so you can do SPF checks on the incoming messages. (3) set up an SPF record (which is a TXT record in your DNS data) which lists your server's IP as the only place from which your domain's mail should originate (i.e. make sure it ends with "-all".) (4) configure your qmail-smtpd service with "SPFBEHAVIOR=3", so any messages with "fail" results (i.e. the DNS record contains "-all" and the sending IP isn't listed in the record) will be rejected. if your users will always be coming from a specific IP range, you can also set up a tcpserver access control rule for that IP range which sets SPFBEHAVIOR="2" for that range, and the users won't need to do AUTH. this sill does the SPF checks and adds the headers to the messages, but it won't actually reject any messages, regardless of the result of the test. this is how i've been doing email for my own domain for several years, with good results (i no longer get spam with my own domain forged in the sender address, and anybody else in the world who does SPF checking and rejects messages with "fail" will also reject spam which claims to be from my domain.) of course it means i have to use my own server (or another machine listed in the SPF record) for my outbound mail, but to be honest i was doing that anyway, so it's not any great inconvenience for me. ---------------------------------------------------------------- | John M. Simpson --- KG4ZOW --- Programmer At Large | | http://www.jms1.net/ <jms1 [at] jms1> | ---------------------------------------------------------------- | http://video.google.com/videoplay?docid=-1656880303867390173 | ----------------------------------------------------------------
|