• Ubuntu 14.04 installed as a VM on a machine that sends emails, with attachments, via Perl 5.18.2. That part works because Perl talks directly to the SMTP server.
  • Let's call the machine name "myubuntu".
  • I have cron jobs that used to send the local "myubuntu" account mail when done which included any error messages. I read the emails via alpine.
  • I recently installed SSMTP, Postfix, sendemail to try and send emails with attachments via cron, but those didn't send attachments. I suspect these uninstalled sendmail.
  • My cron jobs run fine, as my Perl program emails them to another email, but my cron jobs no longer send email to the local 'chuck' account on the machine "myubuntu".
  • I believe I changed my "myubuntu" to "myubuntu.net" somewhere but I don't remember where. I checked /etc/hosts and /etc/hostname to no avail.
  • When using alpine to send a test email from 'chuck' to 'chuck' I get this error: "Cannot find /usr/sbin/sendmailb".
  • So I installed sendmail, and tested this with an 'at' job, but got no email on "chuck@myubuntu".
  • When I ping "myubuntu.net" I get: 5 packets transmitted, 0 received, 100% packet loss. I have the same problem when I ping

How do I get cron to send email back to the local 'chuck' account again? Crontab has "MAIL=chuck" in the crontab file. Why isn't that going to the local account?

Should I uninstall postfix, ssmtp, and sendmail?


EDIT: when I type 'mailq' I get this error on every email: "Deferred: Connection timed out with []". So perhaps my /etc/hosts file is not set up right, or I didn't refresh it correctly? How do I refresh things when I change my /etc/hosts?

1 Answer 1


You just installed 3 different applications providing sendmail in addition to most likely screw the config file of postfix, maybe more?

However, it is no real disaster, as you sound slightly new to this topic would I suggest that you do a sudo apt-get purge sendmail postfix ssmtp.

Then decide on which one of the to install again. If you decide to go with postfix, pick local-only. If i don't remember wrong, postfix will set the domain to localhost.

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.