Help - Search - Members - Calendar
Full Version: postfix and php
Linuxhelp > Support > Technical Support
I just figured something out.

I host 4 site of myself on my server.
append_at_myorigin = no

if I send mail through php (mail - command) i see in the maillog the following
mail drop <nobody>
then bounces from the target host, bitching about missing the domain part.
So all mail get send out as simple <nobody>

if I set this append_at_myorigin = yes

then it looks basicaly the same, except postfix mounts then < to the only <nobody>

Now this looks rather stupid if i send mail from my site 1 to someone, or if i send mail from my site 2 to some and all over is this silly <nobody> insite.

Is there a way to change this ?
CAn you post the PHP code? You can add addiotnal headers to mail pretty easily with PHP, which might get around the problem. Could you also post the actual logs?
$frommail = "\\\nX-Mailer:BBB Mailer (1.0)\nX-Priority:1\nMSMail-Priority: high";
$email = "";

$headers = $frommail;
$message = "Test 22.\n\n";
$tempmes = "BB-Test";
mail($email, $tempmes, $message, $headers);
PHP uses the systems sendmail command to send email (which differs from its behaviour on Windows). You might want to investigate using the Net::Mail Package from PEAR ( to implement a direct SMTP connection to the mailserver. This will allow you to set aLL the headers yourself, and postfix shouldn't mess with them.

kinda found the error..
postfix ->

append_at_myorigin = no
append_dot_mydomain = no

then the from is <nobody> not the from whats in the header but the received from. So all mail servers bitch becouse there is no domain.

i change this to
append_at_myorigin = yes
append_dot_mydomain = yes

then it works.. but its a bit silly.. if i send php mail from then its From: received from (waht is the mail host). would be cool if there would be received from But i guess since all this stuff is limited. there is no way around, except to let a postfix run on each domain.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.