I can't get cron to stop spamming me with completed job notifications. It's getting out of hand and starting to clog up my 'real' email server, so I'd like to just disable postfix while I figure out which job isn't going to /dev/null (any help on this is appreciated as well.)

I can stop the service, but everytime I reboot it kicks out all the emails it's been holding on to, and my mail server goes down ago.

How do I keep postfix from starting on boot, and how can I view its held messages?


Postfix is started in init.d, so you can use update-rc.d to disable it on startup:

sudo update-rc.d postfix disable

When you want to enable it again:

sudo update-rc.d postfix enable

Even if it's disabled you can still start it manually with sudo service postfix start.

If update-rc.d is not in your system, you'll have to install the package sysvinit-utils or sysv-rc, or similar (those are for 12.04, I don't remember if 10.04 use the same names).

As for the notifications, usually the email will give you a clue on which job sent it, but if you want to track all jobs run by cron, you can take a look at the crontab and /etc/cron.*. See the section NOTES in man cron for details.

crontab -l
sudo crontab -l
ls -lr /etc/cron.*

You could also check the syslog:

sudo grep -i cron /var/log/syslog

Stop the service as root: update-rc.d postfix disable View the queue as root: showq

Also see the SEE ALSO section in the manual page on the Web.

Each cron job that does not need E-mail output redirects output to /dev/null: For example,

15 5 * * * command > /dev/null 2>&1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.