sendmail masquerade for apache
I have a website running in apache that has a php file that send an email out. The emails are getting rejected because of supposed invalid senders. I had a problem similar to this on another server, and it the user who was sending the mail's home directory, i had to make a file named .muttrc that contained the following two lines to get its emails to be accepted.
set envelope_from=yes set from="me@correctdomain.com" but for apache its home directory is /var/www. so do i just make the same file in there, i'm assuming the apache user is the account since that runs apache. sorry, but i'm not real good with apache or sendmail, so this post may be lacking. |
The mail system and most unix programs don't care where somethings home directory is so long as they know what it is (as far as dot files go). If that doesn't solve it for you, what specific error are you getting and can you supply headers for the message you're having issues with?
|
Hi,
You can modify the php script to use the -f option (from address) in the sendmail command it uses to send the email. It should start like this: Code:
sendmail -f sender@somedomain.com ... Regards |
Thanks, after putting that file there it now works with using a sender like that.
|
All times are GMT -5. The time now is 10:57 AM. |