Whenever I send stuff out on my mailing list (which I use PHPList for...) the from field always looks like this:
From: httpd (httpd@www.mysite.com) ....
Do I have to edit sendmail.cf to change this or what? Is it something I have to live with if sendmail is called through the web interface of the mailing list software??
Thanks.
Lawrence
07-05-2001, 07:48 PM
I use sendmail with Perl, but maybe I can help you a little.
If a script doesn't specify the from field when using sendmail, sendmail just inserts user@yourdomain.com as the sender. httpd is the username of Apache.
In Perl, you use sendmail like this:
open (SENDMAIL, "| /usr/lib/sendmail -t");
print SENDMAIL "From: you@whatever.com\n";
print SENDMAIL "To: them@somewhereelse.com\n";
print SENDMAIL "Subject: Whatever\n\n";
print SENDMAIL "Body of message.";
close SENDMAIL;
If you haven't guessed already, the From: and To: headers etc are where you specify details of the sender, recipient, subject and so on.
You might be able to find something similar in the script that you're using, even though it's in another language. Although I'm sure someone else will come along with something a little more helpful for you...