Forum
Welcome, Guest
Username: Password: Remember me
This is the optional category header for the Suggestion Box.

TOPIC:

How to get mail work? 4 years 6 months ago #1898

  • fow0ryl
  • fow0ryl's Avatar Topic Author
  • Offline
  • Posts: 13
Hi,
I have just installed HAlizard noSAN on 2 machines running a clean XCP-ng 8.0.
But I didn't get mail alerts work.

First I have set the parms
[19:17 XCP-222 ssmtp]# ha-cfg get
MAIL_FROM=admin@MYDOMAIN.de
MAIL_ON=1
MAIL_SUBJECT="SYSTEM_ALERT-FROM_HOST:$HOSTNAME"
MAIL_TO=henning@MYDOMAIN.de
SMTP_PASS=****************
SMTP_PORT=465
SMTP_SERVER=smtp.MYISP.de
SMTP_USER=admin@MYDOMAIN.de

When I try to send a test mail it failed
[19:23 XCP-222 ssmtp]# ha-cfg email_debug
Sending email from: admin@MYDOMAIN.de
Sending email to: henning@MYDOMAIN.de
Email Alert Subject: SYSTEM_ALERT-FROM_HOST:XCP-222
Email Alert Timestamp: Thu Sep 19 19:48:02 CEST 2019
Email Alert Process: ha-lizard Version: 2.2.1
Email Alert Message Content: Test Message ID 5777e8fd-e9ea-4417-9a3f-dd03af91d24f
Email Alert Message Hostname: XCP-222
Traceback (most recent call last):
  File "/etc/ha-lizard/scripts/email_alert.py", line 105, in <module>
    message = smtplib.SMTP(smtp_server, smtp_port, hostname)
  File "/usr/lib64/python2.7/smtplib.py", line 255, in __init__
    (code, msg) = self.connect(host, port)
  File "/usr/lib64/python2.7/smtplib.py", line 316, in connect
    (code, msg) = self.getreply()
  File "/usr/lib64/python2.7/smtplib.py", line 364, in getreply
    + str(e))
smtplib.SMTPServerDisconnected: Connection unexpectedly closed: timed out

To verify that sending mails works as expected from a XCP-ng powered server I confiured ssmtp. And native ssmtp worked. as expected.
[19:49 XCP-222 ssmtp]# cat /etc/ssmtp/ssmtp.conf
root=admin@MYDOMAIN.de
mailhub=smtp.MYISP.de:465
RewriteDomain=MYDOMAIN.de
Hostname=MYDOMAIN.de
FromLineOverride=NO
UseTLS=YES
AuthUser=admin@MYDOMAIN.de
AuthPass=****************

How to configure mail alerts the right way?

Henning

Please Log in or Create an account to join the conversation.

Last edit: by fow0ryl.

How to get mail work? 4 years 6 months ago #1901

  • Salvatore Costantino
  • Salvatore Costantino's Avatar
  • Offline
  • Posts: 722
We found a bug in the email handler that only affected SSL connections. A new release will be available in roughly 1 week with a fix. If you need something sooner, reply here and the affected file with the fix can be posted for you. Alternatively you can try TLS with your mail server instead of SSL which should work for now.

Please Log in or Create an account to join the conversation.

How to get mail work? 4 years 6 months ago #1902

  • fow0ryl
  • fow0ryl's Avatar Topic Author
  • Offline
  • Posts: 13
Hm,
does this mean, a new HA-Lizard Release will be available soon? I haven't found a roadmap here :(
I have planned to migrate 2 productive Servers from XenServer 6.2 to XCP-ng 8.0 and HaLizard 2.14 on October 3rd.
Maybe its a good idea to wait some more days to walk around the update process ...

Henning

Please Log in or Create an account to join the conversation.

How to get mail work? 4 years 6 months ago #1903

  • Salvatore Costantino
  • Salvatore Costantino's Avatar
  • Offline
  • Posts: 722
Yes. There will be a new release with a few small bug fixes.

Please Log in or Create an account to join the conversation.

How to get mail work? 4 years 5 months ago #1915

  • fow0ryl
  • fow0ryl's Avatar Topic Author
  • Offline
  • Posts: 13
Hello Salvatore,

thank you for your kindly support.

I have to update my servers from XenServer to XCP on thursday, starting at 5:00pm since this is the only usable maintenance window until december. :(
I found a new version noSAN-combined at halizard.org/release/ but halizard.com points still to the old version.
Can I use / should I use the new version from halizard.org?

Henning

Please Log in or Create an account to join the conversation.

How to get mail work? 4 years 5 months ago #1916

  • Salvatore Costantino
  • Salvatore Costantino's Avatar
  • Offline
  • Posts: 722
A new version was posted last night to ha-lizard.org/release. You should use this one. We will get the website versions updated this week

Please Log in or Create an account to join the conversation.