LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   This may be a 'newbie' question (https://www.linuxquestions.org/questions/linux-server-73/this-may-be-a-newbie-question-893104/)

baldur2630 07-22-2011 03:56 AM

This may be a 'newbie' question
 
I should know an answer to this - but I don't. Here is the problem : -

I am running a CentOS 5.6 Server with a website and Forum. The website has a contact form and users can email various people in the organization. I have setup sendmail to send any mails like this to my email address on a Windows machine.

The problem is that there emails don't have a header which has the senders original email header. It comes from localhost on my sendmail. How can I get any mail generated from the apache site to ALSO send mail to root on the Centos Server? That way I should be able to see the header and report the spammer or block them.

SciFi-Bob 07-23-2011 05:49 PM

That depends on the method used to send email from the web site.
If you are in control of the source code, you can, for example, modify it to add a BCC to root@yourdomain for every message.

How this is done, depends on the script language of the web site.
(I'm not mentioning the privacy issues here)

I'm not sure it is possible to setup Sendmail to automatically BCC, but if it is, someone else may tell you how.

TenTenths 08-04-2011 11:37 AM

This is all down to your website application and the "Contact Us" script in use. In theory you can add the apache user to a list of users that are allowed to make use of the "-f" switch in sendmail which lets you re-write the "From" header rather than have the normal practise of the mail getting the details of the originating user (in this case the apache process). This isn't actually a server issue as the server is doing what it should do, you should really check the website script providers support site to see what they recommend.


All times are GMT -5. The time now is 08:11 AM.