8
8
# Lionel Elie Mamane, Thijs Kinkhorst, Riccardo Setti, Matej Vela, Hector Garcia, László Böszörményi, Bernd S. Brentrup, ...
10
10
# $URL: svn+ssh://svn.debian.org/svn/svn/pkg-mailman/trunk/debian/postinst $
11
# $Id: postinst 630 2009-09-25 09:31:03Z thijs $
11
# $Id: postinst 693 2011-10-08 15:30:38Z thijs $
13
13
. /usr/share/debconf/confmodule
93
93
# Install postfix-to-mailman.py as well
94
94
ucf --debconf-ok --three-way ${mm_dist}/postfix-to-mailman.py ${mm_etc}/postfix-to-mailman.py 2>/dev/null
96
# Configure Mailman crontab
98
# Ensure the file exists before we awk it.
99
if [ ! -f /etc/cron.d/mailman ]; then
100
cat > /etc/cron.d/mailman <<EOF
101
# At 8AM every day, mail reminders to admins as to pending requests.
102
# They are less likely to ignore these reminders if they're mailed
103
# early in the morning, but of course, this is local time... ;)
104
0 8 * * * list [ -x /usr/lib/mailman/cron/checkdbs ] && /usr/lib/mailman/cron/checkdbs
106
# At 9AM, send notifications to disabled members that are due to be
107
# reminded to re-enable their accounts.
108
0 9 * * * list [ -x /usr/lib/mailman/cron/disabled ] && /usr/lib/mailman/cron/disabled
110
# Noon, mail digests for lists that do periodic as well as threshold delivery.
111
0 12 * * * list [ -x /usr/lib/mailman/cron/senddigests ] && /usr/lib/mailman/cron/senddigests
113
# 5 AM on the first of each month, mail out password reminders.
114
0 5 1 * * list [ -x /usr/lib/mailman/cron/mailpasswds ] && /usr/lib/mailman/cron/mailpasswds
116
# Every 5 mins, try to gate news to mail. You can comment this one out
117
# if you don't want to allow gating, or don't have any going on right now,
118
# or want to exclusively use a callback strategy instead of polling.
119
# */5 * * * * list [ -x /usr/lib/mailman/cron/gate_news ] && /usr/lib/mailman/cron/gate_news
121
# At 3:27am every night, regenerate the gzip'd archive file. Only
122
# turn this on if the internal archiver is used and
123
# GZIP_ARCHIVE_TXT_FILES is false in mm_cfg.py
124
27 3 * * * list [ -x /usr/lib/mailman/cron/nightly_gzip ] && /usr/lib/mailman/cron/nightly_gzip
128
db_get mailman/gate_news || true
129
if [ "$RET" = "false" ]; then
130
# Comment out any lines containing the words "gate_news"
131
awk '/^[^#]*gate_news/ { print "# " $LINE;next }; //' < /etc/cron.d/mailman > /etc/cron.d/mailman.$$
133
# Remove commenting of any lines containing gate_news
134
awk '/^[ \t]*#.*gate_news/ { sub(/^[ \t]*#[ \t]*/, ""); print; next }; //' < /etc/cron.d/mailman > /etc/cron.d/mailman.$$
136
mv -f /etc/cron.d/mailman.$$ /etc/cron.d/mailman
138
96
if [ -e /etc/mailman/mm_cfg.py ]; then
139
97
db_get mailman/default_server_language || true
140
98
if [ -n "$RET" ]; then