Hi World,
I've got some questions concerning the using of the mail() php function
under OpenBSD using Postfix as MTA.
Note that I only want to use my OpenBSD Postfix Server as a mail sender
for fogotten password of my web site ^^First, the "mail" shell command works very well. I receive test mails
from root@myserver.com (using root login) towards
me@anywherebutmyserverevenvirtual.com
Second, the PHP cli (you know under shell) on a php script containing
the mail() php function works very well too (always under root login)BUT, when i browsing (via FireFox or IE) and I clik on my button "send
my password", nothing happen !! It's like the www users can't use the
/usr/sbin/sendmail...Note that the script behind the html button is excatly the same I use
with the php line command and that nothing appears in /var/log/messages
or MaillogHere is versions used:
OPENBSD 3.9
postfix-2.2.8p1 (installed via ports of ftp://bsd)
php-4.0Here is the Postfix conf:
Stricto "the Postfix instead of Sendmail" tutorial that we can find on
postfix.org, without virtual parameters (not needed here).Thanks for your reading and your help (since 4 days I'm searching a
solutions...),GrEg
Are you running chroot'd (default)? If so, you need something like
'mini_sendmail', or run Apache 'naked' with a -u.OR, you could RTFM & Google.
Lee
================================================
Leland V. Lammert lvl@omnitec.net
Chief Scientist Omnitec Corporation
Network/Internet Consultants www.omnitec.net
================================================
Hi all,
Thanks everybody for your help, but still doesn't work...
I tried with femail, then i tried with mini_sendmail (with this:
http://hanz.nl/p/showblog&blog_key=39), and always same result... i.e.
nothing happens...I'm getting crazy !!
thanks again,
Greg
First make sure mini_sendmail is located in /var/www/bin. Second add or
edit the sendmail_path in your php.ini and restart apache. Make it look
something like this: sendmail_path = "/bin/mini_sendmail -t
-fwww@blahblah.com" where -fwww@blahblah.com is the address you want the
mail to come from. Hope this helps.
Does php still require a shell to launch femail or mini_sendmail?
This has been discussed in the archives, Greg.-ME
I was writing my answer when i receive your mail, and that's it...
http://hanz.nl/p/showblog&blog_key=39 told to make a symbolinc link,
that was not working on my server..anyway, here we are, that's working !
Thanks a lot to everybody !
See you in the tube!
Greg
1) Start Apache with -u - if it works, you know it's a chroot problem. If
not, you have something else at play.2) Check your log files.
3) Check the URLs.
Lee
================================================
Leland V. Lammert lvl@omnitec.net
Chief Scientist Omnitec Corporation
Network/Internet Consultants www.omnitec.net
================================================
Do Apache is in chroot? Did you tried to run that php script in chroot?
--
Daniel 'Shinden' Horecki
http://morr.pl
You can use femail (in ports/packages) to fix this. It's easy to run
inside a chroot jail (use the STATIC flavour). It's a drop-in replacement
for /usr/sbin/sendmail, and submits the message to your real mailer (e.g.
on localhost) by SMTP.
Hi all,
Thx for your all answer... someone talk to me about the Apache chroot,
so I unchroot it, and it's well functional.But, If you follow me, I don't want that my apache be not chrooted (even
if i'm a big noob in security question, i'm not totally insane ^^). So,
Stuart, thanks for the femail pist, i will try it right now, but telle
me: is that a standalone emai server or it's living like an interface
between apache and the MTA?thanks all,
Greg
You didn't check your logs, did you ? Just guessing.
--
Benoit Myard
It's an interface, it takes the message and sends it to the MTA
by SMTP (by default, to port 25 on localhost; just copy it into the
chroot jail, and configure sendmail_path in php.ini).(There are at least two other programs like this, femail is simpler
and less messy than the ones I know of).
It can't, the www server is chrooted under /var/www. If that is not the
problem, be sure to post back for more in-depth solutions.Joachim
--
TFMotD: fpa, fea, fta (4) - DEC FDDI controller device driver
| monstr | [PATCH 26/60] microblaze_v4: time support |
| Jon Smirl | Re: 463 kernel developers missing! |
| Andrew Morton | Re: x86: 4kstacks default |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | Re: [GIT]: Networking |
| Jiri Olsa | [PATCHv5 0/2] net: fix race in the receive/select |
