Link to home
Start Free TrialLog in
Avatar of harlow
harlow

asked on

Sendmail Newbie Question

I have become a sysadmin by default, and know just enough to be dangerous.  I have a Sun Sparc-2 antique with Solaris 2.6 which runs just fine.  Just added an Ultra-2 workstation, also with 2.6, but the latter can't seem to send mail except to itself.  sendmail.cf on the two machines is identical.  Both use the same router, which is maintained by a real sysadmin in a different department (who has no clue what is wrong with my machines).

When I run sendmail -d 1 -v foo@boo.com to see what is happening,  the machine which doesn't work right lists the sendmail options and parameters:

Version SMI-8.6
setoption v=T
setoption a=5
setoption k=0
setoption l=
setoption r=ident=0
setoption R=
verify_mail_server(): remote mode is off
setoption I=
setoption A=/etc/mail/aliases
setoption d=background
setoption D=
setoption F=0600
setoption g=1
setoption H=/etc/mail/sendmail.hf
setoption L=9
setoption o=
setoption P=Postmaster
setoption Q=/var/spool/mqueue
setoption r=15m
setoption S=/etc/mail/sendmail.st
setoption s=
setoption T=3d
setoption u=1
getauthinfo: root@localhost
SYSTEM IDENTITY (after readcf):
            (short domain name) $w = pinhead
        (canonical domain name) $j = $w.$D
               (subdomain name) $m =
                    (node name) $k = pinhead

Note the "remote mode is off" notice.  On the machine that works correctly, this line says that remote mode is on.  Also, note that the subdomain field is blank;  this field is filled in corectly onthe machine that works. I tried setting Mm directly, but it was ignored.  Mail to foreign machines bounces back saying that "HELO pinhead" is invalid, which of course it is.

So, the question is, how do you turn "remote mode" on?  Where is the subdomain information supposed to come from?  Neither machine's sendmail.cf file explicitly defines it, so it is getting picked up from the system somehow.  I have looked at comp.mail.sendmail and the sendmail.org web pages and FAQs, but can find no reference to this item.

Thanks

Justin Harlow
Avatar of bryanjones
bryanjones

Try this /usr/sbin/sendmail -v root@boo.com and see what the error message prints out -- it is better to use this command rather than the -d 1 -v.  The -v is verbose and should print out an error message about the problem.  Also if you know sendmail enough you can telnet boo.com 25 and use the sendmail commands from their to try and trouble shoot the system.
Try this /usr/sbin/sendmail -v root@boo.com and see what the error message prints out -- it is better to use this command rather than the -d 1 -v.  The -v is verbose and should print out an error message about the problem.  Also if you know sendmail enough you can telnet boo.com 25 and use the sendmail commands from their to try and trouble shoot the system.
Sorry to ask the obvious but can you ping, telnet, etc out from the non-working machine?  Have you checked TCP/IP configurations?
Avatar of harlow

ASKER

It turned out that the default sendmail.cf on hte nonworking machine was a copy of the canonical main.cf.  I replaced it with a copy of the equally canonical subsidiary.cf, and lo and behold, it started working after a reboot.  My guess is that I had two machines trying to be master at the same time, and that this change put the new one in its proper place in life...

Thanks for the help though.  I think I am now in business.

JEH
ASKER CERTIFIED SOLUTION
Avatar of bknowles
bknowles

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of harlow

ASKER

We can say it is "solved" at least.  I blundered into the solution before a real answer emerged, but that's OK by me.  I'll go read the O'Reilly sendmail book in more detail so I won't have to post more questios like this in the future.  Thanks to those who responded.

JEH
As I recall, the O'Reilly book isn't going to be able to help you much with Sun sendmail.cf configuration (at least, I don't recall much Sun sendmail stuff in the version of the book I previewed and commented on).

With the advent of Solaris 2.7, they're supposed to be going to a virtually "stock" version 8 sendmail configuration, and then the O'Reilly book will be able to really help.


However, in general, RTFM is a very good thing to have already done before you ask questions in public.  ;-)