projects
/
attachcheck
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed the requirement that there be whitespace between CONFIRM and
[attachcheck]
/
attachcheck
diff --git
a/attachcheck
b/attachcheck
old mode 100644
(file)
new mode 100755
(executable)
index
c72adbf
..
6a625e9
--- a/
attachcheck
+++ b/
attachcheck
@@
-6,6
+6,9
@@
# (c) 2005 -- Benjamin Mako Hill <mako@bork.hampshire.edu>
# Author/Software Homepage at: http://mako.cc
# (c) 2005 -- Benjamin Mako Hill <mako@bork.hampshire.edu>
# Author/Software Homepage at: http://mako.cc
+# This software comes with ABSOLUTELY NO WARRANTY.
+# This is free software and is licensed under the GNU GPL.
+
__copyright__ = "Copyright (c) 2004 Benjamin Mako Hill"
__author__ = "Benjamin Mako Hill <mako@debian.org>"
__copyright__ = "Copyright (c) 2004 Benjamin Mako Hill"
__author__ = "Benjamin Mako Hill <mako@debian.org>"
@@
-21,7
+24,8
@@
ignored_types = ( "applica/pgp-signat", "application/pgp-signature" )
# list of regular expressions which we will view as being indicative
# of an attachment
# list of regular expressions which we will view as being indicative
# of an attachment
-attachment_regexes = [ r'\battach(ed|ment|ing)?\b(?im)' ]
+attachment_regexes = [ r'\battach(ed|ment|ing)?\b(?im)',
+ r'\balleg(o|at[oaie]|ando)' ]
### No Edit Below This Line
### No Edit Below This Line
@@
-34,7
+38,11
@@
import re
## SUB: send message
def send_message():
## 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() )
mailpipe.write( message_string )
sys.exit( mailpipe.close() )
@@
-107,7
+115,7
@@
if attachment_expected:
# check for the confirmation
if re.search( r'Subject: CONFIRM', message_string ):
# 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()
r'\1\3\n', message_string )
send_message()
Benjamin Mako Hill
||
Want to submit a patch?