How to configure GMail SMTP on XenServer 6.5 to monitor and alert about your MDADM Array
- 
 First go register for a gmail account that will be used for this purpose. If you already have one to use for this purpose, great. Now that you have that, lets go and make some changes to the system. cd /etc/ssmtp cp ssmpt.conf ssmtp.conf.bak sudo nano ssmtp.confIn here will be a few things to add mailhub=smtp.gmail.com:465Remove the # from UseTL UseTLS=YESAdd the following fields without quotes around the gmail name or password. AuthUser='gmail name' AuthPass='password'Save this file and exit out of it. Now lets go modify our mdadm.conf file. sudo nano /etc/mdadm.confAdd the below record, again without quotes around the email account. MAILADDR '[email protected]'Save the file and exit Now to test the email settings. sudo mdadm --monitor --scan --test -1There you have it, MDADM Disk Array monitoring for your Software Array on Xen Server. 
- 
 [root@xenserver2 ssmtp]# sudo mdadm --monitor --scan --test -1 
 sendmail: Cannot open mail:25Any ideas? BTW this is not using gmail, using our Cox smarthost with no auth/security 
- 
 @mazterjedi said in How to configure GMail SMTP on XenServer 6.5 to monitor and alert about your MDADM Array: [root@xenserver2 ssmtp]# sudo mdadm --monitor --scan --test -1 
 sendmail: Cannot open mail:25Any ideas? Can you post the output of this cat /etc/ssmtp.conf
- 
 @mazterjedi said in How to configure GMail SMTP on XenServer 6.5 to monitor and alert about your MDADM Array: [root@xenserver2 ssmtp]# sudo mdadm --monitor --scan --test -1 
 sendmail: Cannot open mail:25Any ideas? BTW this is not using gmail, using our Cox smarthost with no auth/security Have you tested to see if your ISP allows port 25 out? Not all do. Also, is Sendmail or Postfix listening locally? Let's start there as that is easy: netstat -tulpn | grep 25What is the output? 
- 
 @mazterjedi said in How to configure GMail SMTP on XenServer 6.5 to monitor and alert about your MDADM Array: [root@xenserver2 ssmtp]# sudo mdadm --monitor --scan --test -1 BTW this is not using gmail, using our Cox smarthost with no auth/security Just use gmail, accounts are free, and super simple to setup. 
- 
 @scottalanmiller said in How to configure GMail SMTP on XenServer 6.5 to monitor and alert about your MDADM Array: @mazterjedi said in How to configure GMail SMTP on XenServer 6.5 to monitor and alert about your MDADM Array: [root@xenserver2 ssmtp]# sudo mdadm --monitor --scan --test -1 
 sendmail: Cannot open mail:25Any ideas? BTW this is not using gmail, using our Cox smarthost with no auth/security Have you tested to see if your ISP allows port 25 out? Not all do. Also, is Sendmail or Postfix listening locally? Let's start there as that is easy: netstat -tulpn | grep 25What is the output? Most don't, I have found. 
- 
 @scottalanmiller said in How to configure GMail SMTP on XenServer 6.5 to monitor and alert about your MDADM Array: netstat -tulpn | grep 25 [root@xenserver2 ssmtp]# netstat -tulpn | grep 25 
 tcp 0 0 127.0.0.1:5902 0.0.0.0:* LISTEN 5525/qemu-dm-3
 [root@xenserver2 ssmtp]#
- 
 @mazterjedi said in How to configure GMail SMTP on XenServer 6.5 to monitor and alert about your MDADM Array: @scottalanmiller said in How to configure GMail SMTP on XenServer 6.5 to monitor and alert about your MDADM Array: netstat -tulpn | grep 25 [root@xenserver2 ssmtp]# netstat -tulpn | grep 25 
 tcp 0 0 127.0.0.1:5902 0.0.0.0:* LISTEN 5525/qemu-dm-3
 [root@xenserver2 ssmtp]#You have no email server. That will do it. yum -y install postfix
- 
 @scottalanmiller 
 [root@xenserver2 ssmtp]# yum -y install postfix
 Loaded plugins: fastestmirror
 There are no enabled repos.
 Run "yum repolist all" to see the repos you have.
 You can enable repos with yum-config-manager --enable <repo>
 [root@xenserver2 ssmtp]#[root@xenserver2 ssmtp]# yum repolist all 
 Loaded plugins: fastestmirror
 repo id repo name status
 base/7-2.1511.el7.centos.2.10/x86_64 CentOS-7-2.1511.el7.centos.2 disabled
 base-debuginfo/x86_64 CentOS-7 - Debuginfo disabled
 base-source/7-2.1511.el7.centos.2.10 CentOS-7-2.1511.el7.centos.2 disabled
 centosplus/7-2.1511.el7.centos.2.10/x86_64 CentOS-7-2.1511.el7.centos.2 disabled
 centosplus-source/7-2.1511.el7.centos.2.10 CentOS-7-2.1511.el7.centos.2 disabled
 extras/7-2.1511.el7.centos.2.10/x86_64 CentOS-7-2.1511.el7.centos.2 disabled
 extras-source/7-2.1511.el7.centos.2.10 CentOS-7-2.1511.el7.centos.2 disabled
 updates/7-2.1511.el7.centos.2.10/x86_64 CentOS-7-2.1511.el7.centos.2 disabled
 updates-source/7-2.1511.el7.centos.2.10 CentOS-7-2.1511.el7.centos.2 disabled
 repolist: 0
- 
 Unfortunately, I have no clue what this means. 
- 
 Ah, the ever present "no repos" in XS. Nice to see you again. Boy does XS like being an appliance, or what? 
- 
 Do this... yum-config-manager --enable base yum-config-manager --enable extras yum-config-manager --enable updates yum-config-manager --enable centosplusThen install again. 
- 
 @scottalanmiller said in How to configure GMail SMTP on XenServer 6.5 to monitor and alert about your MDADM Array: yum-config-manager --enable base [root@xenserver2 ssmtp]# yum-config-manager --enable base 
 -bash: yum-config-manager: command not found
 [root@xenserver2 ssmtp]#Does the ssmtp at the end of the prompt make a difference? Shouldn't it just be [root@xenserver2] ? 
- 
 @mazterjedi said in How to configure GMail SMTP on XenServer 6.5 to monitor and alert about your MDADM Array: @scottalanmiller said in How to configure GMail SMTP on XenServer 6.5 to monitor and alert about your MDADM Array: yum-config-manager --enable base [root@xenserver2 ssmtp]# yum-config-manager --enable base 
 -bash: yum-config-manager: command not found
 [root@xenserver2 ssmtp]#Does the ssmtp at the end of the prompt make a difference? Shouldn't it just be [root@xenserver2] ? That ssmtp at the end of the prompt is just showing you your folder location, no big deal. 
- 
 Does Xen not have yum-config-manager installed these days? What a pain. Anyone have the commands handy for enabling the repos manually? 
- 
 @scottalanmiller said in How to configure GMail SMTP on XenServer 6.5 to monitor and alert about your MDADM Array: Does Xen not have yum-config-manager installed these days? What a pain. Anyone have the commands handy for enabling the repos manually? Didn't we give up on this a while back? LOL. 
- 
 @BRRABill said in How to configure GMail SMTP on XenServer 6.5 to monitor and alert about your MDADM Array: @scottalanmiller said in How to configure GMail SMTP on XenServer 6.5 to monitor and alert about your MDADM Array: Does Xen not have yum-config-manager installed these days? What a pain. Anyone have the commands handy for enabling the repos manually? Didn't we give up on this a while back? LOL. No, that we got working. 
- 
 
- 
 @BRRABill said in How to configure GMail SMTP on XenServer 6.5 to monitor and alert about your MDADM Array: @scottalanmiller said No, that we got working. You sure about that? We will call it "moderately sure." 
- 
 @scottalanmiller said We will call it "moderately sure." You just keep thinking that. I seem to remember the final words before giving up were 
 "Why do you need this app installed anyway"
 And we found another option.But I could be wrong.  


