9

I'm a fool in linux. So i tried to set up some things on my root. Well and after time a suspicious cron job started to bomb me. i get about 1 email every 10 minutes saying:

Cron test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp

/usr/share/sendmail/sendmail: line 880: /usr/sbin/sendmail-msp: No such file or directory

Does someone know what this could be?

The email is adressed to "root@example.com"....

greetings

Philipp Spiess
  • 3,263
  • 4
  • 26
  • 34

4 Answers4

19

Solution:

apt-get --purge remove sendmail-base sendmail-cf sendmail-doc

This just popped up for me too. I thought that I had removed sendmail when I installed Postfix but these cron jobs started popping up. Removing the sendmail file from /etc/cron.d worked until I restarted the machine, at which point it was regenerated. Removing the packages listed solved the problem once and for all. :-)

jrn75
  • 336
  • 2
  • 4
  • I did exactly as you did. Initially, I only removed the cron entry and when restarted the emails came back flooding my inbox. Only after removing the entire sendemail packages, the emails stopped. Thanks for sharing the solution. – Pothi Kalimuthu Dec 09 '12 at 01:56
3

Found it! Source: http://ubuntuforums.org/showthread.php?t=1557127&p=9743741#post9743741

The file /etc/cron.d/sendmail seems to be autogenerated by sendmail.

"Sendmail crontab - Call sendmail at various times to do the following:
1) Age queues - move undelivered mail to a slower queue
2) Retry any mail queued by the message submission process
3) run the queues (deliver mail) if a standalone daemon is not desired"

So if you go to

sudo nano /etc/cron.d/sendmail

and comment the line which fires the cron, I think you're done. But that's not the root of the problem.

I think you should go to edit this other file

sudo nano /etc/mail/sendmail.conf

and scroll down until the "queue" sections, follow the inline documentation and try until you got it :)

Regards!

chonz0
  • 371
  • 2
  • 5
3

It seems like your sendmail package isn't completely installed. Try to find our which package contains sendmail-msp and install this package. You shouldn't receive mail anymore.

Daniel
  • 27,718
  • 20
  • 89
  • 133
3

On my ubuntu system, it's /etc/cron.d/sendmail

This seems to be a file left over from when I had sendmail installed: dlocate -S /etc/cron.d/sendmail returns nothing...

So I just removed it.

I also found a couple other sendmail-* packages removed but not purged. When I purged them, it all went away. :-/

docwhat
  • 11,435
  • 6
  • 55
  • 54
  • Removing the file did seems to work for me, unfortunately it reappeared when I rebooted the server. So instead I edited the file to comment out the cron job, this seems to survive a reboot. – Roger Ertesvag Jan 10 '12 at 08:52
  • Yeah, I discovered after I posted above that there were other packages that were removed but not purged. I edited my answer to add that info. – docwhat Jan 10 '12 at 21:08