X-Git-Url: https://projects.mako.cc/source/attachcheck/blobdiff_plain/023d680cdab18123a86099680f3ac33f95196b67..b86228cb8f3f79c0f6d71a725995e334ad963118:/attachcheck diff --git a/attachcheck b/attachcheck old mode 100644 new mode 100755 index 60da156..6a625e9 --- a/attachcheck +++ b/attachcheck @@ -38,7 +38,11 @@ import re ## SUB: send message def send_message(): - mailpipe = os.popen("%s -t" % sendmail, 'w') + + global sendmail + sendmail = sendmail + " " + " ".join( sys.argv[1:] ) + + mailpipe = os.popen("%s" % sendmail, 'w') mailpipe.write( message_string ) sys.exit( mailpipe.close() ) @@ -111,7 +115,7 @@ if attachment_expected: # check for the confirmation if re.search( r'Subject: CONFIRM', message_string ): - message_string = re.sub( r'(Subject: )(CONFIRM )(.*?)\n', + message_string = re.sub( r'(Subject: )(CONFIRM)(.*?)\n', r'\1\3\n', message_string ) send_message()