Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sympa
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
riseup
sympa
Commits
b56abec7
Commit
b56abec7
authored
5 years ago
by
taggart
Browse files
Options
Downloads
Patches
Plain Diff
new script to detect bulk adding
parent
eae67c8c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/bulkdetect
+45
-0
45 additions, 0 deletions
tools/bulkdetect
with
45 additions
and
0 deletions
tools/bulkdetect
0 → 100755
+
45
−
0
View file @
b56abec7
#!/usr/bin/perl -w
# bulkdetect - spot owners/lists bulk adding lots of subscribers
# taggart 2019-06
$log
=
'
/var/log/sympa/wwsympa.log
';
open
(
LOG
,
"
$log
")
or
die
"
cannot open log
\n
";
while
(
<
LOG
>
)
{
chomp
;
if
(
m/.*\[user (.*)\] \[list (.*)\] main::do_add\(\) do_add:(.+)/
)
{
#print "$1 $2 $3\n";
# hash key is owner:list, value is number of attempts to add
$result
{"
$1:$2
"}
++
;
}
}
format
Foo
=
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @>>>>>>
$owner, $list $count
.
# set output format
$~
=
'
Foo
';
# print header
$owner
=
'
Owner adding
';
$list
=
'
List
';
$count
=
'
Add
';
write
;
foreach
$key
(
sort
{
$result
{
$b
}
<=>
$result
{
$a
}
}
keys
%result
)
{
(
$owner
,
$list
)
=
split
/:/
,
$key
;
$count
=
$result
{
$key
};
write
;
}
## Notes
#if ( m/.*\[user (.*)\] \[list (.*)\] main::do_add\(\) do_add: (.*)/ ) {
# do_add sometimes returns the following things, might be interesting to look for
# already subscriber
# no email
# incorrect email
# may not add
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment