# Copyright (C) 2001-2009 by the Free Software Foundation, Inc.
#
# This file is part of GNU Mailman.
#
# GNU Mailman 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 3 of the License, or (at your option)
# any later version.
#
# GNU Mailman 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
# GNU Mailman. If not, see
If the newsgroup is moderated, you can set this mailing list up to be the moderation address for the newsgroup. By selecting Moderated, an additional posting hold will be placed in the approval process. All messages posted to the mailing list will have to be approved before being sent on to the newsgroup, or to the mailing list membership.
Note that if the message has an Approved header with the list's administrative password in it, this hold test will be bypassed, allowing privileged posters to send messages directly to the list and the newsgroup.
Finally, if the newsgroup is moderated, but you want to have an open posting policy anyway, you should select Open list, moderated group. The effect of this is to use the normal Mailman moderation facilities, but to add an Approved header to all messages that are gatewayed to Usenet.""")), ('news_prefix_subject_too', config.Toggle, (_('No'), _('Yes')), 0, _('Prefix Subject: headers on postings gated to news?'), _("""Mailman prefixes Subject: headers with text you can customize and normally, this prefix shows up in messages gatewayed to Usenet. You can set this option to No to disable the prefix on gated messages. Of course, if you turn off normal Subject: prefixes, they won't be prefixed for gated messages either.""")), _('Mass catch up'), ('_mass_catchup', config.Toggle, (_('No'), _('Yes')), 0, _('Should Mailman perform a catchup on the newsgroup?'), _('''When you tell Mailman to perform a catchup on the newsgroup, this means that you want to start gating messages to the mailing list with the next new message found. All earlier messages on the newsgroup will be ignored. This is as if you were reading the newsgroup yourself, and you marked all current messages as read. By catching up, your mailing list members will not see any of the earlier messages.''')), ] def _setValue(self, mlist, property, val, doc): # Watch for the special, immediate action attributes if property == '_mass_catchup' and val: mlist.usenet_watermark = None doc.AddItem(_('Mass catchup completed')) else: GUIBase._setValue(self, mlist, property, val, doc) def _postValidate(self, mlist, doc): # Make sure that if we're gating, that the newsgroups and host # information are not blank. if mlist.gateway_to_news or mlist.gateway_to_mail: # BAW: It's too expensive and annoying to ensure that both the # host is valid and that the newsgroup is a valid n.g. on the # server. This should be good enough. if not mlist.nntp_host or not mlist.linked_newsgroup: doc.addError(_("""You cannot enable gatewaying unless both the news server field and the linked newsgroup fields are filled in.""")) # And reset these values mlist.gateway_to_news = 0 mlist.gateway_to_mail = 0