LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 06-06-2007, 01:26 AM   #1
Swakoo
Member
 
Registered: Apr 2005
Distribution: Red Hat / Fedora / CentOS
Posts: 508

Rep: Reputation: 30
Apache spamming localhost


Hi guys,

I have a series of webserver serving php web content.

Recently my root user account is building up at very fast speed... 500++MB in a matter of 10minutes.

Apparently, I see alot of mail from localhost to postmaster and apache.. which causes bounce back as there are no valid apache mailboxes.

Also, there is one particular legit email (the web application is sending out newsletter occassionally) that seems to have fused with a spam email.

Fused as in, there are 2 subjectline and 2 message body.
Its still received from the localhost.

But otherwise mainly its just the earlier problem I mentioned... localhost/postmaster/apache spamming each other.

q1: Is there anyway I can prevent mails to be send to root user?
q2: is there ways to create user accounts in the server without it having a mail account? I know error messages from cron etc also gets send to mail..

I'm pretty lost as to how I should investigate this problem, so any help would be appreciated

I have currently stop sendmail to prevent root mail account from exploding.

At the same time I realise my maillog are building up to very big size...
One particular line which repeated so often is:
Quote:
Jun 3 06:47:45 web2 sendmail[8668]: l4T3Y4vf005836: to=root, delay=4+09:55:37, xdelay=00:00:09, mailer=local, pri=7017700, dsn=4.0.0, stat=Deferred: local mailer (/usr/bin/procmail) exited with EX_TEMPFAIL

Thanks!

Last edited by Swakoo; 06-06-2007 at 01:29 AM.
 
Old 06-06-2007, 02:31 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 9,599

Rep: Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000
Quote:
q1: Is there anyway I can prevent mails to be send to root user?
I think that's not a good practice to prevent mails to root, as many services will send notifications reporting problems etc.
Quote:
q2: is there ways to create user accounts in the server without it having a mail account? I know error messages from cron etc also gets send to mail..
If you want certain cronjobs to not send mail to root then add at the end of that cronjobs the: " /dev/null 2>&1", i.e: edit your crontab for a job you don't want mail to look like this:
Code:
00 01 * * * /path/to/cronjob > /dev/null 2>&1
If you want a user to not receive email then edit /etc/mail/aliases and make an alias for that user to /dev/null, i.e. for apache
Code:
apache: /dev/null
Don't forget to run
Code:
newaliases
for the changes to work.

Regards
 
Old 06-06-2007, 08:57 AM   #3
Swakoo
Member
 
Registered: Apr 2005
Distribution: Red Hat / Fedora / CentOS
Posts: 508

Original Poster
Rep: Reputation: 30
so in my case.. postmaster is sending invalid mails to apache.. which seems to bounce back to root... will the solution work?

Also.. how and what should i investigate what could be causing the problem?
 
Old 06-06-2007, 09:33 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 9,599

Rep: Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000
If you create the alias from apache to /dev/null, then any mail to apache will be discarded.
Quote:
Also.. how and what should i investigate what could be causing the problem?
Check to see if there are any known issues about the php mailing-list software you use. Perhaps someone is using it to spam.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
apache : localhost/ works localhost/index.html does not PhilA Linux - Server 4 05-27-2007 07:32 PM
Only able to see Apache as localhost, why? cucolin@ Linux - Server 6 01-09-2007 12:20 PM
Mail from Apache being rejected - Cannot route to sender apache@localhost.localdomain jimwillsher Linux - Networking 2 01-19-2006 12:41 AM
apache http://localhost/mysite ---> http://localhost/mysite/index.php how? ilnli Linux - General 8 06-04-2005 03:23 PM
localhost on apache Xing Linux - Software 5 09-28-2003 03:38 AM


All times are GMT -5. The time now is 03:06 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration