473,426 Members | 3,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,426 software developers and data experts.

Sendmail

I submitted this to comp.mail.sendmail, but maybe someone here can help me
as well.

OK, this has most likely been asked and answered several times, but I am
still confused after searching. Here is the background and situation:

Background:
I know nothing about sendmail. It is being set up on the system by someone
else on a Red Hat Linux system.
I know Unix, but it has been a while and I am not an expert on that OS.
I have programmed for a long time, but am relatively new to web programming.

The Task:
From a web page take the user's information and, among other things,
-- create a sendmail account
but
-- not have shell access. Only have access to the mail.

Path:
I will be using php and so the Apache account will have sufficient
privilages to run a shell script to create the account.

Questions:
-- Where can I find a script to do this?
-- What do I have to do to deny access to everything except the email?

Any help for this newbie would be greatly appreciated.

Shelly
Jan 2 '06 #1
7 1728
Shelly wrote:
I submitted this to comp.mail.sendmail, but maybe someone here can help me
as well.

OK, this has most likely been asked and answered several times, but I am
still confused after searching. Here is the background and situation:


Yes, you asked it here on 12/28. Did you check those answers?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jan 2 '06 #2

"Jerry Stuckle" <js*******@attglobal.net> wrote in message
news:VP******************************@comcast.com. ..
Shelly wrote:
I submitted this to comp.mail.sendmail, but maybe someone here can help
me as well.

OK, this has most likely been asked and answered several times, but I am
still confused after searching. Here is the background and situation:


Yes, you asked it here on 12/28. Did you check those answers?


Yes, I did, but was still confused by the answers. That was why I reposted
with the specifics in, what I hoped, was clearer descriptive language.

After posting, I continued with some intensive searching. I think I
understand now, but would like some verification.

1 - Create the account with an adduser command. (The php would be either a
system() or exec() command to run that command.) It has to be in the passwd
account, but doesn't need to have a shell script.

2 - Have the adduser -D so that would limit these users. This would be done
one time by the root account at the box itself.

3 - Also, have the shell script for the accounts set to /bin/false. This
could also be done from php spawning a system() or exec(0 command.

Did I finally get it straight?

Shelly
Jan 2 '06 #3
On Sun, 01 Jan 2006 23:07:28 -0500, Shelly wrote:

"Jerry Stuckle" <js*******@attglobal.net> wrote in message
news:VP******************************@comcast.com. ..
Shelly wrote:
I submitted this to comp.mail.sendmail, but maybe someone here can help
me as well.

OK, this has most likely been asked and answered several times, but I am
still confused after searching. Here is the background and situation:

Yes, you asked it here on 12/28. Did you check those answers?


Yes, I did, but was still confused by the answers. That was why I reposted
with the specifics in, what I hoped, was clearer descriptive language.

After posting, I continued with some intensive searching. I think I
understand now, but would like some verification.

1 - Create the account with an adduser command. (The php would be either a
system() or exec() command to run that command.) It has to be in the passwd
account, but doesn't need to have a shell script.

BUT php would have to run as root to successfully complete, which is a
HUGE security hole.
2 - Have the adduser -D so that would limit these users. This would be
done one time by the root account at the box itself.

3 - Also, have the shell script for the accounts set to /bin/false. This
could also be done from php spawning a system() or exec(0 command. Try man adduser to note that these 3 steps need to be done in a single
command.
Did I finally get it straight?

Shelly

Like I said over in comp.mail.sendmail, what mailstore are you using, and
what kind of authentication... database, ldap, os, write your own, etc?

Steve

Jan 2 '06 #4
Shelly wrote:
"Jerry Stuckle" <js*******@attglobal.net> wrote in message
news:VP******************************@comcast.com. ..
Shelly wrote:
I submitted this to comp.mail.sendmail, but maybe someone here can help
me as well.

OK, this has most likely been asked and answered several times, but I am
still confused after searching. Here is the background and situation:

Yes, you asked it here on 12/28. Did you check those answers?

Yes, I did, but was still confused by the answers. That was why I reposted
with the specifics in, what I hoped, was clearer descriptive language.


Than you should ask more questions in that thread, not start a new one!
After posting, I continued with some intensive searching. I think I
understand now, but would like some verification.

1 - Create the account with an adduser command. (The php would be either a
system() or exec() command to run that command.) It has to be in the passwd
account, but doesn't need to have a shell script.

2 - Have the adduser -D so that would limit these users. This would be done
one time by the root account at the box itself.

3 - Also, have the shell script for the accounts set to /bin/false. This
could also be done from php spawning a system() or exec(0 command.

Did I finally get it straight?

To a certain extent. But as Steve indicted, it all depends on the mail
program you're using (sendmail SENDS mail - it doesn't handle mail
USERS), the kind of authentication...

My suggestion is for you to find a Linux admin to help you in this area.
You need to understand the basic authentication your system is using,
and (especially) the huge security hold which results from running PHP
as root.
Shelly

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jan 2 '06 #5
The security hole can be covered by simply writing a file to an area
and having a cron job detecting it and doing the account creation and
then deleting it.

Jan 2 '06 #6
"Shelly" <sh************@asap-consult.com> wrote in
news:OJ******************************@comcast.com:
I submitted this to comp.mail.sendmail, but maybe someone here can
help me as well.

OK, this has most likely been asked and answered several times, but
I am still confused after searching. Here is the background and
situation:

Background:
I know nothing about sendmail. It is being set up on the system by
someone else on a Red Hat Linux system.
I know Unix, but it has been a while and I am not an expert on that
OS. I have programmed for a long time, but am relatively new to web
programming.

The Task:
From a web page take the user's information and, among other things,
-- create a sendmail account
This shouldn't be needed. My servers are set up so that "nobody" is
the username for the server. By not specifying the From: header, mail
appears to come from "no****@server.domain." You can build your own
From: header using the email and name gathered by a form, just don't
forget to look into header injection and come up with some method of
verifying proper usage as spammers can use your mail form if you don't
protect it in some manner.
but
-- not have shell access. Only have access to the mail.

Path:
I will be using php and so the Apache account will have sufficient
privilages to run a shell script to create the account.
Have you confirmed this with your server administrator? I am the only
person that can create any type of account on my servers.
Questions:
-- Where can I find a script to do this?
Lookup the mail function.
-- What do I have to do to deny access to everything except the
email?


Nothing. If your server administrator has done his/her job, it's
already done.

--
Stan McCann "Uncle Pirate" http://stanmccann.us/pirate.html
Webmaster/Computer Center Manager, NMSU at Alamogordo
http://alamo.nmsu.edu/ There are 10 kinds of people.
Those that understand binary and those that don't.
Jan 2 '06 #7
On Mon, 02 Jan 2006 08:01:39 -0800, Shelly wrote:
The security hole can be covered by simply writing a file to an area
and having a cron job detecting it and doing the account creation and
then deleting it.

This can be completely avoided by actually doing some analysis and design
before starting programming. I've been trying to point out that there are
far more workable solutions to the one you're suggesting.

M$ has a lot to answer for.

Steve
BTW sendmail's prime purpose is sending and *receiving* mail, but not
storing it.
Jan 3 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Babaloo | last post by:
Hello, I am having a problem with PHP 4.2.2 and RH 8. PHP is working fine except email. I have a test script to send mail, I have sendmail_path = '/usr/lib/sendmail -t -i' set in php.ini,...
4
by: jim | last post by:
Hello, I am having a problem w/SendMail reporting: " No recipient addresses found in header". Funny thing is though, I properly recieve the email message. Thanks for your help. -jim
2
by: mike | last post by:
I've spent a couple of days on this and I'm to the "bang-my-head 'gainst the monitor and babble in tongues" mode. First - SuSE Pro 9.3, Linux 2.6.11.4-21.7, Apache 2.0.53, PHP 4.3.10 I have...
1
by: Gaz | last post by:
Hey. I looked at the Sendmail help and did not find a property where i can get an "ok" signal when the email is finally sent. I need something like that to show a "Processing, please stand by"...
3
by: swangdb | last post by:
I have a Sun Server running Solaris 10 and Sendmail 8.13.7. I have Majordomo and Listproc installed on this server and they work. I have several production majordomo and listproc mailing lists...
4
by: Nilesh | last post by:
I have a server in which sendmail gives problem. How do i change php.ini so that i can use exim for mail() System is FC-6.
0
by: s2rinivasan | last post by:
I am srinivasan I sent a last message hoe to trouble shoot httpd passwd acces problum. In that I didn't menson that OS=RedHat LINUX EL4-2.6.9-5. This question also in the same version. In...
11
by: Taras_96 | last post by:
Hi all, The PHP manual states that: "The Windows implementation of mail() differs in many ways from the Unix implementation. First, it doesn't use a local binary for composing messages but only...
3
by: digitaldiva | last post by:
Hi I am new here and once upon a time I worked with Perl, now I am trying again and need some help: I wrote a Perl script a few years ago that opened an order entry TXT file and sent each...
2
jhoborg
by: jhoborg | last post by:
Hello all, So I'm having trouble using sendmail in a CGI script as the topic title says. Here's what I'm trying to accomplish: User fills out a form, submits it, my CGI script receives this...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.