LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-27-2010, 04:36 AM   #1
Pavel Samsonov
LQ Newbie
 
Registered: Jul 2010
Location: Russia, Yaroslavl region
Distribution: Slackware
Posts: 5

Rep: Reputation: 0
Sendmail ignore RunAsUser option


I use Slackware 13.1 with Sendmail 8.14. I set RunAsUser=mail option in sendmail.cf, but Sendmail still run under root. How run Sendmail under nonpriveleged user? Thanks.
 
Old 08-16-2010, 12:19 PM   #2
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 101Reputation: 101
Who owns sendmail service?
Code:
ls -l `which sendmail`
 
Old 08-20-2010, 02:52 AM   #3
Pavel Samsonov
LQ Newbie
 
Registered: Jul 2010
Location: Russia, Yaroslavl region
Distribution: Slackware
Posts: 5

Original Poster
Rep: Reputation: 0
ls -l `which sendmail`
-r-xr-sr-x 1 root smmsp 710452 2010-04-24 20:45 /usr/sbin/sendmail

This is system defaults in Slackware.

My configuration:

grep RUN sendmail.mc
define(`confRUN_AS_USER', `mail')dnl

grep Run /etc/mail/sendmail.cf
#O MaxRunnersPerQueue=1
#O NiceQueueRun
#O MaxQueueRunSize=0
O RunAsUser=mail

And after /etc/rc.d/rc.sendmail stop; /etc/rc.d/rc.sendmail start:

ps aux | grep sendmail
root 2308 0.0 0.1 7076 1964 ? Ss 11:45 0:00 sendmail: accepting connections
smmsp 2311 0.0 0.1 6688 1628 ? Ss 11:45 0:00 sendmail: Queue runner@00:25:00 for /var/spool/clientmqueue
root 2340 0.0 0.0 2420 832 pts/3 S+ 11:49 0:00 grep sendmail
 
Old 08-20-2010, 03:59 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,158
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
Hi,

sendmail needs to start running as root, so it can bind to port 25. Unprivileged users cannot open ports bellow 1025.
After that whenever a smtp connection is done, it's processed by a child running as the user specified with the RunAsUser option. You can read this, that explains everything

Regards
 
Old 08-27-2010, 04:39 AM   #5
Pavel Samsonov
LQ Newbie
 
Registered: Jul 2010
Location: Russia, Yaroslavl region
Distribution: Slackware
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks!
I have understood the general aspects of local delivery of the letter in sendmail. Sendmail it is executed under the user "mail" as I have specified in my configuration. Procmail has root setuid bit. Simply I couldn't understand - why at permissions user:user 600 on mbox, sendmail continued to deliver letters

Last edited by Pavel Samsonov; 08-27-2010 at 04:40 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] rsync still copies with ignore existing option digity Linux - Newbie 2 07-14-2010 01:12 PM
cp command: except or ignore option? C-RAF. Programming 9 02-28-2006 03:23 AM
Is there a pop3 daemon that can handle sendmails RunAsUser option ForumKid Linux - Software 2 01-22-2002 05:33 AM
Sendmail - RunAsUser=sendmail:mail/What files to i have to change ForumKid Linux - Security 45 01-18-2002 11:47 AM
sendmail (dont just ignore it 'cause its got sendmail in the subject :P) GnomeKing Linux - Networking 1 11-12-2001 09:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration