0

This is my exim usage

enter image description here

What makes it odd is that exim4 mail server service is STOPPED Also none of my sites is actually sending any emails. (This is on a VPS)

How I can find what is sending emails if any? And is it at all possible when this service is off? Can php send emails on it's own?

1
  • 1
    This is not odd. It's what I would expect if you stopped your mail server. Something is trying to send email. Jan 3, 2015 at 14:24

3 Answers 3

2

I'd guess that this is output from cron jobs.

Have you looked at what's in the Exim queue?

exim -bp

You can also use exim to look at the headers and bodies of the queued messages using queue ids from the above command's output ...

exim -Mvh 1Xy5Qg-0003xF-AH 

exim -Mvb 1Xy5Qg-0003xF-AH 

If exim -bp doesn't show anything, that implies that something else if leaving files in Exim's spool directory and confusing your stats.

1

Exim try to submit a message, receiving MTA decline submission, message is stored in the queue for later trials and that is why your queue is growing.

You have to investigate why does your messages are declined. Good starting point is the /var/spool/exim/msglog - each declined message have separate file here.

1

Your queue is growing as would be expected when you stop Exim. Usage seems to be quite low with a few messages at about 5 in the morning when cron often runs daily jobs. Usage is also heavy early in the evening.

Even if the service is stopped, it is commonly called by running the program and submitting the messages. Normally, this call would deliver the mail immediately, or queue the message for later delivery. This is likely what you are seeing. As messages are queueing, it is likely that the some (all) destinations can not be reached.

PHP and other languages have modules for sending emails. These usually default to using the local server. Normally, there are options that can be set to specify a different host to be used.

You can see where the mail is coming from by looking at Exim's log file. This is often /var/log/exim/mainlog. The details there should show where the messages are coming from, and to whom they were sent.

The command sudo mailq should show all the messages and who they have been sent too. There are options to display the headers and contents of messages in the queue. Look for the options beginning -Mv in the man page.

Normally, you want a mail server running, although you may not want it listening on any public addresses. crontab and other programs use email to send notifications to their users. The default configuration can be tuned anywhere from a local server with local delivery to a full fledged Internet MX.

1
  • Well I just want to make sure that no one is using the server as a spam bot. Since none of the sites there really need to send mails I'm ok if stopping exim will make impossible for anyone to send emails. And wanted to make sure that this is the case? Of course I'll investigate as you suggested and update :)
    – user240891
    Jan 4, 2015 at 12:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .