Activities

September 2012
M T W T F S S
« Aug   Oct »
 12
3456789
10111213141516
17181920212223
24252627282930

Redmine :Sending mail (hostname was not match with the server certificate

Recently I had to change the smtp server details used on our Redmine system to the one Cpanel created. I created a Cpanel email account and trying to configure it on Redmine configuration file (config/configuration.yml) under the rails folder.

Here are my entries I used earlier which work well.

vi config/configuration.yml
production:
  # Outgoing emails configuration (see examples above)
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: mail.mydomain.com
      port: 25
      domain: mydomain.com
      authentication: :login
      user_name: "redmine@mydomain.com"
      password: "pass123"

I got the error “An error occurred while sending mail (hostname was not match with the server certificate” when I try to send a test mail using the options on Redmine web (Administration–>Settings–>Email notification). I tried lots of attempts even I configured to use localhost to send email. Nothing help me and finally I found the solutions after few hours of Googling.

We may need to add “enable_starttls_auto: false” in config file as Cpanel forcefully client to use ssl/tls mechanism to send email over it. My colleague has identified this issue.

So my new configuration will be as follwoing and I could able to send email over the Redmine now finally.

code>production:
# Outgoing emails configuration (see examples above)
email_delivery:
delivery_method: :smtp
smtp_settings:
address: mail.mydomain.com
enable_starttls_auto: false
port: 25
domain: mydomain.com
authentication: :login
user_name: “redmine@mydomain.com”
password: “pass123”

By the way I found that smtp authentication would have issue if you enable the option “authenticate POP before SMTP”. So you MUST be disable it if you are using those email account solely for sending purpose configured on other programs.

Use this command to disable “Authenticate POP before sending” option in WHM/Cpanel :

 /usr/local/cpanel/bin/tailwatchd --enable=Cpanel::TailWatch::Antirelayd

1 comment to Redmine :Sending mail (hostname was not match with the server certificate

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>