[Primipassi] Mandare e-mail senza usare sendmail

Stefano Kerschbaumer - Interline S.r.l. stefano@interline.it
Ven 11 Lug 2003 12:45:07 CEST


Ecco la soluzione al problema:

Solution found!
I found a solution at php.notes newsgroup. This is the post from
jimw@php.net:

Regarding qmail causing a qmail-inject: fatal: read-error
Technical Explanation:
Normally when a php script run by apache executes, it calls qmail-inject to
send the mail. Because the apache webserver is spawned as the root user, the
environment variable for the QMAILMFTFILE defaults to $HOME/.lists,i.e.
/root/.lists in this case. During runtime, the apache webserver, however,
runs as the 'nobody' user as a member of the 'nobody' group and therefore
cannot traverse the directory tree to /root/.lists, thus, the apache error
file shows qmail-inject: fatal: read-error when apache attempts to call
/var/qmail/bin/qmail-inject. The solution to the problem was to add a line
to the apache startup script /etc/rc.d/init.d/httpsd to set the QMAILMFTFILE
environment variable to point to a file which the nobody user has
permissions to see. In this case, adding QMAILMFTFILE=/tmp/.lists to the
startup script on my server solved the problem.

Saluti Stefano
----- Original Message -----
From: "Stefano Kerschbaumer - Interline S.r.l." <stefano@interline.it>
To: <primipassi@firenze.linux.it>
Sent: Thursday, July 10, 2003 3:18 PM
Subject: [Primipassi] Mandare e-mail senza usare sendmail


> Ho letto la discussione del 23 aprile. Io ho lo stesso problema.
>
> Uso PHP e Qmail ed ho configurato php.ini con sendmail_path =
> /usr/sbin/sendmail -t ma non funziona ... mail mi restituisce false e la
> mail non parte.
>
>
> Dove posso controllare l'errore ? Penso che possa essere qmail che non mi
> manda la mail ? Che test posso fare ?
>
> Nel file di log /service/qmail-smtpd/log/main/current non trovo nulla nel
> file di apache non trovo nulla ...
>
>
> Saluti Stefano
>
>
> _______________________________________________
> FLUG primipassi con Linux - primipassi@firenze.linux.it
> Policy: http://www.firenze.linux.it/primipassi/policy_html
> URL: http://lists.firenze.linux.it/mailman/listinfo/primipassi
> Archivio:  http://lists.firenze.linux.it/pipermail/primipassi/
> Ricerca nell'archivio: http://www.firenze.linux.it/search




Maggiori informazioni sulla lista primipassi