Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a box running RHEL 6.3 and there's and application that needs to send out reports by mail, in order for this functionality to work I have to have mail configured in my box. In addition I thought it would be nice to receive my root alerts to my regular email instead of having to log into the box.

I have an Office 365 account created for the sole purpose of being used as the relay.

Office 365 SMTP Details:

SMTP: Port:587 Encryption: TLS

What I tried:

- Defined the SMART_HOST in the
- Generated and configured sendmail certificates
- Created the AuthInfo file with SMTP credentials
- Eliminated from localhost's loopback
- Got frustrated because even thought I configured everything (using different guides) sendmail kept trying to send them throught localhost.

After 8 hours of multiple tries:

- Gave up on sendmail and slept 12 hours due to a massive headache.
- Decided to use SSMTP (because sendmail was a PITA) and people said SSMTP was easy to configure.
- Configured SSMTP and for some reason SASLAUTH said it couldn't connect to the SMTP.
- Got frustrated again and uninstalled SSMTP.

And here I am, seeking for assistance cause I want to beat sendmail! Can anyone point me in the right direction?

share|improve this question
IIRC I had something similar to this working in production :… I don't know if it works for encrypted smtp – user130370 Jan 8 '13 at 15:38
But IMHO you are describing the reasons why many sysadmin decided to switch from sendmail to postfix :) – user130370 Jan 8 '13 at 15:39
I saw that guide, but it makes changes directly to (which in the header of it clearly says its a no-no) and it doesn't incorporate authentication with TLS. Meanwhile I'll research about postfix. Thanks! – Rhyuk Jan 8 '13 at 15:43

I also tried doing this with sendmail relaying via gmail, but opted to use postfix instead as it seemed MUCH more simple to setup. You dont have to go through the process of creating self signed certificates etc.. This howto is for gmail, but the process should be very similar for Office 365. Just a matter of finding out the server names, and authentication scheme. Geo

share|improve this answer
I followed the tutorial and this is what I'm getting: Jan 9 09:52:47 isvahlrtk01 postfix/smtp[12065]: connect to[]:587: Connection timed out – Rhyuk Jan 9 '13 at 14:00

After changing did you run /etc/mail/make in order to build Did you also run service sendmail restart after generating the new

share|improve this answer
Yes sir, did all that. I think it's gotta be network related, even though I have port 25/587 opened in my firewall. And right now (and the closest Ive been) is trying with postfix and I get this Jan 9 09:52:47 isvahlrtk01 postfix/smtp[12065]: connect to[]:587: Connection timed out – Rhyuk Jan 9 '13 at 20:35
The log message that you provide shows that the machine is longer running sendmail but postfix. Second the same log message shows that something is blocking port 587 traffic from that machine to – adamo Jan 10 '13 at 9:23
I created rules in my firewall for the input/output chain (just in case) for port 587. iptables -L -n command shows me ACCEPT tcp -- state NEW tcp dpt:587 – Rhyuk Jan 10 '13 at 14:44
But can you telnet 587 ? If not, some router along the way (or is blocking access. – adamo Jan 10 '13 at 16:11
After all it was that my companys network was blocking SMTP. – Rhyuk May 13 '13 at 20:05
up vote 1 down vote accepted

The reason why I couldn't connect to the SMTP was because my company was blocking SMTP access. Ended up using a local SMTP and used Postfix with these instructions to make it work.

Postfix relay through another mailserver

share|improve this answer

Your Answer


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.