Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117912819
D4463.1775400523.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D4463.1775400523.diff
View Options
diff --git a/wallace/module_footer.py b/wallace/module_footer.py
--- a/wallace/module_footer.py
+++ b/wallace/module_footer.py
@@ -114,6 +114,23 @@
footer_position = conf.get('wallace', 'footer_position')
footer_html_file = conf.get('wallace', 'footer_html')
footer_text_file = conf.get('wallace', 'footer_text')
+ sender_exceptions = conf.get('wallace', 'footer_sender_exceptions')
+
+ if sender_exceptions:
+ sender = message.get("X-Kolab-From")
+ log.debug("Checking sender %r" % (sender), level=8)
+
+ if sender:
+ for item in sender_exceptions.split(','):
+ item = item.strip()
+ regex = '@' + item.replace('*', '[^@]+').replace('.', '\\.') + '$'
+ if item == 'NONE':
+ regex = '^<>$'
+
+ if re.search(regex, sender):
+ log.debug("Sender matches exception %s" % (item), level=8)
+ exec('modules.cb_action_%s(%r, %r)' % ('ACCEPT','footer', filepath))
+ return
if not os.path.isfile(footer_text_file) and not os.path.isfile(footer_html_file):
log.warning(_("No contents configured for footer module"))
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 5, 2:48 PM (13 h, 24 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18833695
Default Alt Text
D4463.1775400523.diff (1 KB)
Attached To
Mode
D4463: Add footer_sender_exceptions option (T850567)
Attached
Detach File
Event Timeline