LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 46
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.
 
Old 10-18-2010, 05:21 PM   #2
rweaver
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, 05:57 PM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
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 ...
Make a backup of the script before changing it.

Regards
 
Old 10-19-2010, 06:08 AM   #4
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

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


Reply


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-02-2011 12:24 AM
Sendmail - Masquerade loftus49 Fedora 1 06-05-2010 06:28 PM
MASQUERADE in SENDMAIL reply2vinay Linux - Networking 3 12-16-2005 08:44 PM
how to masquerade domain on sendmail? nabil_boussetta Linux - Software 1 02-24-2004 07:41 AM
sendmail Masquerade kudos Linux - General 1 01-03-2003 08:06 AM


All times are GMT -5. The time now is 10:04 PM.

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