Thanks for the reply. I didn't know what the default nagios user password was, so I had to reset it as root with passwd. Hopefully that doesn't break anything.
I've tried running the mail command through the nagios user like this (I'm not sure if it's the correct way):
su - nagios -c "/usr/bin/mailx email@example.com"
There is a prompt for the passwrd and I enter it but there is no output, or prompt for the input of the message.
I tried running the command as another user on the system (A normal user of the system, not one of the "special" users). With this user, I got the message and subject prompts like normal.
I also tried running something simple like "ls /" as both users. With the normal user, output appears, but with the nagios users nothing does.
I then tried creating a quick script called test.sh:
I then chmoded both the script and "testfile" to 777. I ran the script as the nagios user and no output was created, and the file remained. With the other user, both messages displayed, and the file was deleted.
Currently, I'm on a dynamic IP (DSL at home) and i'm using a dynamic dns service to update the name I use to access the server. The IP doesn't change too often; only when there is a power outage, or when I reset the router which is very rare.
All other services like mdadm and bugzilla which use the sendmail interface seem to work just fine. I'm using msmtp which is set up with my gmail account.
I'm not too interested in receiving emails on the server, just sending them, which is why i was using msmtp since i can easily send emails as my gmail account with it. Would that make a difference though?
EDIT: To add to the above, when I su into the user to get the prompt the normal user works as expected. I get into the console as the other user after entering their password. However, with the nagios user, it just pauses, and then comes back to my own prompt after I enter the password.