Hi Andrew, Thanks a lot. That got me close. All the components are started, email is working fine, but i've got either a web server config error or a mailman error. I can create lists but when going to the web interface for example lists.domain1.com/admin/testlist i'm getting a 404 error. This also happens when it's like lists.domain1.com/create as well. When I goto lists.domain1.com/mailman/listinfo i'm seeing the message no publically advertized lists. I'm assuming i've got a cgi or permissions issue with the setup, or a mailman issue. Any ideas? Thanks. Dave On 12/18/10, Andrew Hodgson <andrew@hodgsonfamily.org> wrote:
Hi,
I did get the message, have been busy all day.
This is the Cron script I use in /etc/cron.d/mailman:
# At 8AM every day, mail reminders to admins as to pending requests. # They are less likely to ignore these reminders if they're mailed # early in the morning, but of course, this is local time... ;) 0 8 * * * list [ -x /usr/local/mailman/cron/checkdbs ] && /usr/local/mailman/cron/checkdbs # # At 9AM, send notifications to disabled members that are due to be # reminded to re-enable their accounts. 0 9 * * * list [ -x /usr/local/mailman/cron/disabled ] && /usr/local/mailman/cron/disabled # # Noon, mail digests for lists that do periodic as well as threshold delivery. 0 12 * * * list [ -x /usr/local/mailman/cron/senddigests ] && /usr/local/mailman/cron/senddigests # # 5 AM on the first of each month, mail out password reminders. 0 5 1 * * list [ -x /usr/local/mailman/cron/mailpasswds ] && /usr/local/mailman/cron/mailpasswds # # Every 5 mins, try to gate news to mail. You can comment this one out # if you don't want to allow gating, or don't have any going on right now, # or want to exclusively use a callback strategy instead of polling. # */5 * * * * list [ -x /usr/local/mailman/cron/gate_news ] && /usr/local/mailman/cron/gate_news # # At 3:27am every night, regenerate the gzip'd archive file. Only # turn this on if the internal archiver is used and # GZIP_ARCHIVE_TXT_FILES is false in mm_cfg.py 27 3 * * * list [ -x /usr/local/mailman/cron/nightly_gzip ] && /usr/local/mailman/cron/nightly_gzip
Here is my init script in /etc/init.d/mailman:
#! /bin/sh # # mailman starts up the master queue runner for mailman # # Based on skeleton originally by Miquel van Smoorenburg and Ian Murdock, # customisations by Tollef Fog Heen and Thijs Kinkhorst for Debian. # Customised for stock Mailman installation by Andrew Hodgson 12/06/2010 # ### BEGIN INIT INFO # Provides: mailman-qrunner # Required-Start: $syslog $local_fs $remote_fs $named $network # Required-Stop: $syslog $local_fs $remote_fs $named $network # Should-Start: # Should-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 1 # Short-Description: Mailman Master Queue Runner # Description: Starts and stops the Mailman queue runners, used to # manage the various message queues within the Mailman # mailing list manager. ### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/local/mailman/bin/mailmanctl PIDFILE=/usr/local/mailman/data/master-qrunner.pid
test -x $DAEMON || exit 0
set -e
#if ! [ -d /var/run/mailman ]; then # install -d -o list -g list /var/run/mailman #fi
#if ! [ -d /var/lock/mailman ]; then # install -d -o root -g list -m 2775 /var/lock/mailman #fi
. /lib/lsb/init-functions
# In rare upgrading cycles python might not be available at some point. # Do not break the upgrade in that case. if ! [ -x /usr/bin/python ]; then log_warning_msg "Python interpreter not available, exiting." exit 0; fi
case "$1" in start) SITE_LIST=$( sed -rne "s/^[[:space:]]*MAILMAN_SITE_LIST[[:space:]]*=[[:space:]]*(['\"])([^'\"]+)\\1/\\2/p" /usr/local/mailman/Mailman/mm_cfg.py ) [ -n "$SITE_LIST" ] || SITE_LIST='mailman' if ! /usr/local/mailman/bin/list_lists -b | grep -q "^${SITE_LIST}$"; then log_warning_msg "Site list for mailman missing (looking for list named '${SITE_LIST}')." log_warning_msg "Please create it; until then, mailman will refuse to start." exit 0; fi log_daemon_msg "Starting Mailman master qrunner" "mailmanctl" if $DAEMON -s -q start; then log_end_msg 0 else log_end_msg 1 fi ;; stop) log_daemon_msg "Stopping Mailman master qrunner" "mailmanctl" if $DAEMON -q stop; then rm -f $PIDFILE log_end_msg 0 else log_end_msg 1 fi ;; reload) log_begin_msg "Reloading Mailman master qrunner configuration" if $DAEMON -q restart; then log_end_msg 0 else log_end_msg 1 fi ;; restart|force-reload) PID=`cat $PIDFILE 2>/dev/null` || true log_daemon_msg "Restarting Mailman master qrunner" "mailmanctl" $DAEMON -q stop if test -n "$PID" && kill -0 $PID 2>/dev/null ; then log_action_begin_msg "Waiting" for cnt in `seq 1 5`; do sleep 1 kill -0 $PID 2>/dev/null || break done; if kill -0 $PID 2>/dev/null ; then log_action_end_msg 1 else log_action_end_msg 0 fi fi if $DAEMON -q start; then log_end_msg 0 else log_end_msg 1 fi ;; *) echo "Usage: /etc/init.d/mailman {start|stop|restart|reload|force-reload}" >&2 exit 1 ;; esac
exit 0
Here is the logrotate script in /etc/logrotate.d/mailman:
/usr/local/mailman/logs/vette /usr/local/mailman/logs/error /usr/local/mailman/logs/bounce { weekly missingok create 0664 list list rotate 4 compress delaycompress sharedscripts postrotate [ -f '/usr/local/mailman/data/master-qrunner.pid' ] && /usr/local/mailman/bin/mailmanctl -q reopen || exit 0 endscript }
/usr/local/mailman/logs/mischief { monthly missingok create 0664 list www-data rotate 4 compress delaycompress sharedscripts postrotate [ -f '/usr/local/mailman/data/master-qrunner.pid' ] && /usr/local/mailman/bin/mailmanctl -q reopen || exit 0 endscript }
/usr/local/mailman/logs/digest { monthly missingok create 0664 list list rotate 4 compress delaycompress sharedscripts postrotate [ -f '/usr/local/mailman/data/master-qrunner.pid' ] && /usr/local/mailman/bin/mailmanctl -q reopen || exit 0 endscript }
/usr/local/mailman/logs/subscribe /usr/local/mailman/logs/post { monthly missingok create 0664 list list rotate 12 compress delaycompress sharedscripts postrotate [ -f '/usr/local/mailman/data/master-qrunner.pid' ] && /usr/local/mailman/bin/mailmanctl -q reopen || exit 0 endscript }
/usr/local/mailman/logs/qrunner /usr/local/mailman/logs/fromusenet /usr/local/mailman/logs/locks /usr/local/mailman/logs/smtp /usr/local/mailman/logs/smtp-failure { daily missingok create 0664 list list rotate 7 compress delaycompress sharedscripts postrotate [ -f '/usr/local/mailman/data/master-qrunner.pid' ] && /usr/local/mailman/bin/mailmanctl -q reopen || exit 0 endscript }
Here is my vhost template where the URL for the Mailman is off the root, it is a bit different to the defaults since I made a lot of changes to the configuration to take out unneeded directives:
<VirtualHost *:80> ServerName lists.domain.com DocumentRoot /var/www/lists ErrorLog /var/log/apache2/lists-error.log CustomLog /var/log/apache2/lists-access.log combined
<Directory /usr/local/mailman/archives/> Options FollowSymLinks AllowOverride None </Directory>
Alias /pipermail/ /usr/local/mailman/archives/public/ Alias /icons/ /usr/local/mailman/icons/ ScriptAlias /admin /usr/local/mailman/cgi-bin/admin ScriptAlias /admindb /usr/local/mailman/cgi-bin/admindb ScriptAlias /confirm /usr/local/mailman/cgi-bin/confirm ScriptAlias /create /usr/local/mailman/cgi-bin/create ScriptAlias /edithtml /usr/local/mailman/cgi-bin/edithtml ScriptAlias /listinfo /usr/local/mailman/cgi-bin/listinfo ScriptAlias /options /usr/local/mailman/cgi-bin/options ScriptAlias /private /usr/local/mailman/cgi-bin/private ScriptAlias /rmlist /usr/local/mailman/cgi-bin/rmlist ScriptAlias /roster /usr/local/mailman/cgi-bin/roster ScriptAlias /subscribe /usr/local/mailman/cgi-bin/subscribe ScriptAlias /mailman/ /usr/local/cgi-bin/ RedirectMatch ^[/]+$ http://lists.domain.com/listinfo/ </VirtualHost>
If you want a more traditional setup that works with the defaults use this: <VirtualHost *:80> ServerName lists.domain.com DocumentRoot /var/www/lists ErrorLog /var/log/apache2/lists-error.log CustomLog /var/log/apache2/lists-access.log combined
<Directory /usr/local/mailman/archives/> Options FollowSymLinks AllowOverride None </Directory>
Alias /pipermail/ /usr/local/mailman/archives/public/ Alias /icons/ /usr/local/mailman/icons/ ScriptAlias /mailman/ /usr/local/cgi-bin/ RedirectMatch ^[/]+$ http://lists.domain.com/mailman/listinfo/ </VirtualHost>
Whilst sending these to you I just noticed that this also allows the /icons directory to be indexed, I may fix this at some point by including a piece like this:
<Directory /usr/local/mailman/icons/> AllowOverride None </Directory>
I haven't tested this however.
Hope this helps. Andrew.
_______________________________________________ Blind-sysadmins mailing list Blind-sysadmins@lists.hodgsonfamily.org http://lists.hodgsonfamily.org/listinfo/blind-sysadmins