You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Sidney Zosa <si...@yahoo.com> on 2010/05/19 16:45:14 UTC

How to troubleshoot jspf throwing TempErrorException?

I apologize if my question is not very helpful. I only need a gentle nudge to the right direction.

My mailet that uses jspf was working fine, when suddenly it started throwing:
org.apache.james.jspf.exceptions.TempErrorException: Timeout querying dns
        at org.apache.james.jspf.policies.SPFRetriever.retrieveSpfRecord(SPFRetriever.java:91)
        at org.apache.james.jspf.policies.SPFRetriever.getSPFRecordOverride(SPFRetriever.java:49)
        at org.apache.james.jspf.policies.AbstractNestedPolicy.getSPFRecord(AbstractNestedPolicy.java:40)

I query a lot of dns and they used to reply fine so I don't think the problem is with them.


Thanks,
Sid



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: How to troubleshoot jspf throwing TempErrorException?

Posted by Stefano Bagnara <ap...@bago.org>.
> @Stefano
>
> I don't set my own DNS resolver.
> Here are the relevant lines:
>
>   Log4JLogger logger = new Log4JLogger(log4jlogger);
>   DNSServiceXBillImpl dns = new DNSServiceXBillImpl( logger );
>   SPF spf = new SPF( dns, logger );
>   SPFRetriever spfRetriver = new SPFRetriever(dns);
>
> The line that triggers the error:
>   SPF1Record spfRecord = spfRetriver.getSPFRecord( domain );
>
>
> For now, I will use our actual IP on dnsserver setting and see if it helps.
> Thanks you, guys.

If you don't provide a custom resolver then DNSServiceXBillImpl
doesn't know anything about the james dnsserver.
There's no relationship between james server dnsservers and jspf,
unless you create one.

You have some alternatives:
1) make sure your "host" dns works fine (usually dnsjava fallback to
/etc/resolv.conf servers on unix)
2) alter your mailet to take dns servers as mailet configuration
parameters and make sure to pass your own servers to the
DNSServiceXBillImpl
3) alter your mailet to lookup the james dnsservice (this is different
between james 2.3 and trunk) and write a jspf DNSservice backed by the
james DNSService (I've not investigated this)

Stefano

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: How to troubleshoot jspf throwing TempErrorException?

Posted by Sidney Zosa <si...@yahoo.com>.
@Norman

Both IPs look fine. Here are the results of dig:

# dig any 192.168.1.108

; <<>> DiG 9.5.0b1 <<>> any 192.168.1.108
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 60171
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;192.168.1.108.                 IN      ANY

;; AUTHORITY SECTION:
.                       9924    IN      SOA     a.root-servers.net. nstld.verisign-grs.com. 2010051900 1800 900 604800 86400

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Wed May 19 06:23:42 2010
;; MSG SIZE  rcvd: 106

# dig any 66.109.16.3

; <<>> DiG 9.5.0b1 <<>> any 66.109.16.3
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 56317
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;66.109.16.3.                   IN      ANY

;; AUTHORITY SECTION:
.                       9987    IN      SOA     a.root-servers.net. nstld.verisign-grs.com. 2010051900 1800 900 604800 86400

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Wed May 19 06:24:02 2010
;; MSG SIZE  rcvd: 104

However I found out we are using a different IP from the one set on our config.
Not sure if it's related but I'm going to try using our actual IP instead.


@Stefano

I don't set my own DNS resolver.
Here are the relevant lines:

   Log4JLogger logger = new Log4JLogger(log4jlogger);
   DNSServiceXBillImpl dns = new DNSServiceXBillImpl( logger );
   SPF spf = new SPF( dns, logger );
   SPFRetriever spfRetriver = new SPFRetriever(dns);

The line that triggers the error:
   SPF1Record spfRecord = spfRetriver.getSPFRecord( domain );


For now, I will use our actual IP on dnsserver setting and see if it helps.
Thanks you, guys.



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: How to troubleshoot jspf throwing TempErrorException?

Posted by Stefano Bagnara <ap...@bago.org>.
2010/5/19 Sidney Zosa <si...@yahoo.com>:
> My mailet that uses jspf was working fine, when suddenly it started throwing:

"My mailet". If your mailet uses jSPF you should tell us how you invoke jSPF.
If you don't provide jSPF your own DNS resolver then jSPF will use the
default dnsjava dns servers. dnsjava, by default, try to look at your
system dns server and does not care of your other james dnsserver
configuration.

Stefano

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Matcher for outgoing / incoming emails

Posted by Ranjib Dey <ra...@thoughtworks.com>.
you can keep the domain name separate from the code, using the init
parameters , by specifying them in the xml configuration file.
regards
ranjib

On Thu, May 20, 2010 at 9:22 AM, Gusnadi Kevin <gu...@ncs.com.sg> wrote:

> Hi All
>
> I would like to create a matcher for James2.3.2 .
>
> The matcher only to separate incoming and outgoing only .
>
> So if it's incoming email I want to execute mailet a , if it's outgoing
> email I wan to execute mailet b.
>
> I'm thinking of getting the sender/recipient address as string and then
> get the domain name . But my concern is if one day I change my domain
> name then I also will have to change my source code.
>
> So does any of you have any advice how to do this in more "elegant" way
> ? maybe an attributes that will provide more accurate information to
> differentiate incoming / outgoing mail ?
>
> Thanks and regards
> Kevin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

Matcher for outgoing / incoming emails

Posted by Gusnadi Kevin <gu...@ncs.com.sg>.
Hi All

I would like to create a matcher for James2.3.2 .

The matcher only to separate incoming and outgoing only .

So if it's incoming email I want to execute mailet a , if it's outgoing
email I wan to execute mailet b.

I'm thinking of getting the sender/recipient address as string and then
get the domain name . But my concern is if one day I change my domain
name then I also will have to change my source code.

So does any of you have any advice how to do this in more "elegant" way
? maybe an attributes that will provide more accurate information to
differentiate incoming / outgoing mail ?

Thanks and regards
Kevin

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: How to troubleshoot jspf throwing TempErrorException?

Posted by Norman Maurer <no...@apache.org>.
And the 2 servers work fine when trying to query them with for example
dig and nslookup ?

Bye,
Norman


2010/5/19 Sidney Zosa <si...@yahoo.com>:
> Hi Norman,
>
> Here it is:
>
> <dnsserver>
> <servers>
>  <!--Enter ip address of your DNS server, one IP address per server -->
>  <!-- element. -->
> <server>192.168.1.108</server>
> <server>66.109.16.3</server>
> </servers>
> <!-- Change autodiscover to false if you would like to turn off autodiscovery -->
> <!-- and set the DNS servers manually in the <servers> section -->
> <autodiscover>false</autodiscover>
> <authoritative>false</authoritative>
> </dnsserver>
>
>
> Thanks,
> Sid
>
>
>
>
> ----- Original Message ----
> From: Norman Maurer <no...@apache.org>
> To: James Users List <se...@james.apache.org>
> Sent: Wednesday, May 19, 2010 11:12:41 PM
> Subject: Re: How to troubleshoot jspf throwing TempErrorException?
>
> Hi Sidney,
>
> I'm talkin about the <dnsserver> block of the config.
>
> Could you show us the config ?
>
>
> Bye,
> Norman
>
>
> 2010/5/19 Sidney Zosa <si...@yahoo.com>:
>> Hi Norman,
>>
>> Thanks for replying promptly. I'm taking over an old setup and relatively new at this. Please bear with me.
>> By nameserver, I assume it is the same as servername.
>> My settings are:
>>        <servername>192.168.1.10</servername>
>>        <servername>localhost</servername>
>>        <servername>emailreach.com</servername>
>>
>> We're using emailreach.com so it should be usable.
>> Is there a way to find out if it does work for my setup?
>>
>>
>> Thanks,
>> Sid
>>
>>
>>
>>
>> ----- Original Message ----
>> From: Norman Maurer <no...@apache.org>
>> To: James Users List <se...@james.apache.org>
>> Sent: Wednesday, May 19, 2010 10:54:43 PM
>> Subject: Re: How to troubleshoot jspf throwing TempErrorException?
>>
>> Hi Sid,
>>
>> are you sure the nameserver specified in james config are still usable ?
>>
>> Thx,
>> Norman
>>
>>
>> 2010/5/19 Sidney Zosa <si...@yahoo.com>:
>>> I apologize if my question is not very helpful. I only need a gentle nudge to the right direction.
>>>
>>> My mailet that uses jspf was working fine, when suddenly it started throwing:
>>> org.apache.james.jspf.exceptions.TempErrorException: Timeout querying dns
>>>        at org.apache.james.jspf.policies.SPFRetriever.retrieveSpfRecord(SPFRetriever.java:91)
>>>        at org.apache.james.jspf.policies.SPFRetriever.getSPFRecordOverride(SPFRetriever.java:49)
>>>        at org.apache.james.jspf.policies.AbstractNestedPolicy.getSPFRecord(AbstractNestedPolicy.java:40)
>>>
>>> I query a lot of dns and they used to reply fine so I don't think the problem is with them.
>>>
>>>
>>> Thanks,
>>> Sid
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: How to troubleshoot jspf throwing TempErrorException?

Posted by Sidney Zosa <si...@yahoo.com>.
Hi Norman,

Here it is:

<dnsserver>
<servers>
 <!--Enter ip address of your DNS server, one IP address per server -->
 <!-- element. -->
<server>192.168.1.108</server>
<server>66.109.16.3</server>
</servers>
<!-- Change autodiscover to false if you would like to turn off autodiscovery -->
<!-- and set the DNS servers manually in the <servers> section -->
<autodiscover>false</autodiscover>
<authoritative>false</authoritative>
</dnsserver>


Thanks,
Sid




----- Original Message ----
From: Norman Maurer <no...@apache.org>
To: James Users List <se...@james.apache.org>
Sent: Wednesday, May 19, 2010 11:12:41 PM
Subject: Re: How to troubleshoot jspf throwing TempErrorException?

Hi Sidney,

I'm talkin about the <dnsserver> block of the config.

Could you show us the config ?


Bye,
Norman


2010/5/19 Sidney Zosa <si...@yahoo.com>:
> Hi Norman,
>
> Thanks for replying promptly. I'm taking over an old setup and relatively new at this. Please bear with me.
> By nameserver, I assume it is the same as servername.
> My settings are:
>        <servername>192.168.1.10</servername>
>        <servername>localhost</servername>
>        <servername>emailreach.com</servername>
>
> We're using emailreach.com so it should be usable.
> Is there a way to find out if it does work for my setup?
>
>
> Thanks,
> Sid
>
>
>
>
> ----- Original Message ----
> From: Norman Maurer <no...@apache.org>
> To: James Users List <se...@james.apache.org>
> Sent: Wednesday, May 19, 2010 10:54:43 PM
> Subject: Re: How to troubleshoot jspf throwing TempErrorException?
>
> Hi Sid,
>
> are you sure the nameserver specified in james config are still usable ?
>
> Thx,
> Norman
>
>
> 2010/5/19 Sidney Zosa <si...@yahoo.com>:
>> I apologize if my question is not very helpful. I only need a gentle nudge to the right direction.
>>
>> My mailet that uses jspf was working fine, when suddenly it started throwing:
>> org.apache.james.jspf.exceptions.TempErrorException: Timeout querying dns
>>        at org.apache.james.jspf.policies.SPFRetriever.retrieveSpfRecord(SPFRetriever.java:91)
>>        at org.apache.james.jspf.policies.SPFRetriever.getSPFRecordOverride(SPFRetriever.java:49)
>>        at org.apache.james.jspf.policies.AbstractNestedPolicy.getSPFRecord(AbstractNestedPolicy.java:40)
>>
>> I query a lot of dns and they used to reply fine so I don't think the problem is with them.
>>
>>
>> Thanks,
>> Sid
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: How to troubleshoot jspf throwing TempErrorException?

Posted by Norman Maurer <no...@apache.org>.
Hi Sidney,

I'm talkin about the <dnsserver> block of the config.

Could you show us the config ?


Bye,
Norman


2010/5/19 Sidney Zosa <si...@yahoo.com>:
> Hi Norman,
>
> Thanks for replying promptly. I'm taking over an old setup and relatively new at this. Please bear with me.
> By nameserver, I assume it is the same as servername.
> My settings are:
>        <servername>192.168.1.10</servername>
>        <servername>localhost</servername>
>        <servername>emailreach.com</servername>
>
> We're using emailreach.com so it should be usable.
> Is there a way to find out if it does work for my setup?
>
>
> Thanks,
> Sid
>
>
>
>
> ----- Original Message ----
> From: Norman Maurer <no...@apache.org>
> To: James Users List <se...@james.apache.org>
> Sent: Wednesday, May 19, 2010 10:54:43 PM
> Subject: Re: How to troubleshoot jspf throwing TempErrorException?
>
> Hi Sid,
>
> are you sure the nameserver specified in james config are still usable ?
>
> Thx,
> Norman
>
>
> 2010/5/19 Sidney Zosa <si...@yahoo.com>:
>> I apologize if my question is not very helpful. I only need a gentle nudge to the right direction.
>>
>> My mailet that uses jspf was working fine, when suddenly it started throwing:
>> org.apache.james.jspf.exceptions.TempErrorException: Timeout querying dns
>>        at org.apache.james.jspf.policies.SPFRetriever.retrieveSpfRecord(SPFRetriever.java:91)
>>        at org.apache.james.jspf.policies.SPFRetriever.getSPFRecordOverride(SPFRetriever.java:49)
>>        at org.apache.james.jspf.policies.AbstractNestedPolicy.getSPFRecord(AbstractNestedPolicy.java:40)
>>
>> I query a lot of dns and they used to reply fine so I don't think the problem is with them.
>>
>>
>> Thanks,
>> Sid
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: How to troubleshoot jspf throwing TempErrorException?

Posted by Sidney Zosa <si...@yahoo.com>.
Hi Norman,

Thanks for replying promptly. I'm taking over an old setup and relatively new at this. Please bear with me.
By nameserver, I assume it is the same as servername.
My settings are:
        <servername>192.168.1.10</servername>
        <servername>localhost</servername>
        <servername>emailreach.com</servername>

We're using emailreach.com so it should be usable. 
Is there a way to find out if it does work for my setup?


Thanks,
Sid




----- Original Message ----
From: Norman Maurer <no...@apache.org>
To: James Users List <se...@james.apache.org>
Sent: Wednesday, May 19, 2010 10:54:43 PM
Subject: Re: How to troubleshoot jspf throwing TempErrorException?

Hi Sid,

are you sure the nameserver specified in james config are still usable ?

Thx,
Norman


2010/5/19 Sidney Zosa <si...@yahoo.com>:
> I apologize if my question is not very helpful. I only need a gentle nudge to the right direction.
>
> My mailet that uses jspf was working fine, when suddenly it started throwing:
> org.apache.james.jspf.exceptions.TempErrorException: Timeout querying dns
>        at org.apache.james.jspf.policies.SPFRetriever.retrieveSpfRecord(SPFRetriever.java:91)
>        at org.apache.james.jspf.policies.SPFRetriever.getSPFRecordOverride(SPFRetriever.java:49)
>        at org.apache.james.jspf.policies.AbstractNestedPolicy.getSPFRecord(AbstractNestedPolicy.java:40)
>
> I query a lot of dns and they used to reply fine so I don't think the problem is with them.
>
>
> Thanks,
> Sid
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: How to troubleshoot jspf throwing TempErrorException?

Posted by Norman Maurer <no...@apache.org>.
Hi Sid,

are you sure the nameserver specified in james config are still usable ?

Thx,
Norman


2010/5/19 Sidney Zosa <si...@yahoo.com>:
> I apologize if my question is not very helpful. I only need a gentle nudge to the right direction.
>
> My mailet that uses jspf was working fine, when suddenly it started throwing:
> org.apache.james.jspf.exceptions.TempErrorException: Timeout querying dns
>        at org.apache.james.jspf.policies.SPFRetriever.retrieveSpfRecord(SPFRetriever.java:91)
>        at org.apache.james.jspf.policies.SPFRetriever.getSPFRecordOverride(SPFRetriever.java:49)
>        at org.apache.james.jspf.policies.AbstractNestedPolicy.getSPFRecord(AbstractNestedPolicy.java:40)
>
> I query a lot of dns and they used to reply fine so I don't think the problem is with them.
>
>
> Thanks,
> Sid
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org