Vhost and sending mail via PHP

NethServer Version: 7.6.1810 (final)
Module: vhost
My status: Noob!

Hi All,

hope all of you are fine!

I searched a lot but don’t know further…and I’m not really far…:smiley:

So, I try to send mail out of PHP(vhost) and this looks like

$to=‘martin_droste@gmx.de’;
$subject=‘demande de contact’;
message=_POST[‘name’]._POST['phone']._POST[‘email’].$_POST[‘message’];
$from = “postmaster@mydomain.de”;
$header = “From: $from”;
mail($to,$subject,$message,$header);
unset($errors);

I’m using the Smarthost with the authentification from postmaster(me and master…)

But I do not get any Email!

in Maillog:

Apr 21 11:57:46 central postfix/pickup[23296]: 544BDEFD03: uid=48 from=
Apr 21 11:57:46 central postfix/cleanup[29619]: 544BDEFD03: message-id=20200421095746.544BDEFD03@mylocaldomain.lan
Apr 21 11:57:46 central opendkim[30401]: 544BDEFD03: no signing table match for ‘postmaster@mydomain.de’
Apr 21 11:57:46 central postfix/qmgr[23297]: 544BDEFD03: from=apache@mylocaldomain.lan, size=433, nrcpt=1 (queue active)
Apr 21 11:57:46 central postfix/smtp[29622]: Untrusted TLS connection established to mail.selfhost.de[82.98.82.25]:587: TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Apr 21 11:57:46 central postfix/smtp[29622]: 544BDEFD03: to=martin_droste@gmx.de, relay=mail.selfhost.de[82.98.82.25]:587, delay=0.6, delays=0.09/0.06/0.4/0.06, dsn=2.0.0, status=sent (250 ok 1587463066 qp 790)

this Mail does not arrive!

But the mail from Backup@mydomain.de is running fine through the Smarthost - so I’m haven’t looked after problems at Smarthost…

How to change from:?
Don’t know where to look - thx for help!

Martin

thx everybody for reading!

I used the 5’th paramter “additional_parameters” -f[sender address]

mail($to,$subject,$message,null,"-finfo@mydomain.de")

martin

2 Likes