Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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: pod51011.outlook.com Port:587 Encryption: TLS

What I tried:

- Defined the SMART_HOST in the sendmail.mc
- Generated and configured sendmail certificates
- Created the AuthInfo file with SMTP credentials
- Eliminated from sendmail.mc 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 : cyberciti.biz/faq/… I don't know if it works for encrypted smtp –  coincoin Jan 8 '13 at 15:38
    
But IMHO you are describing the reasons why many sysadmin decided to switch from sendmail to postfix :) –  coincoin Jan 8 '13 at 15:39
    
I saw that guide, but it makes changes directly to sendmail.cf (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

3 Answers 3

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

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 pod51011.outlook.com[157.56.242.230]:587: Connection timed out –  Rhyuk Jan 9 '13 at 20:35
1  
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 pod51011.outlook.com –  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 -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:587 –  Rhyuk Jan 10 '13 at 14:44
1  
But can you telnet pod51011.outlook.com 587 ? If not, some router along the way (or pod51011.outlook.com) is blocking access. –  adamo Jan 10 '13 at 16:11
    
Nop... cant ` telnet pod51011.outlook.com 587 Trying 132.245.1.182... telnet: connect to address 132.245.1.182: Connection timed out `. Then its gotta be some router, I don't think Office blocks a service they offer. –  Rhyuk Jan 10 '13 at 17:30

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. http://rs20.mine.nu/w/2011/07/gmail-as-relay-host-in-postfix/ 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 pod51011.outlook.com[157.56.242.230]:587: Connection timed out –  Rhyuk Jan 9 '13 at 14:00
up vote 0 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

 
discard

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.