1

I'm running Ubuntu 12.04.1 LTS. I know very little about Ubuntu but have the task of administering an Ubuntu server for our hospital intranet. The server is on a virtual machine running Moodle. Moodle sends mail fine and is set to use an SMTP IP address through port 25. However, PHP forms are not sending email properly.

I can't get either of the tests mail ( 'your@email.com', "Test mail", "Test mail from your server name" ); or echo "This is a test." | mail -s Testing someone@example.com to send.

I installed exim4-daemon-light but I suppose I may not have configured it correctly. I have done a sudo /etc/init.d/apache2 reload.

I also tried installing ssmtp but the configuration confuses me.

The server has a folder etc/postfix so I presume that is installed also, so I probably have all kinds of tools, one of which just needs to be configured properly?

After installing ssmtp and changing the config, I get the error sendmail: Cannot open mailhub:25

Can I get someone to help me troubleshoot this or help with the next troubleshooting step?

We have another VM that sends mail fine, but I can't find a difference in config from that one to this one - not sure where all to look though.

  • It looks like I figured this out. I added the line mailhub=10.0.0.68 to etc\ssmtp\ssmtp.conf and that seems to have solved my issue. – NathanB Jul 14 '14 at 18:33
  • Fee free to post that as an answer to your question as you will then get reputation. – Tim Jul 14 '14 at 20:46
1

Answered by OP in comments

I added the line mailhub=10.0.0.68 to etc\ssmtp\ssmtp.conf and that seems to have solved my issue.

  • Thanks - I didn't have the points to be able to do that until 7 hours later. – NathanB Jul 15 '14 at 13:55

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.