Guten Abend liebe root forum Gemeinde,
Ich habe folgendes Problem:
Ausgangslage ist ein rootserver mit 1 IP aber 4 Domains.
Wenn ich mit meinem php Script über die mail() Funktion nun eine Email sende bekomme ich die Email mit dem Absender www-data@domain1.de
Sieht sehr unschön aus und soll eigentlich anders sein.
Ich gebe der Mail Funktion folgende Header mit:
Content-type: text/plain; charset=utf-8'."\r\n",
'From: noreply@neagora.de (Neagora)\r\n",
'Reply-To: noreaply@neagora.de\r\n",
Meine postfix Config sieht folgendermaßen aus:
readme_directory = no
# TLS parameters
smtpd_tls_cert_file = /etc/ssl/certs/postfix.pem
smtpd_tls_key_file = /etc/ssl/private/postfix.pem
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = mail.pyr0soft.de
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = pyr0soft.de, pyr0soft, localhost.localdomain, localhost
mydestination = $myhostname
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
message_size_limit = 40000000
Wie bekomme ich es nun hin das die Email mit dem angegebenen Absender beim Empfänger ankommt anstatt mit www-data@pyr0soft.de
Danke schonmal für eure Hilfe.
Gruß
Pyr0t0n
Absender bei mail() Funktion
-
- Posts: 5923
- Joined: 2004-05-23 12:53
Re: Absender bei mail() Funktion
Du musst die PHP-Einstellung sendmail_path entsprechend anpassen, so dass als Return-Path deine gewünschte E-Mail-Adresse genutzt wird. Üblicherweise ist das der Parameter -f für den Sendmail-Wrapper.
-
- Project Manager
- Posts: 11183
- Joined: 2003-02-27 01:00
- Location: Hamburg
Re: Absender bei mail() Funktion
http://de3.php.net/manual/en/function.mail.php hat Beispiele dafür.
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
-
- Posts: 11
- Joined: 2006-04-08 21:45
Re: Absender bei mail() Funktion
Cool danke, mit dem -f Parameter klappt es.