Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

am using the sendmail to send an email and configure it as the following :
/etc/mail/sendmail.mc

define(`SMART_HOST',`smtp-server')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
FEATURE(`authinfo',`hash /etc/mail/authinfo')dnl

/etc/mail/authinfo

AuthInfo:smtp-server "U:username@host.com" "P:password" "M:PLAIN"

after that i run the following command :
$ m4 sendmail.mc >sendmail.cf
$ makemap hash authinfo < authinfo
$ /etc/init.d/sendmail restart

and test it with :
/usr/sbin/sendmail -v mabdalmahdi@gmail.com < body.txt

but still cant receive any email ?? and i got the following error

Deferred: Name server:smtp-server-name: host name lookup failure <br>

i tried i can ping to the smtp server , and i run the command dig smpt-server-name
i cant see any thing wrong ... why i got this message and cant revise an email.

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

Try:

define(`SMART_HOST',`[smtp-server]')dnl

It should turn off lookups for MX records. If it does not help try Ipv4 address inside square brackets.

share|improve this answer
    
you are right ... and the ISP was block the smtp port :) ... –  moata_u Apr 9 '13 at 17:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.