Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> postfix and php
Guest_mmoor_*
post Jun 4 2006, 04:28 AM
Post #1





Guests






I just figured something out.

I host 4 site of myself on my server.

main.cf
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 <nobody@locahost.test.com) 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 ?
Go to the top of the page
 
+Quote Post
DS2K3
post Jun 4 2006, 06:07 AM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,284
Joined: 14-November 04
From: Southampton, Hampshire
Member No.: 4,165



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?


--------------------
Fixed your problem? Let us know!
richard@linuxhelp.net

www.Gathr.co.uk Online Event Management
Go to the top of the page
 
+Quote Post
Guest_mmoor_*
post Jun 4 2006, 06:59 AM
Post #3





Guests






conf.inc
***
$frommail = "From:info@test.com\nReply-To:info@test.com\nReturn-Path:info@test.com\nX-Mailer:BBB Mailer (1.0)\nX-Priority:1\nMSMail-Priority: high";
$email = "joe@test.com";
****

File
----
$headers = $frommail;
$message = "Test 22.\n\n";
$tempmes = "BB-Test";
mail($email, $tempmes, $message, $headers);
---
Go to the top of the page
 
+Quote Post
DS2K3
post Jun 4 2006, 09:52 AM
Post #4


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,284
Joined: 14-November 04
From: Southampton, Hampshire
Member No.: 4,165



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 (pear.php.net) 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.

D


--------------------
Fixed your problem? Let us know!
richard@linuxhelp.net

www.Gathr.co.uk Online Event Management
Go to the top of the page
 
+Quote Post
Guest_mmoor_*
post Jun 7 2006, 05:49 AM
Post #5





Guests






kinda found the error..
postfix -> main.cf

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 joetest.com then its From: joe@joetest.com received from billy.com (waht is the mail host). would be cool if there would be received from joetest.com. But i guess since all this stuff is limited. there is no way around, except to let a postfix run on each domain.
hmmm..
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 18th December 2017 - 09:55 AM