Article delegate-en/3460 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A3459@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: SPAM blocking by DeleGate (Re: delegate rejects domains not in the list)
08 Aug 2006 03:26:44 GMT feedback@delegate.org (Yutaka Sato)
The DeleGate Project


Hi,

In message <_A3459@delegate-en.ML_> on 08/08/06(12:01:10) I wrote:
 |In message <_A3458@delegate-en.ML_> on 08/08/06(01:27:31)
 |you Martin Papadopoulos <payeabdyi-mnhltat5ynjr.ml@ml.delegate.org> wrote:
 | |it would be awesome if you could implement an smtp reject for non mx
 | |servers.
 | |i mean that if the reverse lookup entry does not contain a valid MX
 | |record, or
 | |to satisfy scenario of multiple mx records on one IP to checkout the
 | |helo domain if it has
 | |an mx record.
 | |
 | |it is only a request though.
 |
 |Doing access control based on the (existence of) MX record seems useful
 |and I'll support it in the next release.

I tested an extenstion like the enclosed patch with a parameter as follows:

  RELIABLE="_MX.*"

It seems working as I expected to reject hosts without a MX record.
It will be able to be extended to "with A", "with AAAA", "with PTR" or so.

Cheers,
Yutaka
--
  9 9   Yutaka Sato <y.sato@delegate.org> http://delegate.org/y.sato/
 ( ~ )  National Institute of Advanced Industrial Science and Technology
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
Do the more with the less -- B. Fuller


*** ../arc/delegate9.2.4-pre12/src/hostlist.c	Mon Jul 24 12:05:28 2006
--- src/hostlist.c	Tue Aug  8 12:15:43 2006
***************
*** 759,764 ****
--- 759,771 ----
  			goto ACCUM;
  		}
  
+ 		if( strncaseeq(hostpat,"_mx",3) ){
+ 			CStr(mx,MaxHostNameLen);
+ 			sprintf(mx,"-MX.%s",hostname);
+ 			match = hostIsResolvable(mx);
+ 			Verbose("[%d/%d] _MX ? %s\n",hi,nhosts,mx);
+ 			goto ACCUM;
+ 		}
  		if( HostOnClientside(hostpat) ){
  			Verbose("[%d/%d] -C (ClientHost) = %s\n",hi,nhosts,
  				inAddr(&ClientsideHost));

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V