I can't get sendmail to stop considering itself as localhost.localdomain

 
Thread Tools Search this Thread
Special Forums UNIX and Linux Applications I can't get sendmail to stop considering itself as localhost.localdomain
# 1  
Old 02-13-2013
I can't get sendmail to stop considering itself as localhost.localdomain

Hi,
I am tearing my hair out, here. We have a CentOS 4.7 box running sendmail 8.13.1.

I can't send e-mail out from that box to anywhere not on localhost, as I keep getting the error 'DSN Data Format error', and 'A real domain name is required to send e-mail'.

I have edited the /etc/mail/sendmail.mc file as such:

LOCAL_DOMAIN(`localhost.localdomain')dnl
MASQUERADE_AS(`my.companyname.com')dnl
MASQUERADE_DOMAIN(`my.companyname.com')dnl

I then do

Code:
m4 /etc/mail/sendmail.mc >  /etc/mail/sendmail.cf

I then restart sendmail..

Code:
/etc/init.d/sendmail restart

And I do..

Code:
/usr/lib/sendmail -d0.12 < /dev/null

.. and there, right at the bottom, is ..

====== SYSTEM IDENTITY (after readcd) =======
(short domain name) $w = localhost
(canonical domain name) $j = localhost.localdomain
(subdomain name) $m = localdomain
(node name) $k = name_of_the_host
==================================

I even tried going into sendmail.cf, searching for $w and entering my domain name after it, and then restarting sendmail. No luck.

I am going insane. Please help. :-(
# 2  
Old 02-13-2013
I think sendmail gets a domain name (or first item in search list) from /etc/resolv.conf,
and a hostname from /etc/hosts, where the hosts: line in /etc/nsswitch.conf matters.
It will certainly succeed when
Code:
getent hosts `hostname`

returns a FQDN.
Maybe you should not override that with localhost.localdomain...
# 3  
Old 03-07-2013
Quote:
Originally Posted by MadeInGermany
I think sendmail gets a domain name (or first item in search list) from /etc/resolv.conf,
and a hostname from /etc/hosts, where the hosts: line in /etc/nsswitch.conf matters.
It will certainly succeed when
Code:
getent hosts `hostname`

returns a FQDN.
Maybe you should not override that with localhost.localdomain...
Sorry to get back to you so late. Nope, the box is still sending e-mails as 'localhost.localdomain', despite the fact that there is not a single instance of that word anywhere in /etc/mail.

HELP!!
# 4  
Old 03-07-2013
That means the command returned an FQDN,
and you have omitted
Code:
LOCAL_DOMAIN(`localhost.localdomain')dnl

and built a new sendmail.cf?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cannot find localhost

I get a "not found" error from this localhost/choice.php ethan@meow:~$ ping 127.0.0.1 PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.025 ms 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.036 m and this ethan@meow:~$ mysql -u... (4 Replies)
Discussion started by: Meow613
4 Replies

2. Solaris

Clarifying sendmail configuration - sendmail-client offline

Hi all, I have read about sendmail running as 2 separate process. 1 as a MSP, and the other as the real daemon or MTA. In my current configuration, the sendmail-client is disabled. Both submit.cf and sendmail.cf are left as default untouch I do not specified any mailhost... (3 Replies)
Discussion started by: javanoob
3 Replies

3. Debian

Waiting for localhost.

I am getting the message - waiting for localhost. Here are some diagnostic steps I have tried .... root@meow:/home/ethan# cat /var/www/cgi-bin/httpd.conf ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/jkj ServerName 127.0.0.1:80 Listen xx.xx.xx.xx:80 Listen 127.0.0.1:80 ... (1 Reply)
Discussion started by: Meow613
1 Replies

4. Red Hat

Delay in sending email to-from localhost in Sendmail

Hi Friends, I am very much new to sendmail or any other mta. I just installed sendmail 8.14 on my rhel6 machine. I was trying to send email to local user but after entering the message when i press CTRL-D it simply hangs. I also tried sending email via mutt but again mutt also hangs. It sends... (0 Replies)
Discussion started by: Rohit Bhanot
0 Replies

5. UNIX for Advanced & Expert Users

DIG uses localhost

Hi, I have these entries in the /etc/esolv.conf: ------------ domain xxxxxx search yyyyyy nameserver 127.0.0.1 nameserver aaaaaaaaaaaaaaaa nameserver bbbbbbbbbbbbbbbb ------------- When I use 'dig' or 'nslookup' command, like 'dig yahoo.com' it uses the localhost as the server. I... (2 Replies)
Discussion started by: chaandana
2 Replies

6. Solaris

stop sendmail srvice

dear all does any one know how to stop send mail in solaris (6 Replies)
Discussion started by: murad.jaber
6 Replies

7. Solaris

stop solaris 8 sendmail from running on startup

sorry i got this already... (3 Replies)
Discussion started by: itik
3 Replies

8. Solaris

solaris 8/9 sendmail stop

Hi All, I need to stop sendmail from running on boot-up. How can I do this on Solaris 8 and 9 sparc? Please help and that you in advance. (2 Replies)
Discussion started by: itik
2 Replies

9. UNIX for Advanced & Expert Users

how to stop others users to stop viewing what i am doing ?

Hi , I have one question, suppose i am a normal user and when i use 'w' command , it shows who is logged on and what they are doing . Now i want to stop others users to know what i am doing accept the root ? can i do this ? thanks (5 Replies)
Discussion started by: mobile01
5 Replies

10. Linux

apache@localhost.localdomain

Hello, I am ltrying to find the config file to modify a parameter for apache (I guess). Here, when sending mail using php web form I get a copy of all mail sent from that form, but here is a sample of what I get : From : apache@localhost.localdomain To : myemail@host.com Subject : Mail ... (2 Replies)
Discussion started by: qfwfq
2 Replies
Login or Register to Ask a Question