sending through JavaMail starts to fail after several hours
843830Jan 10 2007 — edited Jan 11 2007I have a strange problem send messages through JM.
I have two applications, running on Jboss, regularly sending messages to external domains through javamail. On application startup, both work absolutely fine, for several hours.
However, after a certain amount of time (have not been able to determine if this is fixed period of time, or certain number of sent messages), both applications cease successfully sending email, giving the exception (every time):
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 relay not permitted
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1047)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584)
at javax.mail.Transport.send0(Transport.java:169)
at javax.mail.Transport.send(Transport.java:98)
The mail server is postfix, running locally - so this is not the normal "not configured as relay" issue. When everything is working fine, the postfix logs contain mailing information, but once the failures begin, nothing is in the postfix logs at all. This leads me to think that the problem is in the java. Especially as restarting (or redeploying) the applications resolves the problem for another few hours.
Any ideas?
cheers
phil