Patches for check_smtp bug fix [sf#934025] [#277]