<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hey, thanks for a great package!  It's been a lifesaver!</div><div><br></div>Most of my servers have multiple IP addresses and today I needed the ability to check outbound SMTP from those secondary addresses instead of always using the primary address.  (I use check_smtp to test if my mail servers are blocked by blacklists that can't be checked through DNS (e.g. AT&T) and some of my servers use alternate interfaces for delivery.)  So I came up with this patch.  It adds a "-I" argument to check_smtp that will accept a hostname, IP or IPv6 address.  If the argument is supplied and the address is bound to the local machine, it will use it for the outgoing connection.  If it can't bind to the address, it will print an error and exit with UNKNOWN status.  Since the meat of the changes are in netutils.[ch], it should be trivial to add a similar argument to other tests as well, if anyone wants to.<div><br></div><div>The patch is against version 1.4.16.  It compiles cleanly and works on CentOS 5.9.<br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><br class="Apple-interchange-newline">-- Sam Clippinger</div><div><br></div><div></div></span></div></div></body></html>