Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

1 Answer 1

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: http://ubuntuforums.org/showthread.php?t=961511 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 ( https://bugs.launchpad.net/ubuntu/+source/sendemail/+bug/1072299 ), 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
add comment

Your Answer

 
discard

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.