Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-18-2010, 03:46 PM   #1
Senior Member
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,748

Rep: Reputation: 49
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=""

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.
Old 10-18-2010, 04:21 PM   #2
Senior Member
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 164Reputation: 164
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?
Old 10-18-2010, 04:57 PM   #3
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,272

Rep: Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692

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:
sendmail -f ...
Make a backup of the script before changing it.

Old 10-19-2010, 05:08 AM   #4
Senior Member
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,748

Original Poster
Rep: Reputation: 49
Thanks, after putting that file there it now works with using a sender like that.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
masquerade domain on sendmail nabil_boussetta Linux - Software 6 04-01-2011 11:24 PM
Sendmail - Masquerade loftus49 Fedora 1 06-05-2010 05:28 PM
MASQUERADE in SENDMAIL reply2vinay Linux - Networking 3 12-16-2005 07:44 PM
how to masquerade domain on sendmail? nabil_boussetta Linux - Software 1 02-24-2004 06:41 AM
sendmail Masquerade kudos Linux - General 1 01-03-2003 07:06 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:46 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration