Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mailman2sympa
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Show more breadcrumbs
Patrick Cernko
mailman2sympa
Commits
8692ce76
Commit
8692ce76
authored
1 year ago
by
Patrick Cernko
Browse files
Options
Downloads
Patches
Plain Diff
fix: renamed blacklist to blocklist
support for gen_config's info file
parent
cb572e15
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
mm2sympa.sh
+18
-15
18 additions, 15 deletions
mm2sympa.sh
with
18 additions
and
15 deletions
mm2sympa.sh
+
18
−
15
View file @
8692ce76
...
@@ -51,16 +51,28 @@ sshml config_list -o /dev/stdout $mmlistname > $inputpy
...
@@ -51,16 +51,28 @@ sshml config_list -o /dev/stdout $mmlistname > $inputpy
sed
-i
-e
"s/ '/ u'/"
-e
's/ "/ u"/'
$inputpy
sed
-i
-e
"s/ '/ u'/"
-e
's/ "/ u"/'
$inputpy
# enhance config with additional variables for gen_config.py
# enhance config with additional variables for gen_config.py
cat
<<
EOF
>>
$inputpy
cat
<<
EOF
>>
$inputpy
old_listname = u'
$mmlistname
'
new_listname = u'
$sympalistname
'
new_listname = u'
$sympalistname
'
robot = u'
$robot
'
robot = u'
$robot
'
url = u'
$wwsympa_url
'
url = u'
$wwsympa_url
'
EOF
EOF
configxml
=
$tmpdir
/input.xml
configxml
=
$tmpdir
/input.xml
blacklist
=
$tmpdir
/blacklist.txt
infofile
=
$tmpdir
/info
blocklist
=
$tmpdir
/blocklist.txt
whitelist
=
$tmpdir
/whitelist.txt
whitelist
=
$tmpdir
/whitelist.txt
$base
/gen_config.py
$inputpy
$configxml
$bl
a
cklist
$whitelist
$base
/gen_config.py
$inputpy
$configxml
$infofile
$bl
o
cklist
$whitelist
# sympa user needs access
# sympa user needs access
chmod
0644
$configxml
chmod
0644
$configxml
# fetch members
dumpfile
=
$tmpdir
/member.dump
$base
/mailman-subscribers3.py
\
--url_path
/admin
\
--ssl
\
--sympa
\
$mmdomain
$mmlistname
"
$MMPW
"
\
>
$dumpfile
sympa
--create_list
--robot
$robot
--input_file
$configxml
sympa
--create_list
--robot
$robot
--input_file
$configxml
# import archive
# import archive
...
@@ -72,22 +84,13 @@ else
...
@@ -72,22 +84,13 @@ else
echo
"no archive, thus no archive import needed"
echo
"no archive, thus no archive import needed"
fi
fi
# import members
listdir
=
/var/lib/sympa/list_data/
$robot
/
$sympalistname
dumpfile
=
/var/lib/sympa/list_data/
$robot
/
$sympalistname
/member.dump
install
-m
640
-o
sympa
-g
sympa
$dumpfile
$listdir
$base
/mailman-subscribers3.py
\
--url_path
/admin
\
--ssl
\
--sympa
\
$mmdomain
$mmlistname
"
$MMPW
"
\
>
$dumpfile
# sympa user needs access
chown
sympa:sympa
$dumpfile
chmod
0640
$dumpfile
sympa
--restore_users
--list
=
$sympalistname
@
$robot
sympa
--restore_users
--list
=
$sympalistname
@
$robot
search_filters
=
/var/lib/sympa/list_data/
$robot
/
$sympalistname
/search_filters
search_filters
=
$listdir
/search_filters
install
-d
-m
750
-o
sympa
-g
sympa
$search_filters
install
-d
-m
750
-o
sympa
-g
sympa
$search_filters
for
f
in
$bl
a
cklist
$whitelist
;
do
for
f
in
$bl
o
cklist
$whitelist
;
do
[
-s
$f
]
||
continue
[
-s
$f
]
||
continue
install
-m
640
-o
sympa
-g
sympa
$f
$search_filters
install
-m
640
-o
sympa
-g
sympa
$f
$search_filters
done
done
...
...
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