initial commit of file from CVS for smeserver-mailman on Sat Sep 7 19:55:48 AEST 2024
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
Alias /mailman/public /var/lib/mailman/archives/public
|
||||
ScriptAlias /mailman /usr/lib/mailman/cgi-bin
|
||||
RedirectMatch ^/mailman[/]*$ /mailman/listinfo
|
||||
|
@@ -0,0 +1,24 @@
|
||||
#------------------------------------------------------------
|
||||
# mailman directories
|
||||
#------------------------------------------------------------
|
||||
|
||||
<Directory /usr/lib/mailman/cgi-bin>
|
||||
Options ExecCGI
|
||||
Require { (($mailman{access} || 'public' ) eq "public" ) ? "all granted": "ip $localAccess";}
|
||||
</Directory>
|
||||
|
||||
<Directory /var/lib/mailman/archives/public>
|
||||
Options Indexes Includes FollowSymLinks
|
||||
Require { (($mailman{archivesaccess} || 'private' ) eq "public" ) ? "all granted": "ip $localAccess";}
|
||||
</Directory>
|
||||
|
||||
<Directory /var/lib/mailman/archives/private>
|
||||
Options Indexes Includes FollowSymLinks
|
||||
Require { (($mailman{archivesaccess} || 'private' ) eq "public" ) ? "all granted": "ip $localAccess";}
|
||||
</Directory>
|
||||
|
||||
<LocationMatch ^/mailman/(admin|admindb|rmlist|create|private)>
|
||||
Require { (($mailman{adminaccess} || 'private' ) eq "public" ) ? "all granted": "ip $localAccess";}
|
||||
</LocationMatch>
|
||||
|
||||
|
@@ -0,0 +1,46 @@
|
||||
# -*- python -*-
|
||||
|
||||
# Copyright (C) 1998 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 *
|
||||
import pwd, grp
|
||||
|
@@ -0,0 +1,22 @@
|
||||
##############################################################
|
||||
# Here's where we override shipped defaults with settings #
|
||||
# suitable for the RPM package. #
|
||||
ADMINDB_PAGE_TEXT_LIMIT = 8192
|
||||
DEFAULT_ADMIN_MEMBER_CHUNKSIZE = 50
|
||||
DEFAULT_BOUNCE_MATCHING_HEADERS = """
|
||||
"""
|
||||
DEFAULT_DIGEST_SIZE_THRESHHOLD = 250
|
||||
DEFAULT_MAX_MESSAGE_SIZE = 100
|
||||
DEFAULT_MAX_NUM_RECIPIENTS = 25
|
||||
DEFAULT_MSG_FOOTER = """_______________________________________________
|
||||
%(description)s
|
||||
%(list_name)s@%(host_name)s
|
||||
%(web_page_url)slistinfo%(cgiext)s/%(list_name)s
|
||||
"""
|
||||
LOG_DIR = '/var/log/mailman'
|
||||
MAILMAN_UID = pwd.getpwnam('mailman')[2]
|
||||
MAILMAN_GID = grp.getgrnam('mailman')[2]
|
||||
PUBLIC_ARCHIVE_URL = 'http://%(hostname)s/mailman/public/%(listname)s'
|
||||
QUEUE_DIR = '/var/spool/mailman/qfiles'
|
||||
USE_ENVELOPE_SENDER = 1
|
||||
|
@@ -0,0 +1,7 @@
|
||||
##############################################################
|
||||
# Put YOUR site-specific configuration below, in mm_cfg.py . #
|
||||
# See Defaults.py for explanations of the values. #
|
||||
|
||||
DEFAULT_EMAIL_HOST = '{ $DomainName }'
|
||||
DEFAULT_URL_HOST = '{ $DomainName }'
|
||||
|
@@ -0,0 +1,17 @@
|
||||
{
|
||||
$OUT = "";
|
||||
if( -x "/usr/lib/mailman/mhonarc/filter")
|
||||
{
|
||||
$OUT .= "PUBLIC_EXTERNAL_ARCHIVER = '/usr/lib/mailman/mhonarc/filter %(listname)s'\n";
|
||||
$OUT .= "PRIVATE_EXTERNAL_ARCHIVER = '/usr/lib/mailman/mhonarc/filter %(listname)s'\n";
|
||||
$OUT .= "PUBLIC_EXTERNAL_ARCHIVER = '/usr/lib/mailman/mhonarc/filter %(listname)s'\n";
|
||||
$OUT .= "PRIVATE_EXTERNAL_ARCHIVER = '/usr/lib/mailman/mhonarc/filter %(listname)s'\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$OUT .= "PUBLIC_EXTERNAL_ARCHIVER = 0\n";
|
||||
$OUT .= "PRIVATE_EXTERNAL_ARCHIVER = 0\n";
|
||||
$OUT .= "PUBLIC_EXTERNAL_ARCHIVER = 0\n";
|
||||
$OUT .= "PRIVATE_EXTERNAL_ARCHIVER = 0\n";
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
##############################################################
|
||||
# Set MTA to special SME.py module for creation/deletion #
|
||||
# of lists. #
|
||||
|
||||
MTA = 'SME'
|
||||
|
@@ -0,0 +1,16 @@
|
||||
{
|
||||
# vim: ft=perl:
|
||||
use esmith::DomainsDB;
|
||||
|
||||
my $domains = esmith::DomainsDB->open_ro;
|
||||
$OUT = '';
|
||||
|
||||
foreach my $domainrec ($domains->domains)
|
||||
{
|
||||
next if $domainrec->prop('SystemServiceDomain');
|
||||
$OUT .= "add_virtualhost('$domainrec->{key}', '$domainrec->{key}')\n";
|
||||
}
|
||||
# Also add the FQDN of the box itself, in case the list is being addressed
|
||||
# in that fashion.
|
||||
$OUT .= "add_virtualhost('$SystemName.$DomainName', '$SystemName.$DomainName')\n";
|
||||
}
|
@@ -0,0 +1,21 @@
|
||||
##############################################################
|
||||
# The following are set to clean up variables that were set #
|
||||
# above. Do not change or remove these unless you know what #
|
||||
# you are doing. #
|
||||
|
||||
DEFAULT_DIGEST_FOOTER = DEFAULT_MSG_FOOTER
|
||||
DEFAULT_HOST_NAME = DEFAULT_EMAIL_HOST
|
||||
DEFAULT_URL = DEFAULT_URL_PATTERN % DEFAULT_URL_HOST
|
||||
INQUEUE_DIR = os.path.join(QUEUE_DIR, 'in')
|
||||
OUTQUEUE_DIR = os.path.join(QUEUE_DIR, 'out')
|
||||
CMDQUEUE_DIR = os.path.join(QUEUE_DIR, 'commands')
|
||||
BOUNCEQUEUE_DIR = os.path.join(QUEUE_DIR, 'bounces')
|
||||
NEWSQUEUE_DIR = os.path.join(QUEUE_DIR, 'news')
|
||||
ARCHQUEUE_DIR = os.path.join(QUEUE_DIR, 'archive')
|
||||
SHUNTQUEUE_DIR = os.path.join(QUEUE_DIR, 'shunt')
|
||||
VIRGINQUEUE_DIR = os.path.join(QUEUE_DIR, 'virgin')
|
||||
BADQUEUE_DIR = os.path.join(QUEUE_DIR, 'bad')
|
||||
MAILDIR_DIR = os.path.join(QUEUE_DIR, 'maildir')
|
||||
|
||||
# Note - if you're looking for something that is imported from mm_cfg, but you
|
||||
# didn't find it above, it's probably in Defaults.py.
|
@@ -0,0 +1,56 @@
|
||||
{
|
||||
use esmith::config;
|
||||
use esmith::db;
|
||||
|
||||
$OUT = '';
|
||||
|
||||
# Generate mailman user assignments for mailing lists. These will be handled
|
||||
# by ~mailman/aliases/.qmail-listname and ~mailman/aliases/.qmail-listname-ext.
|
||||
|
||||
my %accounts;
|
||||
tie %accounts, 'esmith::config', "/home/e-smith/db/accounts";
|
||||
|
||||
my (undef, undef, $uid, $gid, undef, undef, undef, $dir, undef)
|
||||
= getpwnam("mailman");
|
||||
|
||||
# It is almost impossible to get Text::Template to output nothing
|
||||
# on failure. It can be done by removing the newline at the end of
|
||||
# this file but that is messy. Therefore, we'll simply return an
|
||||
# error message that will make qmail-newu fail. Also send a
|
||||
# warning message that will be captured in the logs.
|
||||
|
||||
unless (defined $uid && defined $gid && defined $dir)
|
||||
{
|
||||
my $msg =
|
||||
"Failed to obtain user details for \'mailman\' "
|
||||
. "while processing group assignments.";
|
||||
|
||||
warn "$msg\n";
|
||||
$OUT = $msg;
|
||||
return;
|
||||
}
|
||||
|
||||
my $mailman_assign = "mailman:${uid}:${gid}:${dir}/aliases";
|
||||
|
||||
foreach my $listname (db_get(\%accounts))
|
||||
{
|
||||
next unless db_get_type(\%accounts, $listname) eq "mailmanlist";
|
||||
|
||||
# Assign mail for listname@
|
||||
$OUT .= "=${listname}:${mailman_assign}:-:${listname}:\n";
|
||||
|
||||
# Assign mail for listname-ext@
|
||||
$OUT .= "+${listname}-:${mailman_assign}:-${listname}-::\n";
|
||||
}
|
||||
|
||||
# Need to remove the final newline character. Blank lines in
|
||||
# /var/qmail/users/assign are prohibited.
|
||||
|
||||
chomp($OUT);
|
||||
|
||||
# Failsafe: /var/qmail/users/assign cannot have blank lines.
|
||||
# Therefore, if $OUT is empty, simply set up an assign for the
|
||||
# ezmlm user.
|
||||
|
||||
$OUT = "=mailman:${mailman_assign}:::" unless $OUT;
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
{
|
||||
$OUT .= "mailman\@$_\n" for (@domains);
|
||||
}
|
Reference in New Issue
Block a user