That is right, I got confused by the senderAddress.getHost(). I though
it was a reverse lookup. Thank you for clarifying. I'm a big fan of this
feature.

Paul

-----Original Message-----
From: Norman Maurer [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 10, 2006 11:03 AM
To: Boomgaart, Paul
Cc: [email protected]
Subject: Re: Question on : [jira] Commented: (JAMES-465) Check for
validsender domain in mail from

I don't understand your question. The check test if the domainpart of
the emailaddress as a valid mx record. Maybe you just get confused by
the senderAddress.getHost(); ? 
if senderAddress = [EMAIL PROTECTED] then senderAddress.getHost() =
byteaction.de .. Maybe the getHost is a bit confusing it would be better
undetstable if it would be called getDomain or something like that..

So this patch did what you want or im wrong ?

bye

Am Montag, den 10.04.2006, 10:53 -0500 schrieb Boomgaart, Paul:
> Norman,
> 
> I'm very excited by this feature and any other feature that allow for
> delivery failure of spam notification during the SMTP handshake.
> 
> Given this implementation:
> if (checkValidSenderDomain == true) {
> +     
> +                // Maybe we should build a static method in
> org.apache.james.dnsserver.DNSServer ?
> +                Record[] records;
> +                
> +                try {
> +                    records = new Lookup(senderAddress.getHost(),
> Type.MX).run();
> +                    getLogger().info("rec: "+ records);
> +                    if (records == null) {
> +                        badSenderDomain = true;
> +                    }
> +                } catch (TextParseException e) {
> +                    // no validdomain
> +                    badSenderDomain = true;
> +                }
> +                
> +                // try to resolv the provided domain in the
> senderaddress. If it can not resolved do not accept it.
> +                if (badSenderDomain) {
> +                    responseString = "501
>
"+DSNStatus.getStatus(DSNStatus.PERMANENT,DSNStatus.ADDRESS_SYNTAX_SENDE
> R)+ " sender " + senderAddress + " contains no valid domain";
> +                    session.writeResponse(responseString);
> +                    getLogger().info(responseString);
> +                }
> +            }
> 
> Question:
> Would it be possible to have the resulting records matched against the
> mail sender's reported address?
> 
> Here is the use case I was thinking off:
> Is someone is using an open relay to spam my server, and that open
relay
> is using one of the bigger ISP (Like Roadrunner etc), then the DNS
> lookup will work, because they will get an address like:
> user.24.63.45.10.rr.com. 
> 
> Now if the sender's email was fabricated
> ([EMAIL PROTECTED]) pleasebymoreuselessstuff.com
would
> not match user.24.63.45.10.rr.com, and we could refuse the SMTP
> transaction.
> 
> Paul
> 
> 
> 
> -----Original Message-----
> From: Norman Maurer (JIRA) [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, April 09, 2006 12:20 PM
> To: [email protected]
> Subject: [jira] Commented: (JAMES-465) Check for valid sender domain
in
> mail from
> 
>     [
>
http://issues.apache.org/jira/browse/JAMES-465?page=comments#action_1237
> 3784 ] 
> 
> Norman Maurer commented on JAMES-465:
> -------------------------------------
> 
> Maybe you want to mark it as resolved. cause you commited it ..
> 
> > Check for valid sender domain in mail from
> > ------------------------------------------
> >
> >          Key: JAMES-465
> >          URL: http://issues.apache.org/jira/browse/JAMES-465
> >      Project: James
> >         Type: New Feature
> 
> >     Reporter: Norman Maurer
> >     Assignee: Stefano Bagnara
> >  Attachments: MailCmdHandler-Resolv-Fixed.patch,
> MailCmdHandler-Resolv-V2.patch, MailCmdHandler-Resolv.patch,
> SMTPServerTest-Resolv.patch, SMTPTestConfiguration-Resolv.patch,
> james-config.xml-Resolv.patch
> >
> > I wrote a patch to support checking for resolvable domain in sender
> before accept "mail from:"
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to