{"id":1137,"date":"2017-07-20T19:33:47","date_gmt":"2017-07-20T17:33:47","guid":{"rendered":"https:\/\/bergs.biz\/blog\/?p=1137"},"modified":"2017-07-20T19:34:59","modified_gmt":"2017-07-20T17:34:59","slug":"monitoring-microsoft-snds-status","status":"publish","type":"post","link":"https:\/\/bergs.biz\/blog\/2017\/07\/20\/monitoring-microsoft-snds-status\/","title":{"rendered":"Monitoring Microsoft SNDS Status"},"content":{"rendered":"<p>If you operate a mail server, you should be aware of its &#8220;reputation,&#8221; because a bad reputation can give you issues sending email to certain recipients.<\/p>\n<p>Microsoft operate a set of services called &#8220;<a href=\"https:\/\/postmaster.live.com\/snds\/\" target=\"_blank\"><span class=\"st\"><em>Smart Network Data Services<\/em> (<em>SNDS<\/em>)<\/span><\/a>&#8221; to protect their own email services. If they see spam or other &#8220;malicious&#8221; activity from your address space, they might put you on a blacklist, and based on that reject email from you. It is easy to register yourself so that you can query the status of your IP address space. Just visit the above site and get started.<\/p>\n<p>I created a quick&#8217;n&#8217;dirty monitoring script for Nagios to monitor the status of my IP address space in SNDS. Whenever there is data for one of my IP addresses, this script will return a WARNING status, so that I can look into it.<\/p>\n<p>The script looks like follows:<\/p>\n<pre>#!\/bin\/bash\r\n\r\nURL='https:\/\/postmaster.live.com\/snds\/ipStatus.aspx?key=12345678-1234-1234-1234-0123456789ab'\r\n\r\ncontent=\"$(curl -s $URL)\"\r\nsize=${#content}\r\n\r\nif [ $size -gt 0 ]; then\r\n\u00a0\u00a0 \u00a0echo \"WARNING:SNDS status seems to be UNHEALTHY\"\r\n\u00a0\u00a0 \u00a0exit 1\r\nfi\r\n\r\necho \"OK:SNDS status is OK\"\r\nexit 0<\/pre>\n<p>You also need command and service definitions in Nagios as follows:<\/p>\n<pre>define command{\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 command_name\u00a0\u00a0\u00a0 check_snds\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 command_line\u00a0\u00a0\u00a0 \/usr\/local\/lib\/nagios\/plugins\/check_snds\r\n}\r\n\r\ndefine service {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 host_name\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 my_host\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 service_description\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 SNDS\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 check_command\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 check_snds\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 use\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 generic-service-internal\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 notification_interval\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0 ; set &gt; 0 if you want to be renotified\r\n}<\/pre>\n<p>Now, Nagios will monitor the &#8220;reputation&#8221; of your address space for you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to setup Monitoring of your Microsoft SNDS Status.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58,4,122,84,46,1],"tags":[249,94,250,128],"class_list":["post-1137","post","type-post","status-publish","format-standard","hentry","category-communications","category-computers","category-english","category-networking-computers","category-security-computers","category-uncategorized","tag-email","tag-monitoring","tag-smtp","tag-spam"],"_links":{"self":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/posts\/1137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/comments?post=1137"}],"version-history":[{"count":5,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/posts\/1137\/revisions"}],"predecessor-version":[{"id":1142,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/posts\/1137\/revisions\/1142"}],"wp:attachment":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/media?parent=1137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/categories?post=1137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/tags?post=1137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}