1837594 Members
3959 Online
110117 Solutions
New Discussion

Sendmail problems

 
Steve Buchan_1
Advisor

Sendmail problems

Hey guru's,
Every time I use sendmail, I get the following errors:

bogus queue file, uid=176, gid=106, mode=100660
loosing ./big_file_name: bogus file uid/gid in mqueue

Also, when I check /var/adm/syslog/mail.log, there is this entry:

nameserver: hostname.domain.com: host name lookup failure

I can do an nslookup of the hostname no problem.

Any ideas whats going on here?

Thanks,

Steve
16 REPLIES 16
benoit Bruckert
Honored Contributor

Re: Sendmail problems

Hi,
FOr the first trouble, you can check files in your mail queue and removed bad ones :
/var/spool/mqueue

For the second (syslog), may be you have an improper service switch file define in sendmail.cf,
check the line ServiceSwitchFile, and comment it if it's defined..
You may have also a trouble with the full domain name .
I.E. nslookup on hostname works but not on hostname.domain.com !!!
check /etc/resolv.conf with the domain line !!! You can add in this file the line :
domain domain.com

hth
Benoit
_______
"Les femmes, comme l'a dit un fran??ais plein d'esprit, nous inspirent le d??sir de r??aliser des chefs-d'oeuvre et nous emp??chent toujours de les mener a bout."
Oscar Wilde
Une application mal pansée aboutit à une usine à gaze (GHG)
U.SivaKumar_2
Honored Contributor

Re: Sendmail problems

Hi,

All qf* files under /var/spool/mqueue should have the ownership (UID/GID)set of the effective user with which the sendmail process runs. i.e root in almost all cases.

If some qf* file with ownership set other than effective user is put in the mqueue directory then sendmail complains moves that bogus qf* file to Qf* file and prints your error.

In your error the UID of that bogus file is 176 and GID of that bogus file is 106 and permisions of that file is 100660. ofcourse bogus.

you can search for the UID 176 in /etc/passwd and find out the which user or user process is writing such bogus qf* file in mqueue directory.

Stop sendmail and remove all Qf* files under /var/spool/mqueue directory. All also set the permissions of mqueue directory such that only the root user can write to it.

regards,

U.SivaKumar



Innovations are made when conventions are broken
Steve Buchan_1
Advisor

Re: Sendmail problems

I checked /var/spool/mqueue, but this dir was empty. There was a /var/spool/clientmqueue dir, which had a bunch of files in it. I removed these and restarted sendmail. problem still exists.


I can do an nslookup of hostname, or hostname.domain.com no problem.

I commented out the serviceswitchfile line in sendmail.cf. The problem still exists.
The service switch file looks like this:
hosts files nis dns
aliases files nis dns

The UID and GID in question, refer to the smmsp user/group (sendmail account)

The mails in question are from the root account. although, no mails at all, no matter who sends them get thru.

U.SivaKumar_2
Honored Contributor

Re: Sendmail problems

Hi,

Stop sendmail .

go to /var/spool/clientmqueue directory. Remove only the files starting with Q.

Give this command.

#chown root.smmsp /usr/sbin/sendmail

start sendmail daemon.

COme back with results.

regards,
U.SivaKumar




Innovations are made when conventions are broken
U.SivaKumar_2
Honored Contributor

Re: Sendmail problems

Sorry forgot one step , after giving chown command.

Give this command.
#chmod 4555 /usr/sbin/sendmail

Then start sendmail .

regards,

U.SivaKumar


Innovations are made when conventions are broken
Steve Buchan_1
Advisor

Re: Sendmail problems

I did the first chown command, and it came back with:
chown: unknown user id root.smmsp

I changed the file to look like this:

-r-sr-xr-x 1 root smmsp

was this what you meant?

I restarted sendmail, but alas, the problem still exists.
U.SivaKumar_2
Honored Contributor

Re: Sendmail problems

Hi,

my mistake should chown root:smmsp not root.smmsp. Anyway your current ownership is ok but problem is that set-gid bit is not set on your sendmail.

To do that

first
#chmod u-s /usr/sbin/sendmail
Then
#chmod 4555 /usr/sbin/sendmail
(or)
#chmod g+s /usr/sbin/sendmail

Now
#ll /usr/sbin/sendmail should be
r-x-s-x 1 root smmsp

see the s bit in the Group field.

Restart sendmail and please come back with results.

regards,
U.SivaKumar






Innovations are made when conventions are broken
U.SivaKumar_2
Honored Contributor

Re: Sendmail problems

Should be,
r-xr-sr-x 1 root smmsp



Innovations are made when conventions are broken
Steve Buchan_1
Advisor

Re: Sendmail problems

ok, I got the permissions set, removed /var/spool/clientmqueue/Q*, restarted sendmail.

I Still get the same messages. attached are the entries from /var/adm/syslog/mail.log.

Thanks for mucking thru this with me :)


Steve

U.SivaKumar_2
Honored Contributor

Re: Sendmail problems

Hi,

please paste the output of

#ll /usr/sbin/sendmail
#ll -d /var/spool/clientmqueue/

regards,

U.SivaKumar
Innovations are made when conventions are broken
Steve Buchan_1
Advisor

Re: Sendmail problems

-r-sr-sr-x 1 root smmsp 880640 Jan 7 22:27 /usr/sbin/sendmail

drwxrwx--- 2 smmsp smmsp 8192 Feb 12 11:08 /var/spool/clientmqueue
U.SivaKumar_2
Honored Contributor

Re: Sendmail problems

Hi,

Give these commands.

#chmod 770 /var/spool/clientmqueue
#chmod u-s /usr/sbin/sendmail

Restart sendmail and try again.

paste

ll /usr/sbin/sendmail


regards,

U.SivaKumar

Innovations are made when conventions are broken
Steve Buchan_1
Advisor

Re: Sendmail problems

same results.

-r-xr-sr-x 1 root smmsp /usr/sbin/sendmail
U.SivaKumar_2
Honored Contributor

Re: Sendmail problems

Hi,

Stop the sendmail.

#fuser -u /var/spool/clientmqueue

Paste the output .

regards,

U.SivaKumar
Innovations are made when conventions are broken
U.SivaKumar_2
Honored Contributor

Re: Sendmail problems

Hi,

paste

ll -d /var/spool/mqueue

After that

chmod 700 /var/spool/mqueue
chown root:mail /var/spool/mqueue

Restart sendmail and try again.

regards,
U.SivaKumar

Innovations are made when conventions are broken
Steve Buchan_1
Advisor

Re: Sendmail problems

no output from fuser.
#fuser -u /var/spool/clientmqueue
/var/spool/clientmqueue:

#