You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Carlos Eduardo Maiolino <ma...@gmail.com> on 2007/11/13 19:20:06 UTC

[users@httpd] Send e-mail with PHP and qmail mta in a CHROOT Jail

Hello my friends,

I have a http server with Apache 2.2.4 in a chroot jail.
My server is very stable, but i have a big problem.

I need Send e-mails with my web sites, and I can't.

I'm not able to send mail with the apache in a chroot jail.

Someone can configure this ?

I use the qmail how SMTP in my server.

Outbound of the chroot jail, The messages are sent correctly.

But in a chroot, I can't configure.

Thank for help

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Send e-mail with PHP and qmail mta in a CHROOT Jail

Posted by Scott Courtney <sc...@sinenomine.net>.
On Wednesday 14 November 2007 07:48, Sergey Avdushkin wrote:
> Last time I checked, it didn`t work in Linux at all.

Hmmmm...Perhaps I was mis-recalling.

> 
> He could use SSMTP (i.e. http://packages.debian.org/stable/mail/ssmtp). 
> This small app emulates sendmail & acts like a mail proxy -- all you 
> need is an smtp account & relaying allowed from the machine you want to 
> mail() from.

The other option would be to install the SMTP support in the PEAR libraries.

Scott

-- 
-----------------------------------------------------------------------------
Scott D. COURTNEY, Principal Engineer                  Sine Nomine Associates
scourtney@sinenomine.net                           http://www.sinenomine.net/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Send e-mail with PHP and qmail mta in a CHROOT Jail

Posted by Sergey Avdushkin <sa...@farpost.com>.
> On Wednesday 14 November 2007 07:18, Carlos Eduardo Maiolino wrote:
>> I need use the mail() function in php.
> 
> Have you tried setting up mail() so that it uses SMTP over TCP/IP rather than
> trying to call the sendmail shell command?
> 
> http://www.php.net/manual/en/ref.mail.php
> 
> The documentation says that "SMTP" and "smtp_port" configuration options are
> "used under Windows only", but if I recall correctly that just means that most
> *NIX users don't _need_ to use these config options. I believe that they will
> actually work under *NIX as well if you configure them.

Last time I checked, it didn`t work in Linux at all.

He could use SSMTP (i.e. http://packages.debian.org/stable/mail/ssmtp). 
This small app emulates sendmail & acts like a mail proxy -- all you 
need is an smtp account & relaying allowed from the machine you want to 
mail() from.

> 
> Try setting sendmail_path to NULL, SMTP to "localhost", and smtp_port to 25,
> and see if that helps.
> 
> This is a bit off-topic for this list, so feel free to write me off-list if
> you want to discuss this suggestion further.
> 
> Kind regards,
> 
> Scott

--
Sergey Avdushkin

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Send e-mail with PHP and qmail mta in a CHROOT Jail

Posted by Scott Courtney <sc...@sinenomine.net>.
On Wednesday 14 November 2007 07:18, Carlos Eduardo Maiolino wrote:
> I need use the mail() function in php.

Have you tried setting up mail() so that it uses SMTP over TCP/IP rather than
trying to call the sendmail shell command?

http://www.php.net/manual/en/ref.mail.php

The documentation says that "SMTP" and "smtp_port" configuration options are
"used under Windows only", but if I recall correctly that just means that most
*NIX users don't _need_ to use these config options. I believe that they will
actually work under *NIX as well if you configure them.

Try setting sendmail_path to NULL, SMTP to "localhost", and smtp_port to 25,
and see if that helps.

This is a bit off-topic for this list, so feel free to write me off-list if
you want to discuss this suggestion further.

Kind regards,

Scott

-- 
-----------------------------------------------------------------------------
Scott D. COURTNEY, Principal Engineer                  Sine Nomine Associates
scourtney@sinenomine.net                           http://www.sinenomine.net/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Send e-mail with PHP and qmail mta in a CHROOT Jail

Posted by Carlos Eduardo Maiolino <ma...@gmail.com>.
Hello.

I need use the mail() function in php.



On Nov 13, 2007 9:26 PM, Dan Mahoney, System Admin <da...@prime.gushi.org> wrote:
> On Tue, 13 Nov 2007, Carlos Eduardo Maiolino wrote:
>
> What php code, exactly, are you using to send mail.
>
> Chances are, your MTA called from within the jail is writing to a queue
> directory within the jail that your main MTA cannot send from.
>
> -Dan
>
>
>
> > Hello my friends,
> >
> > I have a http server with Apache 2.2.4 in a chroot jail.
> > My server is very stable, but i have a big problem.
> >
> > I need Send e-mails with my web sites, and I can't.
> >
> > I'm not able to send mail with the apache in a chroot jail.
> >
> > Someone can configure this ?
> >
> > I use the qmail how SMTP in my server.
> >
> > Outbound of the chroot jail, The messages are sent correctly.
> >
> > But in a chroot, I can't configure.
> >
> > Thank for help
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
>
> --
>
> "Don't try to out-wierd me.  I get stranger things than you free with my
> breakfast cereal."
>
> -Button seen at I-CON XVII (and subsequently purchased)
>
> --------Dan Mahoney--------
> Techie,  Sysadmin,  WebGeek
> Gushi on efnet/undernet IRC
> ICQ: 13735144   AIM: LarpGM
> Site:  http://www.gushi.org
> ---------------------------
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Send e-mail with PHP and qmail mta in a CHROOT Jail

Posted by "Dan Mahoney, System Admin" <da...@prime.gushi.org>.
On Tue, 13 Nov 2007, Carlos Eduardo Maiolino wrote:

What php code, exactly, are you using to send mail.

Chances are, your MTA called from within the jail is writing to a queue 
directory within the jail that your main MTA cannot send from.

-Dan


> Hello my friends,
>
> I have a http server with Apache 2.2.4 in a chroot jail.
> My server is very stable, but i have a big problem.
>
> I need Send e-mails with my web sites, and I can't.
>
> I'm not able to send mail with the apache in a chroot jail.
>
> Someone can configure this ?
>
> I use the qmail how SMTP in my server.
>
> Outbound of the chroot jail, The messages are sent correctly.
>
> But in a chroot, I can't configure.
>
> Thank for help
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

--

"Don't try to out-wierd me.  I get stranger things than you free with my
breakfast cereal."

-Button seen at I-CON XVII (and subsequently purchased)

--------Dan Mahoney--------
Techie,  Sysadmin,  WebGeek
Gushi on efnet/undernet IRC
ICQ: 13735144   AIM: LarpGM
Site:  http://www.gushi.org
---------------------------


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org