473,379 Members | 1,167 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,379 software developers and data experts.

Php script - create mail user - Linux/Postfix

Hi everybody,

I have a personel server (I learning) with Linux
I use apache, Php, Postfix.

I want create with Php script a mail user by web form (yahoo like) I
don't really know Php. May be someone can give me a example. I want
permit at my friends to create their own email account.

Thanks folks!

Jean-Louis

P.S. If possible sent me your answer at jl****@sympatico.ca

Jul 16 '05 #1
1 9156
Hi Matthew,

Thanks,
I'll try and I'll give you some news.

Jean-Louis

Matthew Vickers wrote:
On Mon, 25 Aug 2003 21:21:31 -0400
Jean-Louis Vill <jl****@sympatico.ca> wrote:

Hi everybody,

I have a personel server (I learning) with Linux
I use apache, Php, Postfix.

I want create with Php script a mail user by web form (yahoo like) I
don't really know Php. May be someone can give me a example. I want
permit at my friends to create their own email account.

The commands to read up on would be sudo, sudoers, useradd, the
backtick operator (or shell_exec) and escapeshellarg.

Add the user apache runs as on your unit and command adduser to the
sudoers file (as per the man page) and shell_exec sudo useradd.

Something like the following:

$password = escapeshellarg($_POST["pass"]);
$user_name = escapeshellarg($_POST["user"]);
$ret = `sudo useradd -g users -s /bin/false -p $password $user_name`;

*Disclaimer* code not tested, do not know if it will work and it's
most likely insecure.
Matt

<snip>


Jul 16 '05 #2

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

Similar topics

7
by: Adams-Blake Co. | last post by:
This may be OT a bit, so maybe someone can point me in the right direction. I want to test a script that sends out an e-mail. I want to test it locally on my Mandrake Linux 8.2 box. It runs OK...
6
by: Nicolas | last post by:
Hello, I have programmed an application to manage newsletters in PHP. I send the mails using smtp, but when there are more than 500 subscribers and when the mails (in html) are too big, it is...
2
by: ElaK | last post by:
hi, does any body know why send() is returning false.. where are the additional settings of SMTP server? Any comments are more than welcome Grzegorz
6
by: atcohaz | last post by:
Hi everybody, I have a personal server (I learning) with Linux with using Cpanel I only need such script which enables me to create email accounts without logging into cPanel. And in which I...
2
by: Phil Latio | last post by:
I understand (perhaps wrongly) that the mail() function relies on Sendmail being installed on the server. However I am wanting to run Postfix and Sendmail will not be loaded. Ideally I would...
5
by: This | last post by:
I have a pretty basic emailing script that sends a relatively small number (150) of html emails. The emails are compiled, personalised from a mysql db subscribers list, and sent using mail() -...
3
by: Gros Bedo | last post by:
Hello :-) I have a question about Python and Linux shell. I have a python program which is permanently resident in the end-user system. I'm currently producing a RPM package, and it works nicely....
7
by: r0g | last post by:
I'd like PHP to send mail to a local mailserver running at localhost:25 like I used to on windows. This mailserver is a dummy server which just writes the mail to disk for unit testing and works...
0
by: sganeshsvk | last post by:
sir, In Linux, We use send mail from some specific client host IP address to main server by using postfix configuration. Suppose Some unwanted users or other third persons hosts send the...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.