Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ISPConfig
ISPConfig 3
Commits
d2254217
Commit
d2254217
authored
Aug 14, 2014
by
Till Brehm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FS#3614 - Check mailman on Ubuntu 14.04
parent
c6538449
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
install/lib/installer_base.lib.php
install/lib/installer_base.lib.php
+1
-1
server/plugins-available/mailman_plugin.inc.php
server/plugins-available/mailman_plugin.inc.php
+9
-0
No files found.
install/lib/installer_base.lib.php
View file @
d2254217
...
...
@@ -646,7 +646,7 @@ class installer_base {
copy
(
'tpl/mailman-virtual_to_transport.sh'
,
$full_file_name
);
}
chgrp
(
$full_file_name
,
'list'
);
chmod
(
$full_file_name
,
075
0
);
chmod
(
$full_file_name
,
075
5
);
}
//* Create aliasaes
...
...
server/plugins-available/mailman_plugin.inc.php
View file @
d2254217
...
...
@@ -75,6 +75,7 @@ class mailman_plugin {
exec
(
"nohup /usr/lib/mailman/bin/newlist -u "
.
escapeshellcmd
(
$data
[
"new"
][
"domain"
])
.
" -e "
.
escapeshellcmd
(
$data
[
"new"
][
"domain"
])
.
" "
.
escapeshellcmd
(
$data
[
"new"
][
"listname"
])
.
" "
.
escapeshellcmd
(
$data
[
"new"
][
"email"
])
.
" "
.
escapeshellcmd
(
$data
[
"new"
][
"password"
])
.
" >/dev/null 2>&1 &"
);
if
(
is_file
(
'/var/lib/mailman/data/virtual-mailman'
))
exec
(
'postmap /var/lib/mailman/data/virtual-mailman'
);
if
(
is_file
(
'/var/lib/mailman/data/transport-mailman'
))
exec
(
'postmap /var/lib/mailman/data/transport-mailman'
);
exec
(
'nohup '
.
$conf
[
'init_scripts'
]
.
'/'
.
'mailman reload >/dev/null 2>&1 &'
);
$app
->
db
->
query
(
"UPDATE mail_mailinglist SET password = '' WHERE mailinglist_id = "
.
$app
->
db
->
quote
(
$data
[
"new"
][
'mailinglist_id'
]));
...
...
@@ -84,12 +85,17 @@ class mailman_plugin {
// The purpose of this plugin is to rewrite the main.cf file
function
update
(
$event_name
,
$data
)
{
global
$app
,
$conf
;
$this
->
update_config
();
if
(
$data
[
"new"
][
"password"
]
!=
$data
[
"old"
][
"password"
]
&&
$data
[
"new"
][
"password"
]
!=
''
)
{
exec
(
"nohup /usr/lib/mailman/bin/change_pw -l "
.
escapeshellcmd
(
$data
[
"new"
][
"listname"
])
.
" -p "
.
escapeshellcmd
(
$data
[
"new"
][
"password"
])
.
" >/dev/null 2>&1 &"
);
exec
(
'nohup '
.
$conf
[
'init_scripts'
]
.
'/'
.
'mailman reload >/dev/null 2>&1 &'
);
$app
->
db
->
query
(
"UPDATE mail_mailinglist SET password = '' WHERE mailinglist_id = "
.
$app
->
db
->
quote
(
$data
[
"new"
][
'mailinglist_id'
]));
}
if
(
is_file
(
'/var/lib/mailman/data/virtual-mailman'
))
exec
(
'postmap /var/lib/mailman/data/virtual-mailman'
);
if
(
is_file
(
'/var/lib/mailman/data/transport-mailman'
))
exec
(
'postmap /var/lib/mailman/data/transport-mailman'
);
}
function
delete
(
$event_name
,
$data
)
{
...
...
@@ -100,6 +106,9 @@ class mailman_plugin {
exec
(
"nohup /usr/lib/mailman/bin/rmlist -a "
.
escapeshellcmd
(
$data
[
"old"
][
"listname"
])
.
" >/dev/null 2>&1 &"
);
exec
(
'nohup '
.
$conf
[
'init_scripts'
]
.
'/'
.
'mailman reload >/dev/null 2>&1 &'
);
if
(
is_file
(
'/var/lib/mailman/data/virtual-mailman'
))
exec
(
'postmap /var/lib/mailman/data/virtual-mailman'
);
if
(
is_file
(
'/var/lib/mailman/data/transport-mailman'
))
exec
(
'postmap /var/lib/mailman/data/transport-mailman'
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment