Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a bit of an odd question that I'm having trouble solving, I've had a good search around, but can't seem to find something related online. My aim is:

  1. System mail for root is forwarded (I guess using exim) to /var/mail/username (I'm not sure how to test if I have setup exim correctly for this. (used dpkg-reconfigure exim4-config, and set it to use local only).

  2. I can manually use a mail command to send email using my gmail account smtp (I have a script that probes for my IP and sends me an email using the mail command, as my ISP tends to keep it dynamic, but I need my IP for ssh purposes)

share|improve this question
up vote 0 down vote accepted

Found a solution that should accomplish this, adding this in case anyone else ever wonders.

  1. I've set up exim as described above, and this works for the system mail via mutt as desired.

  2. In my ip script I now use the sendEmail command from the sendemail package to send an email using my gmail account (sudo apt-get install sendemail). Credit for this goes to the people in this forum: Just a quick side-note, there is a bug in 12.04/12.10 with the sendemail program at the moment, but there is a workaround ( ), and hopefully a more permanent fix in the package soon.

Now just need to find a secure way to store a password rather than just typing it in the script.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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