LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-04-2014, 02:50 PM   #1
cp51
LQ Newbie
 
Registered: Sep 2013
Posts: 5

Rep: Reputation: Disabled
Local user repeatedly calling sendmail


Hi all,

I am managing a web/email server and have run into a problem.

My server is running Ubuntu 10.04

It is set up so that the user: web, maintains a set of webpages hosted on the server.

For some reason, periodically throughout the day, the web user calls sendmail and sends an empty message to an email address(not on this server). It is always the same email address, and I know who it is sending to, we just cant figure out why it is doing it.

So far, I have: Changed the web account password, locked the web account, set its shell to /bin/false to prevent sshing.

No one is logged in to the web user.
There are no cron jobs listed by the web user.
If I run: ps aux | grep web, the only thing that web user runs is the periodic sendmail command.

I'm thinking perhaps on some webpage someone has a form that sends an email that is being spammed, but I havent been able to find that yet.

Does anyone have any other insight on what may be causing this, or other places to look to see why the user keeps calling sendmail?

(I cant delete the web user because it handles the webpages...)

Thanks for any help.
 
Old 03-04-2014, 03:14 PM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Well, you've done some things that should be done is this situation.

Have you
Code:
grep -i *mail* /home/web/* -Rl
or possibly
Code:
find `pwd` /home/web -iname "*.php" -type f -exec grep -i mail
or some variation on those?

also, possibly
Code:
lsof +D /home/web
but this one requires paying a lot of attention as it may "fly by" on the screen, especially if it's a short attempt at sending.

Last edited by Habitual; 03-04-2014 at 03:16 PM.
 
Old 03-05-2014, 04:08 AM   #3
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Some CMS applications (like WordPress) also have a pseudo-cron where access to a web page can set off internal "jobs". Same could be happening if you're using a third-party library within your websites that's set to mail home every so often.
 
Old 03-14-2014, 12:25 PM   #4
cp51
LQ Newbie
 
Registered: Sep 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hi guys,

Thanks for the quick replies. I've been trying to run lsof when the mail is actually being sent, but it has been tricky trying to catch the process in action.

I dont have any CMSs running through the web user so I dont think that would be the problem. But if I am missing something, it should be a pretty routine consistent frequency of emails being sent out right? like equally spaced in time? I just ask because last week, I removed about 30k of these emails from the queue over the course of 3 days. This week, for whatever reason, I have only had about 200 for the whole week, which makes it a little more difficult to investigate.

Thanks for your help, I will keep investigating.
 
Old 03-14-2014, 02:12 PM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
I mistyped this in my reply:
Should be (and still should be checked)
Code:
find `pwd` /home/web_user -iname "*.php" -type f -exec grep -i mail {} \;
Please let us know.
 
  


Reply



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
RHEL6 sendmail & postfix can't use local user travischen Linux - Software 1 07-03-2011 08:09 PM
Sendmail local user email storage question n03x3c Linux - Newbie 2 11-10-2008 07:22 PM
Forward local mail to another local host using sendmail loopy69 Linux - Server 5 02-26-2008 05:38 PM
Calling a script from within rc.local does not work. oferu Linux - Newbie 9 06-12-2006 02:37 AM
local user on sendmail nabil_boussetta Linux - Networking 1 03-05-2004 07:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:11 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
Open Source Consulting | Domain Registration