Get error "Deferred: Cannot assign requested address" when sending external mail via sendmail

Hello,

When I send an email through the Ubuntu terminal I get the following listing in the mailq.

OS - Ubuntu 8.04.1


Thanks for your help,

Drew
mAB00wcv011175        5 Mon Nov 10 19:00 <user1@internaldomain.com>
                 (Deferred: Cannot assign requested address)
                                         <user2@externaldomain.com>

Open in new window

drew17Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jar3817Commented:
What do you see in /var/log/maillog related to msgid mAB00wcv011175?

Smells like an IP address problem. Does this server have a static IP or does it get an address from DHCP? Do you have a line in your /etc/mail/sendmail.mc file that looks like something like this?

DaemonPortOptions=Port=smtp,Addr=a.b.c.d, Name=MTA

If so, is the Addr the same as the IP of the server? If so, try commenting that out and rebuilding the sendmail.cf file and restarting sendmail.
0
drew17Author Commented:
Thanks for your response, I was actually able to correct this issue.

However I have another issue that you may be able to help with. I am having trouble configuring sendmail to authenticate to an external smtp server. I want my server to relay messages to my ISP's mail server (outgoing only).

Thanks again for your response.
0
jar3817Commented:
Just set a smart_host and authinfo line in /etc/mail/sendmail.mc:

define(`SMART_HOST',`smtp-server.yourisp.com')
FEATURE(`authinfo',`hash -o /etc/mail/authinfo.db')

As for the auth, you'll need to create a file /etc/mail/authinfo:

AuthInfo:yourisp.com "U:usernameOrEmail" "P:password" "M:PLAIN"
AuthInfo: "U:usernameOrEmail" "P:password" "M:PLAIN"

Then just compile the authinfo.db file (on redhat/fedora/centos just run "make" in the /etc/mail folder) and restart sendmail.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Servers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.