Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

why sendmail only works for root user?

Status
Not open for further replies.

baggetta

Technical User
Feb 27, 2003
116
US
I got 3 server with sendmail for AIX 5.1L to send to Exchange. 2 servers working fine. For some reason, it will only sendmail if your root user. I've checked the security groups/files for /etc/mail folder and /usr/var/spool. The correct user rights match my other 2 servers. What could be stopping it when it used to work back in Aug.2004.?
 
Hi - what's the error you get?

Mike

"Deliver me from the bane of civilised life; teddy bear envy."

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
Hi Mike, I don't get any errors. When trying to execute the mail command with any other user other than root, it just doesn't create the mail files in /var/spool/mqueue. The user rights for each directory are rwx all across (777), so I'm thinking its not a user group security issue. This used to work, but now it doesn't. Is there a way to turn on debugging?
 
Hi,

What's the command you're using to send the mail?

Are you running sendmail as a daemon?

Mike

"Deliver me from the bane of civilised life; teddy bear envy."

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
using the command "mail -s "subject" email_address" or I can use "mailx -s "subject" email_address < text.txt"

How do I check if its a daemon process? I think it is, since if I grep for mail, the pid matches the same pid in /etc/mail/sendmail.pid

I'm using these command to start the sendmail process which is working on my other 2 servers:
stopsrc -s sendmail
chssys -s sendmail -f 9 -n 15 -S -a "-bD"
startsrc -s sendmail -a "-bd -q30m"
lssrc -s sendmail
 
Looks like it is yes, if the PID matches contents of that file.

You should have a -dX option for sendmail, where X is a debugging level (set it to 1 initiall)

There should also be a maillog file - I don't have an AiX system to hand at the moment but try /var/adm/syslog/mail.log

Try using sendmail directly

/usr/sbin/sendmail -d1 root < file_with_email_text_in_it

Also - compare the sendmail config with a working machine. (the sendmail.cf file)

Mike

"Deliver me from the bane of civilised life; teddy bear envy."

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
This command:
/usr/sbin/sendmail -d1 root < file_with_email_text_in_it

what does the -d1 do? Is there a command to test it with another user since I know being root works fine.
 
My apologies - I didn't make myself clear.

Run that command as a non-root user - it will send mail to root.

The -d1 specifies a debugging level. Have a look at 'man sendmail' for some details.

Mike

"Deliver me from the bane of civilised life; teddy bear envy."

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
Mike, ran that command both as non-root and root, didn't do anything. Do you know the debug for mail versus sendmail command? the -d1 doesn't work with mail command.

if I do this as root it works fine.
mail -s "subject" email@hotmail.com < file.txt

this will send it to an external mail account. It also works for our internal email accounts. But only as root user.
 
*Has* to be a permissions problem bagetta - which I know isn't a particularly helpful comment.

When you say that the user rights match your other two servers which files and directories did you check?

I'm off home now - I'll check back in a couple of hours.

Mike

"Deliver me from the bane of civilised life; teddy bear envy."

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top