cancel
Showing results for 
Search instead for 
Did you mean: 

sendmail problem

Ricardo Macedo
Occasional Advisor

sendmail problem

I´m having sendmail problems ...

Have tried multiple configurations of the sendmail.cf

When testing I got the error message below:

#
# /usr/sbin/sendmail -bv -v -oL10 rhicardo@gmail.com
sh: gmail.com: not found.
#
#

But when I do nslookup, I can resolve the name:

#
# nslookup gmail.com
*** Can't find server name for address 127.0.0.1: No response from server
Name Server: brns1.br-petrobras.com.br
Address: 172.31.9.230

Trying DNS
Non-authoritative answer:
Name: gmail.com
Address: 216.239.57.107

#

Anyone can help me please?
Ricardo Macedo
9 REPLIES
someone_4
Honored Contributor

Re: sendmail problem

What does /etc/nsswitch.conf look like?

hosts: files [NOTFOUND=continue TRYAGAIN=continue UNAVAIL=continue] dns


and /etc/resolv.conf?

Richard
someone_4
Honored Contributor

Re: sendmail problem

I cant duplicate your error message.

For some reason i dont think it is sendmail related.

because the

sh: gmail.com: not found.

error only happends when you try to run a commmand. And the command does not exist in your path.

have you tried with any other domains?

or just

sendmail -v rhicardo@gmail.com

Richard


Ricardo Macedo
Occasional Advisor

Re: sendmail problem


Richard thanks for your help

=============================
/etc/nsswitch.conf
=============================
passwd: files
group: files
hosts: dns [notfound=continue tryagain=continue unavail=continue] files
networks: files
protocols: files
rpc: files
ethers: files
netmasks: files
bootparams: files
publickey: files
# At present there isn't a 'files' backend for netgroup; the system will
# figure it out pretty quickly, and won't use netgroups at all.
netgroup: files
automount: files

=============================
/etc/resolv.conf
=============================
domain br-petrobras.com.br
nameserver 127.0.0.1
nameserver 172.31.9.230
nameserver 172.31.9.231
#
Ricardo Macedo
Ricardo Macedo
Occasional Advisor

Re: sendmail problem


Richard,

Yes, I´ve tried others domains and got the same error.

#
# sendmail -v rhicardo@gmail.com
sh: gmail.com: not found.
#
#

It´s hard to find a way to so
Ricardo Macedo
someone_4
Honored Contributor

Re: sendmail problem

Hi Ricardo

From your last post it does not look like a sendmail issue.

sendmail -v user@domain.com

should return a line to write an email.


just wondering but what do you get when you do


echo "test" | sendmail -v rhicardo@gmail.com

Or

vi smfile

and put the mail info in there.

To:rhicardo@gmail.com
Subject: test
data
blah blah

cat smfile | sendmail -t


what I would like to see is what happens when sendmail is not the first command and what happends when we take out the user@domain out of the command line string.

Richard



Craig Rants
Honored Contributor

Re: sendmail problem

Try taking nameserver 127.0.0.1 out of your /etc/resolv.conf file.

GL,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Geoff Wild
Honored Contributor

Re: sendmail problem

Make sure FQDN is in /etc/hosts for your server:

X.X.X.X yourserver yourserver.yourdomain.com

Where is your sendmail?

which sendmail

Do a what on it or a:

sendmail -d0.1 < /dev/null | grep -i version

Rgds...Geoff




Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Ricardo Macedo
Occasional Advisor

Re: sendmail problem



Hi everyone !!

The problem is solved!!

In my configuration of stty (stty -a), the "kill" parameter was "@", I changed to "^U".

Can you believe it?

Thank you very much for all your help.
Ricardo Macedo
Muthukumar_5
Honored Contributor

Re: sendmail problem

/usr/sbin/sendmail -bv -v -oL10 rhicardo@gmail.com -->

Because of not setting terminal type spefication for @ character it is prompting the contents after it as new command.

Try to set to eol on stty as,

stty eol "^@"

And try to put this on root user profile and /etc/profile for normal users to get rid of this problem for ever.
Easy to suggest when don't know about the problem!