Unix Technical Forum

using Sendmail from an non-privileged user

This is a discussion on using Sendmail from an non-privileged user within the Sco Unix forums, part of the Unix Operating Systems category; --> I have a system that uses /usr/lib/sendmail -t to send messages generated by a program running on a user ...


Go Back   Unix Technical Forum > Unix Operating Systems > Sco Unix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-15-2008, 12:38 PM
bill drescher
 
Posts: n/a
Default using Sendmail from an non-privileged user

I have a system that uses /usr/lib/sendmail -t to send messages
generated by a program running on a user account. Works fine.

At home I wrote a similar application to send newsletters to my
friends/family and usually it generates an error in the file redirect
the close codes to that says (paraphrase, I fixed it by a hack so I
don't have the exact code available now) that it can not create an entry
in /usr/spool/mqueue, which makes sense as it ie owned by root:mail and
the permissions are 775.

What is perplexing is that sometimes it will send the mail at home
(about 1 time out of 10) and it always sends the mail at the customer
site which has the same permissions afaik.

Openserver 5.0.5

I'd be glad to hear opinions as to how it works at all but I really
would like suggestions on how to have a non-privileged user program send
mail.

for a temporary hack I changed the permissions on /usr/spool/mqueue to
777, but am not comfortable with that.

--
Bill Drescher
william {at} TechServSys {dot} com

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-15-2008, 12:38 PM
Larry Rosenman
 
Posts: n/a
Default Re: using Sendmail from an non-privileged user

In article <vum4jb4gqojm5b@corp.supernews.com>,
bill drescher <nobody@Spamcop.net> wrote:
>I have a system that uses /usr/lib/sendmail -t to send messages
>generated by a program running on a user account. Works fine.
>
>At home I wrote a similar application to send newsletters to my
>friends/family and usually it generates an error in the file redirect
>the close codes to that says (paraphrase, I fixed it by a hack so I
>don't have the exact code available now) that it can not create an entry
>in /usr/spool/mqueue, which makes sense as it ie owned by root:mail and
>the permissions are 775.
>
>What is perplexing is that sometimes it will send the mail at home
>(about 1 time out of 10) and it always sends the mail at the customer
>site which has the same permissions afaik.
>
>Openserver 5.0.5
>
>I'd be glad to hear opinions as to how it works at all but I really
>would like suggestions on how to have a non-privileged user program send
>mail.
>
>for a temporary hack I changed the permissions on /usr/spool/mqueue to
>777, but am not comfortable with that.

sendmail needs to be setuid root in it's normal config.

LER

>
>--
>Bill Drescher
>william {at} TechServSys {dot} com
>



--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-15-2008, 12:38 PM
bill drescher
 
Posts: n/a
Default Re: using Sendmail from an non-privileged user

Larry Rosenman wrote:
> In article <vum4jb4gqojm5b@corp.supernews.com>,
> bill drescher <nobody@Spamcop.net> wrote:
>
>>I have a system that uses /usr/lib/sendmail -t to send messages
>>generated by a program running on a user account. Works fine.
>>
>>At home I wrote a similar application to send newsletters to my
>>friends/family and usually it generates an error in the file redirect
>>the close codes to that says (paraphrase, I fixed it by a hack so I
>>don't have the exact code available now) that it can not create an entry
>>in /usr/spool/mqueue, which makes sense as it ie owned by root:mail and
>>the permissions are 775.
>>
>>What is perplexing is that sometimes it will send the mail at home
>>(about 1 time out of 10) and it always sends the mail at the customer
>>site which has the same permissions afaik.
>>
>>Openserver 5.0.5
>>
>>I'd be glad to hear opinions as to how it works at all but I really
>>would like suggestions on how to have a non-privileged user program send
>>mail.
>>
>>for a temporary hack I changed the permissions on /usr/spool/mqueue to
>>777, but am not comfortable with that.

>
> sendmail needs to be setuid root in it's normal config.
>
> LER
>

Thanks, but...
More fun, it is. I was wrong about the permissions (sloppy) the
permissions were/are -rws--x--x
I realize that the problem I am having can not be happening, but it was
probably infected by a winblows computer that shares the same desk.
Any other ideas ?



--
Bill Drescher
william {at} TechServSys {dot} com

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-15-2008, 12:38 PM
Tony Lawrence
 
Posts: n/a
Default Re: using Sendmail from an non-privileged user

bill drescher <nobody@spamcop.net> wrote:
>>
>>>I have a system that uses /usr/lib/sendmail -t to send messages
>>>generated by a program running on a user account. Works fine.
>>>


Some reason why you aren't just using mail or mutt?

http://aplawrence.com/SCOFAQ/scotec6.html#mailxmutt

--
tony@aplawrence.com Unix/Linux/Mac OS X resources: http://aplawrence.com
Get paid for writing about tech: http://aplawrence.com/publish.html
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-15-2008, 12:39 PM
bill drescher
 
Posts: n/a
Default Re: using Sendmail from an non-privileged user

Tony Lawrence wrote:
> bill drescher <nobody@spamcop.net> wrote:
>
>>>>I have a system that uses /usr/lib/sendmail -t to send messages
>>>>generated by a program running on a user account. Works fine.
>>>>

>
>
> Some reason why you aren't just using mail or mutt?
>
> http://aplawrence.com/SCOFAQ/scotec6.html#mailxmutt
>

haven't explored mutt as sendmail does the job (usually).
I don't think I can send a BCC using mail.

--
Bill Drescher
william {at} TechServSys {dot} com

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-15-2008, 12:39 PM
Tony Lawrence
 
Posts: n/a
Default Re: using Sendmail from an non-privileged user

bill drescher <nobody@spamcop.net> wrote:
>Tony Lawrence wrote:
>> bill drescher <nobody@spamcop.net> wrote:
>>
>>>>>I have a system that uses /usr/lib/sendmail -t to send messages
>>>>>generated by a program running on a user account. Works fine.
>>>>>

>>
>>
>> Some reason why you aren't just using mail or mutt?
>>
>> http://aplawrence.com/SCOFAQ/scotec6.html#mailxmutt
>>

>haven't explored mutt as sendmail does the job (usually).
>I don't think I can send a BCC using mail.


You can send anything you like using Mutt.

--
tony@aplawrence.com Unix/Linux/Mac OS X resources: http://aplawrence.com
Get paid for writing about tech: http://aplawrence.com/publish.html
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-15-2008, 12:39 PM
bill drescher
 
Posts: n/a
Default Re: using Sendmail from an non-privileged user

Tony Lawrence wrote:
> bill drescher <nobody@spamcop.net> wrote:
>
>>Tony Lawrence wrote:
>>
>>>bill drescher <nobody@spamcop.net> wrote:
>>>
>>>
>>>>>>I have a system that uses /usr/lib/sendmail -t to send messages
>>>>>>generated by a program running on a user account. Works fine.
>>>>>>
>>>
>>>
>>>Some reason why you aren't just using mail or mutt?
>>>
>>>http://aplawrence.com/SCOFAQ/scotec6.html#mailxmutt
>>>

>>
>>haven't explored mutt as sendmail does the job (usually).
>>I don't think I can send a BCC using mail.

>
>
> You can send anything you like using Mutt.
>

Tony,
Assuming sendmail works as it should (big assumption), would you please
tell me why would I want to install and learn mutt, in addition to my
other responsibilities

--
Bill Drescher
william {at} TechServSys {dot} com

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-15-2008, 12:39 PM
Tony Lawrence
 
Posts: n/a
Default Re: using Sendmail from an non-privileged user

bill drescher <nobody@spamcop.net> wrote:
>Tony Lawrence wrote:
>> bill drescher <nobody@spamcop.net> wrote:
>>
>>>Tony Lawrence wrote:
>>>
>>>>bill drescher <nobody@spamcop.net> wrote:
>>>>
>>>>
>>>>>>>I have a system that uses /usr/lib/sendmail -t to send messages
>>>>>>>generated by a program running on a user account. Works fine.
>>>>>>>
>>>>
>>>>
>>>>Some reason why you aren't just using mail or mutt?
>>>>
>>>>http://aplawrence.com/SCOFAQ/scotec6.html#mailxmutt
>>>>
>>>
>>>haven't explored mutt as sendmail does the job (usually).
>>>I don't think I can send a BCC using mail.

>>
>>
>> You can send anything you like using Mutt.
>>

>Tony,
>Assuming sendmail works as it should (big assumption), would you please
>tell me why would I want to install and learn mutt, in addition to my
>other responsibilities



Because sendmail WON'T work as you are using it in many environments.
For security reasons, most systems absolutely will NOT let an ordinary
user invoke sendmail directly.

"Install and learn" is hardly any big deal. See
http://aplawrence.com/Unixart/dhemailmutt.html

--
tony@aplawrence.com Unix/Linux/Mac OS X resources: http://aplawrence.com
Get paid for writing about tech: http://aplawrence.com/publish.html
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-15-2008, 12:39 PM
Bill Vermillion
 
Posts: n/a
Default Re: using Sendmail from an non-privileged user

In article <vutcnknjl3qj7a@corp.supernews.com>,
bill drescher <nobody@Spamcop.net> wrote:
>Tony Lawrence wrote:
>> bill drescher <nobody@spamcop.net> wrote:
>>
>>>Tony Lawrence wrote:


>>>>bill drescher <nobody@spamcop.net> wrote:


>>>>>>>I have a system that uses /usr/lib/sendmail -t to send messages
>>>>>>>generated by a program running on a user account. Works fine.


>>>>Some reason why you aren't just using mail or mutt?


>>>>http://aplawrence.com/SCOFAQ/scotec6.html#mailxmutt


>>>haven't explored mutt as sendmail does the job (usually).
>>>I don't think I can send a BCC using mail.


>> You can send anything you like using Mutt.


>Tony,
>Assuming sendmail works as it should (big assumption), would you please
>tell me why would I want to install and learn mutt, in addition to my
>other responsibilities


I'm not Tony but let me drop in here a moment.

Mail systems are divided into three parts, MTA, MSA, MUA

MTA - Mail Transport Agent - sendmail and other transport devices
used to get transport mail from one system to another


MSA - Mail Submission Agent - send the mail to the MTA

MUA - Mail User Agent - the interface to mail that the users
have - mutt, pine, Outlook, whatever.

Mutt handles both the MUA and MSA parts.

Tony points out that not all places allow direct access to
sendmail. And since sendmail is ubiquitous some systems ship with
wrappers so that all programs which by default use sendmail, use
the MTA on the system as dictated by the wrapper, so that even if
you call sendmail another MTA is used.

On different lists I've seen requests from people along the line
of "how do I create an attachment in sendmail" and someone
invariable comes up with a uuencode sent to sendmail, but using
user agents to do all the grunt work is far easier.

Using Mutt should make your life easier.

Bill

--
Bill Vermillion - bv @ wjv . com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-15-2008, 12:39 PM
bill drescher
 
Posts: n/a
Default Re: using Sendmail from an non-privileged user

Bill Vermillion wrote:
> In article <vutcnknjl3qj7a@corp.supernews.com>,
> bill drescher <nobody@Spamcop.net> wrote:
>
>>Tony Lawrence wrote:
>>
>>>bill drescher <nobody@spamcop.net> wrote:
>>>
>>>
>>>>Tony Lawrence wrote:

>
>
>>>>>bill drescher <nobody@spamcop.net> wrote:

>
>
>>>>>>>>I have a system that uses /usr/lib/sendmail -t to send messages
>>>>>>>>generated by a program running on a user account. Works fine.

>
>
>>>>>Some reason why you aren't just using mail or mutt?

>
>
>>>>>http://aplawrence.com/SCOFAQ/scotec6.html#mailxmutt

>
>
>>>>haven't explored mutt as sendmail does the job (usually).
>>>>I don't think I can send a BCC using mail.

>
>
>>>You can send anything you like using Mutt.

>
>
>>Tony,
>>Assuming sendmail works as it should (big assumption), would you please
>>tell me why would I want to install and learn mutt, in addition to my
>>other responsibilities

>
>
> I'm not Tony but let me drop in here a moment.
>
> Mail systems are divided into three parts, MTA, MSA, MUA
>
> MTA - Mail Transport Agent - sendmail and other transport devices
> used to get transport mail from one system to another
>
>
> MSA - Mail Submission Agent - send the mail to the MTA
>
> MUA - Mail User Agent - the interface to mail that the users
> have - mutt, pine, Outlook, whatever.
>
> Mutt handles both the MUA and MSA parts.
>
> Tony points out that not all places allow direct access to
> sendmail. And since sendmail is ubiquitous some systems ship with
> wrappers so that all programs which by default use sendmail, use
> the MTA on the system as dictated by the wrapper, so that even if
> you call sendmail another MTA is used.
>
> On different lists I've seen requests from people along the line
> of "how do I create an attachment in sendmail" and someone
> invariable comes up with a uuencode sent to sendmail, but using
> user agents to do all the grunt work is far easier.
>
> Using Mutt should make your life easier.
>
> Bill
>

Tony, Bill
Thanks and the points are well taken. I will add MUTT to my list of
things to learn, somewhere near the top I guess.

--
Bill Drescher
william {at} TechServSys {dot} com

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:38 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com