Module: check_mk
Branch: master
Commit: 84f0a3533bd7bf8feca9c11345d93f122a57c9a1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=84f0a3533bd7bf…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jul 27 13:17:12 2016 +0200
check_email can now also use stored passwords
---
checks/check_mail | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/checks/check_mail b/checks/check_mail
index a76aa11..e6c6faf 100644
--- a/checks/check_mail
+++ b/checks/check_mail
@@ -25,54 +25,54 @@
# Boston, MA 02110-1301 USA.
def check_mail_arguments(params):
- args = ''
+ args = []
fetch_proto, fetch_params = params['fetch']
- args += ' --protocol=%s' % quote_shell_string(fetch_proto)
+ args += [ '--protocol=%s' % fetch_proto ]
if 'server' in fetch_params:
- args += ' --server=%s' %
quote_shell_string(fetch_params['server'])
+ args += [ '--server=%s' % fetch_params['server'] ]
else:
- args += ' --server=$HOSTADDRESS$'
+ args += [ '--server=$HOSTADDRESS$' ]
fetch_use_ssl, fetch_port = fetch_params['ssl']
if fetch_use_ssl:
- args += ' --ssl'
+ args += [ '--ssl' ]
if fetch_port != None:
- args += ' --port=%d' % fetch_port
+ args += [ '--port=%d' % fetch_port ]
- args += ' --username=%s' %
quote_shell_string(fetch_params['auth'][0])
- args += passwordstore_get_cmdline(" --password=%s",
fetch_params['auth'][1])
+ args += [ '--username=%s' % fetch_params['auth'][0] ]
+ args += [ passwordstore_get_cmdline("--password=%s",
fetch_params['auth'][1]) ]
if 'connect_timeout' in params:
- args += ' --connect-timeout=%d' % params['connect_timeout']
+ args += [ '--connect-timeout=%d' % params['connect_timeout'] ]
if 'forward' in params:
forward = params['forward']
- args += ' --forward-ec'
+ args += [ '--forward-ec' ]
if 'method' in forward:
- args += ' --forward-method=%s' %
quote_shell_string(forward['method'])
+ args += [ '--forward-method=%s' % forward['method'] ]
if 'match_subject' in forward:
- args += ' --match-subject=%s' %
quote_shell_string(forward['match_subject'])
+ args += [ '--match-subject=%s' % forward['match_subject'] ]
if 'facility' in forward:
- args += ' --forward-facility=%d' % forward['facility']
+ args += [ '--forward-facility=%d' % forward['facility'] ]
if 'host' in forward:
- args += ' --forward-host=%s' %
quote_shell_string(forward['host'])
+ args += [ '--forward-host=%s' % forward['host'] ]
if forward.get('application'):
- args += ' --forward-app=%s' %
quote_shell_string(forward['application'])
+ args += [ '--forward-app=%s' % forward['application'] ]
if 'body_limit' in forward:
- args += ' --body-limit=%d' % forward['body_limit']
+ args += [ '--body-limit=%d' % forward['body_limit'] ]
if 'cleanup' in forward:
if forward['cleanup'] == True:
- args += ' --cleanup=delete'
+ args += [ '--cleanup=delete' ]
else:
- args += ' --cleanup=%s' %
quote_shell_string(forward['cleanup'])
+ args += [ '--cleanup=%s' % forward['cleanup'] ]
return args