Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need ability to ban list names and owners #672

Closed
taggart opened this issue Jun 24, 2019 · 14 comments · Fixed by #675
Closed

need ability to ban list names and owners #672

taggart opened this issue Jun 24, 2019 · 14 comments · Fixed by #675
Assignees
Milestone

Comments

@taggart
Copy link
Contributor

taggart commented Jun 24, 2019

In operating a public sympa instance that allows anyone to create an account and request a list, we have had a problem with some users creating abusive lists. When we shutdown the list and close the owner account, they just create another, and this happens over and over. The cases we've seen haven't done this for general spam, but seem to usually be on a particular topic. At first they are honest when making the list request, but once we notice the pattern and stop approving those lists, they will lie in the list request and use other email addresses to submit the requests. But then after approval they will rename the list and often set the owner to an address used previously.

A while ago, to combat this problem, we implemented a nagios check that used regular expressions to scan the database and look for listnames and owner addresses that matched the people doing this and then alerted us to the problem. That works, but there wasn't anything automatic to close the list or account.

What would be best is if this could be prevented in sympa, at account and list request creation time and also when renaming lists.

@ldidry
Copy link
Contributor

ldidry commented Jun 25, 2019

While waiting for this ability to be implemented, you may create the banned lists with listmaster, it will prevent the user to use them, no?

@taggart
Copy link
Contributor Author

taggart commented Jun 25, 2019

What are you referring to? Is a banned list already implemented somewhere?

@ikedas
Copy link
Member

ikedas commented Jun 25, 2019

While waiting for this ability to be implemented, you may create the banned lists with listmaster, it will prevent the user to use them, no?

I think such restriction should not prevent use of existing lists, but it should prevent only creation of the new list (including copying or renaming lists).

@ldidry
Copy link
Contributor

ldidry commented Jun 25, 2019

I think such restriction should not prevent use of existing lists, but it should prevent only creation of the new list (including copying or renaming lists).

Yes. If you don’t want [email protected] to be available, juste create it with your listmaster account, this name will be unavailable for your users, it’s just that.

@ikedas
Copy link
Member

ikedas commented Jun 25, 2019

I think such restriction should not prevent use of existing lists, but it should prevent only creation of the new list (including copying or renaming lists).

Yes. If you don’t want [email protected] to be available, juste create it with your listmaster account, this name will be unavailable for your users, it’s just that.

How about, for example, restricting list names with regexp?

@ldidry
Copy link
Contributor

ldidry commented Jun 28, 2019

How about, for example, restricting list names with regexp?

Why not? But what do you think about a comma-separated list, allowing to use wildcard character (*)? I fear that a regex may be complicated for some people (unfortunately, not all admins can read and write regexes).
We could provide support for both syntax though.

As for the owner, I think it will be useless to ban owner names and addresses: spammers will notice that and change their owner name and use another address (I had spammers who did that once they noticed I deleted their lists and accounts quickly).

I’ll begin to work on this issue today.

@ldidry ldidry self-assigned this Jun 28, 2019
ldidry added a commit to ldidry/sympa that referenced this issue Jun 28, 2019
— Add prohibited_listnames setting (comma-separated list, with ability
to use a wildcard)
— Add prohibited_listnames_regex setting

The settings are cumulative. You can use one or the other or both.

May fix sympa-community#672
@ldidry ldidry added the ready A PR is waiting to be merged. Close to be solved label Jun 28, 2019
@ikedas
Copy link
Member

ikedas commented Jun 28, 2019

Just a question on @ldidry ‘s pr: Why “prohibited” patterns? For example, the “owner_domain” setting specifies “allowed” patterns. What does distinct between “prohibit” and “allow”?

@racke
Copy link
Contributor

racke commented Jun 28, 2019

"prohibit" is basically the opposite of "allow". While regex could be used for "allowed" patterns, it would be harder to write them.

@ldidry
Copy link
Contributor

ldidry commented Jun 28, 2019

"prohibit" is basically the opposite of "allow". While regex could be used for "allowed" patterns, it would be harder to write them.

Indeed.

@ikedas
Copy link
Member

ikedas commented Jul 1, 2019

BTW prohibition (or oppsite) should be done with move_list not only create_list handler.

@ldidry
Copy link
Contributor

ldidry commented Jul 1, 2019

Sorry, I forgot this one. I’ll add it.

ldidry added a commit to ldidry/sympa that referenced this issue Jul 1, 2019
— Add prohibited_listnames setting (comma-separated list, with ability
to use a wildcard)
— Add prohibited_listnames_regex setting

The settings are cumulative. You can use one or the other or both.

May fix sympa-community#672
ldidry added a commit to ldidry/sympa that referenced this issue Jul 1, 2019
— Add prohibited_listnames setting (comma-separated list, with ability
to use a wildcard)
— Add prohibited_listnames_regex setting

The settings are cumulative. You can use one or the other or both.

May fix sympa-community#672
@ldidry
Copy link
Contributor

ldidry commented Jul 1, 2019

Here we go! I put the code in check_new_listname of src/lib/Sympa/Aliases.pm, so it’s available for both handlers.

ldidry added a commit to ldidry/sympa that referenced this issue Aug 2, 2019
— Add prohibited_listnames setting (comma-separated list, with ability
to use a wildcard)
— Add prohibited_listnames_regex setting

The settings are cumulative. You can use one or the other or both.

May fix sympa-community#672
@ldidry
Copy link
Contributor

ldidry commented Aug 2, 2019

@taggart for the ban owner addresses part, I think it may be useless: nothing is more easy than creating new email addresses. What do you think?

@taggart
Copy link
Contributor Author

taggart commented Aug 2, 2019

When I was running my scanner process I would often detect when owners requested a list under one address and then changed it back to their original banned address (or something that matched the regex at least). So it seems even if they use new addresses they tend to follow a pattern. Also as I found other abusers that were clearly the same person, I adjusted the regexs to handle new patterns.

I guess the new method will disallow an owner adding a banned address as another owner, that might tip them off. Maybe attempting to add banned owners should be logged in a way that could be looked for with nagios/etc and alert the listmasters that someone tried to add a banned address?

@ikedas ikedas closed this as completed in 99ae53d Apr 27, 2021
@ikedas ikedas added this to the 6.2.64 milestone Apr 27, 2021
@ikedas ikedas removed the ready A PR is waiting to be merged. Close to be solved label Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants