Postfix and return path, spam problem

2 posts / 0 new
Last post
#1 Thu, 12/08/2011 - 09:39
neorf

Postfix and return path, spam problem

When I try to send email via Php mail() function, if the domain I send from is "test.com" and email is "info@test.con", as return path in header I get: "test@server1.demo.com", where server1.demo.com is the hostname of my vps. So gmail put that email in spam folder. How could I get mail() function sending email via postfix with return path: info@test.com? So gmail and similar doesn't consider it as spam? I'm using virtualmin gpl in centos 5.7 & 6. Thanks

Neorf

Thu, 12/08/2011 - 09:56
stels88

http://php.net/manual/en/function.mail.php

<?php
 mail('test@example.org', 'Subject', 'Body', 'From: user@example.org', '-f user@example.org');
?>

-f user@example.org = your solution, try it and let us know,

Topic locked