>There is nothing about Postfix that needs editing. You just need to >set up PHP to supply the correct sender address.
OK did some experimenting, sending to a very sophisticated email service: Used the php command: $result = mail($to, $subject, $message, $headers, "-f address") With the generic posftix master and main files. I got greylisted for 300 seconds ( http://greylisting.org ) postfix retried after 300 seconds and I got rejected because the sender was myhost.localdomain, neither of which resolve on the internet. So I changed the main.cf file as follows: myhostname = www.first.com mydomain = first.com myorigin = $mydomain That worked after getting greylisted again and postfix retried in 300 seconds. There are some issues however: I can't set another domain. If I send email from second.com the header file on the recipient reads: Return-Path: second....@first.com Here are the values: $to = "recipi...@sophisticated.com"; $subject = "test message"; $message = "some message"; $headers = "From: webmeis...@second.com"; $result = mail($to, $subject, $message, $headers, "-f second.com") ; On the second try, I don't get greylisted. $result always seems to be 1 regardless Bill Shirley wrote > If your outbound mail isn't working, you should post the output of > postconf -n > so someone can help you. > > Bill > > > On 10/11/2017 1:59 PM, Wietse Venema wrote: >> certified: >>> Actually I don't know the postfix main and master config file edits >>> required >>> to send outgoing mail. The default ones seem to be only local? >>> >>> BTW Thanks Bill for the php script. Are you saying that will work with >>> default config files? Will definitely use something like that one the >>> config >>> files are OK. >> There is nothing about Postfix that needs editing. You just need to >> set up PHP to supply the correct sender address. >> >> Wietse Bill Shirley wrote > If your outbound mail isn't working, you should post the output of > postconf -n > so someone can help you. > > Bill > > > On 10/11/2017 1:59 PM, Wietse Venema wrote: >> certified: >>> Actually I don't know the postfix main and master config file edits >>> required >>> to send outgoing mail. The default ones seem to be only local? >>> >>> BTW Thanks Bill for the php script. Are you saying that will work with >>> default config files? Will definitely use something like that one the >>> config >>> files are OK. >> There is nothing about Postfix that needs editing. You just need to >> set up PHP to supply the correct sender address. >> >> Wietse -- Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html