Re: nobody@localhost

From: Oliver Lietz <de-bsd-questions(at)oliverlietz.de>
Date: Tue, 8 Mar 2005 19:47:24 +0100

Am Dienstag, 8. März 2005 19:11 schrieb Bernd Walter:
> On Tue, Mar 08, 2005 at 06:00:39PM +0100, Marco Hesselbart wrote:
> > Hallo!
> >
> > Wir haben eine Frage zur BSD-Konfiguration, die trotz Durchforsten
> > diverser Foren googlen nach Antworten offengeblieben ist.
> >
> > Wir setzen seit einiger Zeit FreeBSD 4.4 mit Apache 1.3.23 und sendmail
> > ein. Bei einigen Mails, die wir mit php (Funktion mail()) versenden,
> > steht im Header "received from nobody(at)localhost", obwohl wir in PHP als
> > header "from:info(at)etsg.de" eintragen und dieser Eintrag auch im Header
> > erscheint. Wo können wir den Eintrag nobody(at)localhost ändern? Es wird
> > doch sicherlich nur wieder eine default-Einstellung sein, di eman ändern
> > muß, oder?
>
> Wenn ihr nur den Header From ändert braucht ihr euch nicht wundern,
> dass sendmail immer noch einen default Envelope From benutzt.
>
> > Wir wären für jede Hilfe dankbar. Im sendmail-Handbuch sind wir leider
> > auch nicht fündig geworden.
>
> Fürs erste würde es schon reichen die Zeilenumbruchstaste zu finden.
>
> Ansonsten steht in der sendmail Manpage:
> -fname Sets the name of the ``from'' person (i.e., the envelope
> sender of the mail). This address may also be used in the From: header if
> that header is missing during initial submission. The enve- lope sender
> address is used as the recipient for delivery status notifications and may
> also appear in a Return-Path: header. -f should only be used by
> ``trusted'' users (normally root, daemon, and network) or if the person
> you are trying to become is the same as the person you are. Otherwise,
> an X-Authentication- Warning header will be added to the message.

Und dazu der passende Abschnitt aus der PHP-Dokumentation
(http://www.php.net/manual/en/function.mail.php):

[...]
additional_parameters (optional)

The additional_parameters parameter can be used to pass an additional
parameter to the program configured to use when sending mail using the
sendmail_path configuration setting. For example, this can be used to set the
envelope sender address when using sendmail with the -f sendmail option.

The user that the webserver runs as should be added as a trusted user to the
sendmail configuration to prevent a 'X-Warning' header from being added to
the message when the envelope sender (-f) is set using this method. For
sendmail users, this file is /etc/mail/trusted-users.
[...]

Oliver

To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Tue 08 Mar 2005 - 19:48:43 CET

search this site