| |||||||||||||||||||||||||||||||
|
Ok, I've fixed my problem. Rather than have my php scripts relay from one server to another, I have them simply do it via an SMTP socket request. At the risk of not being germane to Postfix, here's the code, FWIW: (this uses 'Mail' and 'Mime' from Pear) function send_out_mail($from, $subject, $html_body, $to) { $host = MAIL_SERVER_HOSTNAME; $crlf = "\n"; // note that Bcc / cc must be in both the headers AND the send() call $headers = array ( 'From' => $from, 'To' => $to, 'Date' => date("r"), 'Subject' => $subject); $mime = new Mail_mime($crlf); $mime->setTXTBody(strip_tags($html_body)); $mime->setHTMLBody($html_body); $total_body = $mime->get(); $headers = $mime->headers($headers); $params = array ( 'host' => $host, 'auth' => false); $params['localhost'] = hostname(); $smtp = Mail::factory('smtp', $params); $send = $smtp->send($to, $headers, $total_body); if (PEAR::isError($send)) { echo send->getMessage(); return 0; } else { return 1; } } On Jan 23, 2008 3:15 PM, Matt Walsh <walshes> wrote: > Howdy: > > I run a small website with a small cluster of machines, all on the same > LAN. > > One machine runs Postfix, and serves as my inbound/outbound email MTA for > ALL machines on the LAN. > > I've got said machine configured for a number of things, including DKIM, > DomainKeys (using DK-milter), and SPF. > > But sometimes other machines on the cluster want to send out email. This > is done programmatically from a PHP script. > > Because I'm somewhat lazy, and because it seemed to work, I just left > those machines with the default sendmail stuff but configured the "Smart" > relay host to point to my Postfix mail server (using the 'DS' sendmail > setting). > > This works. > > Almost, that is. > > I've noticed that the mail from the relayed machines does not have my > DKIM/Domain Keys header stuff. > > In fact as I look at the messages I see that in fact, the messages are > relayed in the purest sense of the word. It's just as if I sent a message > from one host to my Postfix server. I can see the SpamAssasin results and > everything. That's probably why the DKIM/Domain Keys business is not > happening - that must only happen on messages that are originated on the > Postfix server. > > So, I guess what I *really* want is a way to just have all my servers use > my Postfix server 'directly' as a remote server, not as a relay. > > Or, some way to have the desired effect of making relayed messages look > just like originated messages - with DKIM/Domain Keys and all. > > Any ideas? > > --Matt > > > >
| ||||||||||||||||||||||||||||||
© 2004-2008 readlist.com