Hello,
I must be dim. How can I make qmail-inject not rewrite my From
headers? Even when I call
/var/qmail/bin/qmail-inject -f "[EMAIL PROTECTED]"
or
/var/qmail/bin/qmail-inject [EMAIL PROTECTED]
the hostname is rewritten with my server's FQDN...
I'm writing directly to qmail-inject via PHP's fopen() and fput()
functions, which work very nicely for my purposes, if I can get over
this hurdle.
The qmail-inject man page indicates that the -f flag overrides Return-
Path, and From, if they are supplied. It also states that I can set
QMAILHOST to accomplish the same thing... forgive me if this is
an extra-stupid question, but I've been RTFM and I still have no
idea what the syntax or method would be to do this.
Here is the PHP code from my test:
$to = "[EMAIL PROTECTED]";
$email = "[EMAIL PROTECTED]";
$host = "margecares.com";
$subject = "host piped email message";
$message = "here is the message body\n$email";
$fp = popen('/var/qmail/bin/qmail-inject [EMAIL PROTECTED]',
"w");
fputs($fp,"To: $to\n");
fputs($fp,"QMAILHOST: $host\n");
fputs($fp,"From: $email\n");
fputs($fp,"Subject: $subject\n\n");
fputs($fp,$message);
fputs($fp,"\n");
pclose($fp);
print("email pipe sent with host info");
This does not work - margecares.com is replaced with
samurai.dynamisys-llc.com.
Any examples or suggestions appreciated.
J!M