On 5/15/19 9:46 AM, Nathan Dixon wrote:
I can create the ban fine by the following:
from mailmanclient import Client client = Client(URI,apiuser,apipass) client.bans.add("^(?!.*@\.")
This is apparently a typo - missing ')' - in the re as you have it correct below.
However, I cannot seem to be able to remove it using the api:
client.bans[0].delete() ... client.bans.remove(str(client.bans[0])) ...
client.bans.remove("^(?!.*@\.)")
All of the above work for me with both API 3.0 and 3.1 in a non-docker install of the current GitLab HEADs
And also, when I now try and go into the mailman-core docker image to use the mailman.interfaces.bans, it will not let me see the global bans:
from mailman.interfaces.bans import IBanManager global_bans = IBanManager(None) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: ('Could not adapt', None, <InterfaceClass mailman.interfaces.bans.IBanManager>)
I don't see this either.
I have opened an issue in Gitlab for this as I feel it may be a bug related to regex and global bans (there was a similar one for list banned addresses): https://gitlab.com/mailman/mailman/issues/598
I also commented on the GitLab issue. I think this must be an issue with the docker images.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan