![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Why don't you just add the email account to the list, set it for no mail, |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
To: "Name, Unique" <unique.name (AT) uleth (DOT) ca George Booth wrote: Jim, I don't know if this will help, but this is what I use for our lists' spam filters to accept from our domain: ^[^@]+@(.+\.|)unique\.name$ Worth a shot? |
#5
| |||
| |||
|
|
CNulk writes: Hi Jim, I may be completely wrong (heck, wouldn't be the first time), but why not have your "unique.name" address be an alias to a simple bash/perl/etc. script which simply accepts the email message, rewrites the message to be from the unique.name address, and sends it on to the list. When the list sees the message, it will appear to be "from" unique.name and the standard mailman moderation and message acceptance rules would apply. I had to do something similar for a different email distribution package to get around a software limitation. It should work unless you really need the from address to be from the actual sender. |
#6
| |||
| |||
|
|
Yep - I could do that. Have exim rewrite the headers before it sends out the message, but the people on the mailing list do want to know who the email originally came from. They just don't want everyone to have access to their mailing list, just this one account (an inquiries-type of account). |
#7
| |||
| |||
|
|
Mark Sapiro wrote: What you need is a custom handler. See the FAQ at http://wiki.list.org/x/l4A9> for how to install one. |
|
In your case, the handler is very simple - just 9 lines. import re cre = re.compile('unique\.name', re.IGNORECASE) def process(mlist, msg, msgdata): if mlist.internal_name <> 'abc-l': return if cre.search(msg.get('to', '')): msgdata['approved'] = 1 # Used by the Emergency module msgdata['adminapproved'] = 1 Of course, you adjust the regexp 'unique\.name' and the list name 'abc-l' to suit. The handler needs to be in the pipeline before Moderate. |
#8
| |||
| |||
|
#9
| |||
| |||
|
#10
| |||
| |||
|
|
I also just noticed that all of the other handlers have an accompanying .pyc file, but my Foo.py does not. Perhaps that 'c' stands for "compiled" |
|
and I was supposed to compile the code first? (probably seems obvious to someone familiar with Mailman/Python). |
![]() |
| Thread Tools | |
| Display Modes | |
| |