Stop exim and/or dovecot from running at startup

ioor

Verified User
Joined
Jun 29, 2008
Messages
9
I've removed monitoring of exim and dovecot in /usr/local/directadmin/data/admin/services.status. How do I stop them from running, since I don't keep mail on the server.

Or does directadmin use either of them, maybe to send out notifications? I'm running on a VPS with only 256MB ram.

I'm running on ubuntu.
 
I'm running on ubuntu 8.04.

Will e-mailing out notifications work if dovecot and exim are not running? And do I loose any other functionality by disabling them?
 
I don't suggest this modification, since both exim and dovecot have a very small memory footprint. But, since you asked...

You can disable them by running "update-rc.d -f remove exim" and "update-rc.d -f remove dovecot".
If you want to be able to receive mail from that server, you will need a functional "sendmail" binary, for example the one provided by the very small and simple "ssmtp" (you will have to deinstall exim). Run "aptitude install ssmtp" and configure it in /etc/ssmtp/ssmtp.conf", then add aliases (for example "root: [email protected]") to /etc/aliases.
I don't know how DA will react when deinstalling exim, I never did it. You are on your own ;)
 
thanks!

I had some problem with the server so I did a full reinstall and now I run debian 4.0 with exim disabled and dovecot not even installed and mail notifications still work!

Hopefully exim and dovecot only serve as mail server back and front end and not having them doesn't mess anything else up..
 
Interesting. I guess the only problem will be the queue: if a message can't be delivered, it will stay in the queue until exim is run or you retry it manually from DA.
Keep an eye on "Mail Queue Administration".
 
If exim isn't running as a daemon it's still called by server processes that need to send email, and usually also by user programs that need to send email.

I believe Undeliverable emails will end up staying in the queue.

To be sure I suggest you try sending out an undeliverable email and then checking the exim logs to see what happens to it.

Jeff
 
How do I check the queue?

EDIT:

I ran exim -bp and got a list of undeliverable mail. How can I say, delete mail that has been undeliverable for x amount of time/times?
 
Last edited:
Are you really, really sure you need to stop the exim daemon, which will take care of that for you?
My larger server's exim daemon has, while it idles, 8MB of virtually used memory, 1MB of real used memory from which 0.8MB are shared libraries. It doesn't hurt anybody, it's one of the smallest pieces of software running on a DA system.

I agree with your that with a 256MB VPS server you can't run a normal system, but shutting exim down won't do much.
On my systems, the daemons that are using much, much more memory are, in order: mysqld (that you can tune to use less memory), snort (that you probably haven't got, or shouldn't run), named (because it's a caching forwarding nameserver, and you shouldn't do it), spamd (I suggest you don't run SpamAssassin), PHP-CGI (because I use APC caching with FastCGI, use mod_php without any accelerator), Apache (use a smaller number of cached forks or threads), lfd (don't use any securing system, like CSF+LFD or APF), smokeping, munin, greylistd (you probably don't have these last three, or shouldn't run them) and many more. Exim is almost at the bottom of that list.

If you need professional help with that, contact me.
 
Thanks but I found this command to delete mail that's older than 1 day:

Code:
exiqgrep -o 86400 -i | xargs exim -Mrm

I set up a cronjob to run it twice a week, I think that will be enough.

And yes if I can I'd like to stop any unneccessary service to run. It's much cheaper for me and better, I think for the client to run the webmail through google apps.

Thanks very much for the help though!
 
Last edited:
Back
Top