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 recently set up an old box with Ubuntu 12.10 and LAMP running on it. I am using php as my cron jobs and would like to send an email as part of the scripts. I have set up sSMTP / Sendmail instead of a full mail server because there is already an Outlook 2010 server running on the network and do not want to cause any issues with that in regards to receiving mail.

I have input the correct details into ssmtp.conf but I keep getting the error: 'Cannot open ip:25'

In the conf file I believe it is the mailhub setting, within this setting I have tried using the local and external IP address for the exchange server, I have also tried using the domain mail.*.co.uk

I have searched and searched but cannot find any help in regards to this problem, everyone seems to forward there smtp to google but the data I will email will be private and would much rather do it locally for security reasons.

Thank you so much for reading,

share|improve this question
    
Can you telnet at the Exchange Server's port 25? Have you checked whether the Exchange configuration accepts connections from this machine? –  adamo Jan 22 '13 at 15:35
    
Thank you for your reply, The configuration does allow connections, I was originally having authentication issues but that is now sorted. Yes I can telnet into it. I have tried using'UseTLS=Yes' which the server accepts and 'AuthMethod=LOGIN' + other variants like CRAM-MD5. –  AzzerB Jan 22 '13 at 16:07

1 Answer 1

Since you use TLS then you will need to change the port to 587 or 465

share|improve this answer
    
Thank you for your reply, I have just tried using those ports but unfortunately no luck. There was a long delay but the error was again the same as above, 'cannot open..' . I have added the Ubuntu IP address to the allowed servers/users list on the exchange management console but that didnt work either. I'm really scratching my head with this one. I have looked at a full email server but I cant afford any interference with the Exchange server. –  AzzerB Jan 22 '13 at 16:24
    
OK , try to eliminate the possible source of the error ... try sendemail with a gmail account , 'sendEmail -f "the sender <sender@gmail.com>" -t the reciver@somedomain.com -u "This is subject" -m "This is body" -s smtp.gmail.com:587 -xu sender@gmail.com -xp Somepassword -o tls=yes' if it worked then it is your exchange config –  BluesRhythm Jan 22 '13 at 16:31
    
Thanks @BluesRhythm, I have just tried this but there were multiple issues, I had to install sendemail then there were authentication issues with the tls, all in all I have had no luck but will keep trying :) –  AzzerB Jan 22 '13 at 16:54
    
You can also try with ssmtp This configuration is valid and i use it en.gentoo-wiki.com/wiki/Gmail_and_sSMTP –  BluesRhythm Jan 22 '13 at 16:58

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.