I can send emails as root and when I go into mutt as root it connects to gmail's smtp servers but if I am a normal user (in this case Nagios) it does not connect to gmail's smtp server and will try to send it as nagios@sendemail@gmail.com instead of the sendmail@gmail.com account I have set up. Any help is greatly appreciated.

  • Tried running mutt as nagios with sudo and then it did root@sendmail@gmail.com. It only puts the user in the front with user accounts not with root account and only when I use root outside of sudo. – Brad Nov 11 '10 at 20:14

Your description of the problem is highly vague, so I can only estimate that it is something that can be solved by properly setting up ~nagios/.muttrc so that the sender's email address is sendmail@gmail.com:

my_hdr From: "Name Here" <sendmail@gmail.com>

Again this holds if I understand what you're asking.

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.