0

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)

1 Answer 1

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .