Commit 07405653 authored by horfic's avatar horfic

*) Added Mailman integration

parent e9d71f16
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
ALTER TABLE client ADD COLUMN limit_mailmailinglist int(11) NOT NULL default '-1';
ALTER TABLE client_template ADD COLUMN limit_mailmailinglist int(11) NOT NULL default '-1';
CREATE TABLE IF NOT EXISTS `mail_mailinglist` (
`mailinglist_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) NOT NULL,
`sys_perm_group` varchar(5) character set ucs2 NOT NULL,
`sys_perm_other` varchar(5) NOT NULL,
`server_id` int(11) unsigned NOT NULL default '0',
`domain` varchar(255) NOT NULL,
`listname` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
PRIMARY KEY (`mailinglist_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
DROP TABLE `mail_mailman_domain`;
\ No newline at end of file
This diff is collapsed.
# -*- python -*-
# Copyright (C) 1998,1999,2000 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA
"""This is the module which takes your site-specific settings.
From a raw distribution it should be copied to mm_cfg.py. If you
already have an mm_cfg.py, be careful to add in only the new settings
you want. The complete set of distributed defaults, with annotation,
are in ./Defaults. In mm_cfg, override only those you want to
change, after the
from Defaults import *
line (see below).
Note that these are just default settings - many can be overridden via the
admin and user interfaces on a per-list or per-user basis.
Note also that some of the settings are resolved against the active list
setting by using the value as a format string against the
list-instance-object's dictionary - see the distributed value of
DEFAULT_MSG_FOOTER for an example."""
#######################################################
# Here's where we get the distributed defaults. #
from Defaults import *
##############################################################
# Put YOUR site-specific configuration below, in mm_cfg.py . #
# See Defaults.py for explanations of the values. #
#-------------------------------------------------------------
# The name of the list Mailman uses to send password reminders
# and similar. Don't change if you want mailman-owner to be
# a valid local part.
MAILMAN_SITE_LIST = 'mailman'
#-------------------------------------------------------------
# If you change these, you have to configure your http server
# accordingly (Alias and ScriptAlias directives in most httpds)
DEFAULT_URL_PATTERN = 'http://%s/cgi-bin/mailman/'
PRIVATE_ARCHIVE_URL = '/cgi-bin/mailman/private'
IMAGE_LOGOS = '/images/mailman/'
#-------------------------------------------------------------
# Default domain for email addresses of newly created MLs
DEFAULT_EMAIL_HOST = '{hostname}'
#-------------------------------------------------------------
# Default host for web interface of newly created MLs
DEFAULT_URL_HOST = '{hostname}'
#-------------------------------------------------------------
# Required when setting any of its arguments.
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
#-------------------------------------------------------------
# The default language for this server.
DEFAULT_SERVER_LANGUAGE = {default_language}
#-------------------------------------------------------------
# Iirc this was used in pre 2.1, leave it for now
USE_ENVELOPE_SENDER = 0 # Still used?
#-------------------------------------------------------------
# Unset send_reminders on newly created lists
DEFAULT_SEND_REMINDERS = 0
#-------------------------------------------------------------
# Uncomment this if you configured your MTA such that it
# automatically recognizes newly created lists.
# (see /usr/share/doc/mailman/README.Exim4.Debian or
# /usr/share/mailman/postfix-to-mailman.py)
# MTA=None # Misnomer, suppresses alias output on newlist
#-------------------------------------------------------------
# Uncomment if you use Postfix virtual domains (but not
# postfix-to-mailman.py), but be sure to see
# /usr/share/doc/mailman/README.Debian first.
MTA='Postfix'
POSTFIX_STYLE_VIRTUAL_DOMAINS = [{virtual_domains}]
#-------------------------------------------------------------
# Uncomment if you want to filter mail with SpamAssassin. For
# more information please visit this website:
# http://www.jamesh.id.au/articles/mailman-spamassassin/
# GLOBAL_PIPELINE.insert(1, 'SpamAssassin')
# Note - if you're looking for something that is imported from mm_cfg, but you
# didn't find it above, it's probably in /usr/lib/mailman/Mailman/Defaults.py.
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
...@@ -7,6 +7,7 @@ $wb['username_error_empty'] = 'Username cannot be empty'; ...@@ -7,6 +7,7 @@ $wb['username_error_empty'] = 'Username cannot be empty';
$wb['password_error_empty'] = 'Password cannot be empty'; $wb['password_error_empty'] = 'Password cannot be empty';
$wb['password_strength_txt'] = 'Password Strength:'; $wb['password_strength_txt'] = 'Password Strength:';
$wb['Mail domain functions'] = 'Mail domain functions'; $wb['Mail domain functions'] = 'Mail domain functions';
$wb['Mail mailing list functions'] = 'Mail mailinglist functions';
$wb['Mail user functions'] = 'Mail user functions'; $wb['Mail user functions'] = 'Mail user functions';
$wb['Mail alias functions'] = 'Mail alias functions'; $wb['Mail alias functions'] = 'Mail alias functions';
$wb['Mail forward functions'] = 'Mail forward functions'; $wb['Mail forward functions'] = 'Mail forward functions';
......
...@@ -14,6 +14,8 @@ $wb["webdavuser_prefix_error_regex"] = 'Char not allowed in webdav user prefix.' ...@@ -14,6 +14,8 @@ $wb["webdavuser_prefix_error_regex"] = 'Char not allowed in webdav user prefix.'
$wb["dblist_phpmyadmin_link_txt"] = 'Link to phpmyadmin in DB list'; $wb["dblist_phpmyadmin_link_txt"] = 'Link to phpmyadmin in DB list';
$wb["mailboxlist_webmail_link_txt"] = 'Link to webmail in Mailbox list'; $wb["mailboxlist_webmail_link_txt"] = 'Link to webmail in Mailbox list';
$wb["webmail_url_txt"] = 'Webmail URL'; $wb["webmail_url_txt"] = 'Webmail URL';
$wb["mailmailinglist_link_txt"] = 'Link to mailing list in Mailing list list';
$wb["mailmailinglist_url_txt"] = 'Mailing list URL';
$wb["phpmyadmin_url_txt"] = 'PHPMyAdmin URL'; $wb["phpmyadmin_url_txt"] = 'PHPMyAdmin URL';
$wb["use_domain_module_txt"] = 'Use the domain-module to add new domains'; $wb["use_domain_module_txt"] = 'Use the domain-module to add new domains';
$wb["use_domain_module_hint"] = 'If you use this module, your customers can only select one of the domains the admin creates for them. They cannot free edit the domain-field.You have to re-login after changing this value, to make the changes visible.'; $wb["use_domain_module_hint"] = 'If you use this module, your customers can only select one of the domains the admin creates for them. They cannot free edit the domain-field.You have to re-login after changing this value, to make the changes visible.';
......
...@@ -15,6 +15,16 @@ ...@@ -15,6 +15,16 @@
<label for="webmail_url">{tmpl_var name='webmail_url_txt'}</label> <label for="webmail_url">{tmpl_var name='webmail_url_txt'}</label>
<input name="webmail_url" id="webmail_url" value="{tmpl_var name='webmail_url'}" size="30" maxlength="255" type="text" class="textInput" /> <input name="webmail_url" id="webmail_url" value="{tmpl_var name='webmail_url'}" size="30" maxlength="255" type="text" class="textInput" />
</div> </div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='mailmailinglist_link_txt'}</p>
<div class="multiField">
{tmpl_var name='mailmailinglist_link'}
</div>
</div>
<div class="ctrlHolder">
<label for="mailmailinglist_url">{tmpl_var name='mailmailinglist_url_txt'}</label>
<input name="mailmailinglist_url" id="mailmailinglist_url" value="{tmpl_var name='mailmailinglist_url'}" size="30" maxlength="255" type="text" class="textInput" />
</div>
<div class="ctrlHolder"> <div class="ctrlHolder">
<label for="admin_mail">{tmpl_var name='admin_mail_txt'}</label> <label for="admin_mail">{tmpl_var name='admin_mail_txt'}</label>
<input name="admin_mail" id="admin_mail" value="{tmpl_var name='admin_mail'}" size="30" maxlength="255" type="text" class="textInput" /> <input name="admin_mail" id="admin_mail" value="{tmpl_var name='admin_mail'}" size="30" maxlength="255" type="text" class="textInput" />
......
This diff is collapsed.
<?php <?php
$wb["limit_maildomain_txt"] = 'Max. number of email domains'; $wb["limit_maildomain_txt"] = 'Max. number of email domains';
$wb["limit_mailmailinglist_txt"] = 'Max. number of mailing lists';
$wb["limit_mailbox_txt"] = 'Max. number of mailboxes'; $wb["limit_mailbox_txt"] = 'Max. number of mailboxes';
$wb["limit_mailalias_txt"] = 'Max. number of email aliases'; $wb["limit_mailalias_txt"] = 'Max. number of email aliases';
$wb["limit_mailaliasdomain_txt"] = 'Max. number of domain aliases'; $wb["limit_mailaliasdomain_txt"] = 'Max. number of domain aliases';
...@@ -62,6 +63,7 @@ $wb["limit_client_txt"] = 'Max. number of Clients'; ...@@ -62,6 +63,7 @@ $wb["limit_client_txt"] = 'Max. number of Clients';
$wb["username_error_empty"] = 'Username is empty.'; $wb["username_error_empty"] = 'Username is empty.';
$wb["username_error_unique"] = 'The username must be unique.'; $wb["username_error_unique"] = 'The username must be unique.';
$wb["limit_maildomain_error_notint"] = 'The email domain limit must be a number.'; $wb["limit_maildomain_error_notint"] = 'The email domain limit must be a number.';
$wb["limit_mailmailinglist_error_notint"] = 'The mailing list record limit must be a number.';
$wb["limit_mailbox_error_notint"] = 'The mailbox limit must be a number.'; $wb["limit_mailbox_error_notint"] = 'The mailbox limit must be a number.';
$wb["limit_mailalias_error_notint"] = 'The email alias limit must be a number.'; $wb["limit_mailalias_error_notint"] = 'The email alias limit must be a number.';
$wb["limit_mailaliasdomain_error_notint"] = 'The email domain alias limit must be a number.'; $wb["limit_mailaliasdomain_error_notint"] = 'The email domain alias limit must be a number.';
......
...@@ -5,6 +5,7 @@ $wb["limit_maildomain_txt"] = 'Max. number of email domains'; ...@@ -5,6 +5,7 @@ $wb["limit_maildomain_txt"] = 'Max. number of email domains';
$wb["limit_mailbox_txt"] = 'Max. number of mailboxes'; $wb["limit_mailbox_txt"] = 'Max. number of mailboxes';
$wb["limit_mailalias_txt"] = 'Max. number of email aliases'; $wb["limit_mailalias_txt"] = 'Max. number of email aliases';
$wb["limit_mailaliasdomain_txt"] = 'Max. number of domain aliases'; $wb["limit_mailaliasdomain_txt"] = 'Max. number of domain aliases';
$wb["limit_mailmailinglist_txt"] = 'Max. number of mailing lists';
$wb["limit_mailforward_txt"] = 'Max. number of email forwarders'; $wb["limit_mailforward_txt"] = 'Max. number of email forwarders';
$wb["limit_mailcatchall_txt"] = 'Max. number of email catchall accounts'; $wb["limit_mailcatchall_txt"] = 'Max. number of email catchall accounts';
$wb["limit_mailrouting_txt"] = 'Max. number of email routes'; $wb["limit_mailrouting_txt"] = 'Max. number of email routes';
...@@ -32,6 +33,7 @@ $wb["limit_shell_user_txt"] = 'Max. number of Shell users'; ...@@ -32,6 +33,7 @@ $wb["limit_shell_user_txt"] = 'Max. number of Shell users';
$wb["limit_webdav_user_txt"] = 'Max. number of Webdav users'; $wb["limit_webdav_user_txt"] = 'Max. number of Webdav users';
$wb["limit_client_txt"] = 'Max. number of Clients'; $wb["limit_client_txt"] = 'Max. number of Clients';
$wb["limit_maildomain_error_notint"] = 'The email domain limit must be a number.'; $wb["limit_maildomain_error_notint"] = 'The email domain limit must be a number.';
$wb["limit_mailmailinglist_error_notint"] = 'The mailing list record limit must be a number.';
$wb["limit_mailbox_error_notint"] = 'The mailbox limit must be a number.'; $wb["limit_mailbox_error_notint"] = 'The mailbox limit must be a number.';
$wb["limit_mailalias_error_notint"] = 'The email alias limit must be a number.'; $wb["limit_mailalias_error_notint"] = 'The email alias limit must be a number.';
$wb["limit_mailaliasdomain_error_notint"] = 'The email domain alias limit must be a number.'; $wb["limit_mailaliasdomain_error_notint"] = 'The email domain alias limit must be a number.';
......
<?php <?php
$wb["limit_maildomain_txt"] = 'Max. number of email domains'; $wb["limit_maildomain_txt"] = 'Max. number of email domains';
$wb["limit_mailmailinglist_txt"] = 'Max. number of mailing lists';
$wb["limit_mailbox_txt"] = 'Max. number of mailboxes'; $wb["limit_mailbox_txt"] = 'Max. number of mailboxes';
$wb["limit_mailalias_txt"] = 'Max. number of email aliases'; $wb["limit_mailalias_txt"] = 'Max. number of email aliases';
$wb["limit_mailforward_txt"] = 'Max. number of email forwarders'; $wb["limit_mailforward_txt"] = 'Max. number of email forwarders';
...@@ -60,6 +61,7 @@ $wb["limit_client_txt"] = 'Max. number of Clients'; ...@@ -60,6 +61,7 @@ $wb["limit_client_txt"] = 'Max. number of Clients';
$wb["username_error_empty"] = 'Username is empty.'; $wb["username_error_empty"] = 'Username is empty.';
$wb["username_error_unique"] = 'The username must be unique.'; $wb["username_error_unique"] = 'The username must be unique.';
$wb["limit_maildomain_error_notint"] = 'The email domain limit must be a number.'; $wb["limit_maildomain_error_notint"] = 'The email domain limit must be a number.';
$wb["limit_mailmailinglist_error_notint"] = 'The mailing list record limit must be a number.';
$wb["limit_mailbox_error_notint"] = 'The mailbox limit must be a number.'; $wb["limit_mailbox_error_notint"] = 'The mailbox limit must be a number.';
$wb["limit_mailalias_error_notint"] = 'The email alias limit must be a number.'; $wb["limit_mailalias_error_notint"] = 'The email alias limit must be a number.';
$wb["limit_mailforward_error_notint"] = 'The email forward limit must be a number.'; $wb["limit_mailforward_error_notint"] = 'The email forward limit must be a number.';
......
...@@ -12,6 +12,10 @@ class dashlet_limits { ...@@ -12,6 +12,10 @@ class dashlet_limits {
$limits[] = array('field' => 'limit_maildomain', $limits[] = array('field' => 'limit_maildomain',
'db_table' => 'mail_domain', 'db_table' => 'mail_domain',
'db_where' => ''); 'db_where' => '');
$limits[] = array('field' => 'limit_mailmailinglist',
'db_table' => 'mail_mailinglist',
'db_where' => '');
$limits[] = array('field' => 'limit_mailbox', $limits[] = array('field' => 'limit_mailbox',
'db_table' => 'mail_user', 'db_table' => 'mail_user',
......
...@@ -3,6 +3,7 @@ $wb['limits_txt'] = "Account limits"; ...@@ -3,6 +3,7 @@ $wb['limits_txt'] = "Account limits";
$wb['of_txt'] = "of"; $wb['of_txt'] = "of";
$wb['unlimited_txt'] = "Unlimited"; $wb['unlimited_txt'] = "Unlimited";
$wb['limit_maildomain_txt'] = "Number of email domains"; $wb['limit_maildomain_txt'] = "Number of email domains";
$wb['limit_mailmailinglist_txt'] = "Number of mailing lists";
$wb['limit_mailbox_txt'] = "Number of mailboxes"; $wb['limit_mailbox_txt'] = "Number of mailboxes";
$wb["limit_mailalias_txt"] = 'Number of email aliases'; $wb["limit_mailalias_txt"] = 'Number of email aliases';
$wb["limit_mailaliasdomain_txt"] = 'Number of domain aliases'; $wb["limit_mailaliasdomain_txt"] = 'Number of domain aliases';
......
<?php
/*
Form Definition
Tabledefinition
Datatypes:
- INTEGER (Forces the input to Int)
- DOUBLE
- CURRENCY (Formats the values to currency notation)
- VARCHAR (no format check, maxlength: 255)
- TEXT (no format check)
- DATE (Dateformat, automatic conversion to timestamps)
Formtype:
- TEXT (Textfield)
- TEXTAREA (Textarea)
- PASSWORD (Password textfield, input is not shown when edited)
- SELECT (Select option field)
- RADIO
- CHECKBOX
- CHECKBOXARRAY
- FILE
VALUE:
- Wert oder Array
Hint:
The ID field of the database table is not part of the datafield definition.
The ID field must be always auto incement (int or bigint).
*/
$form["title"] = "Mailing List";
$form["description"] = "";
$form["name"] = "mail_mailinglist";
$form["action"] = "mail_mailinglist_edit.php";
$form["db_table"] = "mail_mailinglist";
$form["db_table_idx"] = "mailinglist_id";
$form["db_history"] = "yes";
$form["tab_default"] = "mailinglist";
$form["list_default"] = "mail_mailinglist_list.php";
$form["auth"] = 'yes'; // yes / no
$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
$form["tabs"]['mailinglist'] = array (
'title' => "Mailing List",
'width' => 100,
'template' => "templates/mail_mailinglist_edit.htm",
'fields' => array (
##################################
# Begin Datatable fields
##################################
'server_id' => array (
'datatype' => 'INTEGER',
'formtype' => 'SELECT',
'default' => '',
'datasource' => array ( 'type' => 'SQL',
'querystring' => 'SELECT server_id,server_name FROM server WHERE mail_server = 1 AND mirror_server_id = 0 AND {AUTHSQL} ORDER BY server_name',
'keyfield'=> 'server_id',
'valuefield'=> 'server_name'
),
'value' => ''
),
'domain' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'domain_error_empty'),
1 => array ( 'type' => 'REGEX',
'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z\-]{2,10}$/',
'errmsg'=> 'domain_error_regex'),
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'listname' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'listname_error_empty'),
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'email' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'ISEMAIL',
'errmsg'=> 'email_error_isemail'),
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'password' => array (
'datatype' => 'VARCHAR',
'formtype' => 'PASSWORD',
'encryption'=> 'CLEARTEXT',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
##################################
# ENDE Datatable fields
##################################
)
);
?>
\ No newline at end of file
<?php
$wb["limit_mailmailinglist_txt"] = 'Limit reached';
$wb["domain_error_empty"] = 'Domain is empty.';
$wb["listname_error_empty"] = 'Listname is empty.';
$wb["domain_error_regex"] = 'Invalid domain name.';
$wb["email_in_use_txt"] = 'Email is in use';
$wb["no_domain_perm"] = 'You have no permission for this domain.';
$wb["password_strength_txt"] = 'Password strength';
$wb["server_id_txt"] = 'Server';
$wb["domain_txt"] = 'Domain';
$wb["listname_txt"] = 'Listname';
$wb["client_txt"] = 'Client';
$wb["email_txt"] = 'Email';
$wb["password_txt"] = 'Password';
?>
\ No newline at end of file
<?php
$wb["list_head_txt"] = 'Mailing List';
$wb["domain_txt"] = 'Domain';
$wb["listname_txt"] = 'Listname';
?>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?php
require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');
/******************************************
* Begin Form configuration
******************************************/
$list_def_file = "list/mail_mailinglist.list.php";
/******************************************
* End Form configuration
******************************************/
//* Check permissions for module
$app->auth->check_module_permissions('mail');
$app->load('listform_actions');
class list_action extends listform_actions {
function onShow() {
global $app,$conf;
$app->uses('getconf');
$global_config = $app->getconf->get_global_config('mail');
if($global_config['mailmailinglist_link'] == 'y') {
$app->tpl->setVar('mailmailinglist_link',1);
} else {
$app->tpl->setVar('mailmailinglist_link',0);
}
parent::onShow();
}
}
$list = new list_action;
$list->onLoad();
?>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment