SMTP Monitoring to find origin of messages

Hi,

I have a issue and do not really find a feasible solution to my problem. I hope that maybe someone has a good pointer on how to tackle this issue.

Basically the problem is that I have a Linux server with postfix. I also have logwatch installed and get a daily report. There are maybe about 200 mail accounts on this server.  Most of them are not to active but logwatch says that 7k messages are send. So I do suspect maybe some of the programs hosted on this server has some exploit that allows some outside person to maybe send messages using my server by exploding a possible faulty script.
I wonder if there is any way to find something like this with some monitoring script or reporting script. Any tips on how to tackle a situation like this so that I can tighten the server and ensure nobody is using my machine to possible send spam.

Best wishes,
Thomas
ThomasPartnerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chris HInfrastructure ManagerCommented:
One thing you might consider is that the email origination on the inbound emails is spoofed to your mail server domain, so when the 'dumb' report runs, it merely collects all the data in the "from" field on your emails and is making it look like (just in the report) you sent a bunch of crappy email.

Say your domain is domain.com and I craft an email from "bill@domain.com" to "thomas@domain.com" all the time knowing both accounts are active.  If you don't have recursive spoof detection enabled/installed on your perimeter, your mail server (postfix especially) will accept it and store it.  This is  a pretty common spam tactic to confuse simple spam traps.  Someone has probably harvested your user list.

The best solution would be to route the domain through a spam service, spam appliance, or install and configure spam assassin or @SSp on your network.
0
frankhelkCommented:
If you're not sure what causes the messages to be created, some kind of "brute force attack" could help. Chances are good that the mails are transferred w/o SSL encryption - so I would try to set Wireshark onto the network traffic, set up with an appropriate capture filter (to intercept SMTP traffic only, and maybe more smart conditions, i.e. to catch only the relevant header lines).

That way you're capable of reading the entire mail traffic and spot the suspect messages - but be prepared to read thru a huge heap of data, depending on the amount of data your users shove thru the server.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ThomasPartnerAuthor Commented:
Thanks guys this is good info.
choward16980: I do have a sam system implementer using AMAVIS-NEW, Spamassassin, DKIM, Razor2, OS_Fingerprint, ClamAV, SFP and even DMARC so I would hope this stuff does some detecting of these spoofs.

frankhelk: Wireshark sounds very interesting so I can see if anything is going on. I will play with this and see what is is capable of doing.
0
Chris HInfrastructure ManagerCommented:
I read this website 6 months back when I suspected our IIS server of being vulnerable.  It gave me the willies and seemed like more work than the actual creating of the website...

http://defencely.com/blog/10-popular-ways-hackers-hack-website/
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Servers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.