Invalid Addresses sendmail exception

Asked by David Goldsmith on 18 May 2012
Latest activity Commented on by Walter Roberson on 23 May 2012

Hi! I'm having a new problem w/ sendmail, new in the sense that I've used sendmail many times before but have never experienced this problem 'til now. Back story: I recently learned that, without announcement, the address I'd been using for an SMTP server was removed about six months ago; I was given a "new," numerical (the old address had been a text alias) IP, which works fine in my Python apps without my having had to do anything other than simply swap out the old for the new. However, using it similarly with sendmail I now get:

Java exception occurred: 
javax.mail.SendFailedException: Invalid Addresses;
  nested exception is:
	com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for <un>@<my.domain>

with the "nested exception is:..." part repeated several times for each of the addresses I have in my cell array.

After a little searching online it sounds like my problem is most likely "Your smtp server forbids relaying, which is very common. Often a smtp server is configured to send only mails within the same domain without authentication." However, the sender address is also @<my.domain>--that's the same domain, yes? Is it possible that the way the javax.mail object is presenting the sender and recipient addresses to the smtp server is masking the fact that they're from the same domain? If so, workaround? Any other ideas? Thanks!

0 Comments

David Goldsmith

Products

No products are associated with this question.

1 Answer

Answer by Walter Roberson on 18 May 2012
Accepted answer

Go back to the basics. Telnet to the sendmail port on the new mail server and run a session by hand. Give a HELO line, then a MAIIL FROM command line, and then a RCPT TO command line, and see if you get rejected.

The relaying bit is about the domain that the server considers itself to be: it will not allow mail to be sent to what it thinks is a different domain than it is. For example if it knows itself as (say) wa.state.gov then it would think wa.gov as a destination was outside itself.

15 Comments

David Goldsmith on 22 May 2012

Perhaps that's why a whole day has passed and they have yet to respond to my ticket filed last Friday. ;-) I've got one more lead to run down before I give up (at least for today).

David Goldsmith on 23 May 2012

Yup, that was it, thanks for your help!

Walter Roberson on 23 May 2012

What was the solution eventually?

Walter Roberson

Contact us