%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/mailman/Mailman/Gui/
Upload File :
Create Path :
Current File : //lib/mailman/Mailman/Gui/ContentFilter.pyc

�
��ac@sVdZddlmZddlmZddlmZdZdefd��YZdS(	s5GUI component managing the content filtering options.i����(tmm_cfg(t_(tGUIBases
t
ContentFiltercBs/eZd�Zdd�Zd�Zd�ZRS(cCsdtd�fS(Nt
contentfiltersContent filtering(R(tself((sg/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Gui/ContentFilter.pytGetConfigCategoryscCs�|dkrdStj}td�td�td�g}tjrY|jtd��ntd�dtjtd�td	�fd
td�fdtjd
|fd
td�td�fdtjd
|fd
td�td�fdtjd
|fd
td�fdtjd
|fd
td�fdtjtd�td	�fd
td�fdtjtd�td	�fd
td�fdtjt|�d
td�td�fg	S(NRtDiscardtRejectsForward to List OwnertPreserves>Policies concerning the content of list traffic.

            <p>Content filtering works like this: when a message is
            received by the list and you have enabled content filtering, the
            individual attachments are first compared to the
            <a href="?VARHELP=contentfilter/filter_mime_types">filter
            types</a>.  If the attachment type matches an entry in the filter
            types, it is discarded.

            <p>Then, if there are <a
            href="?VARHELP=contentfilter/pass_mime_types">pass types</a>
            defined, any attachment type that does <em>not</em> match a
            pass type is also discarded.  If there are no pass types defined,
            this check is skipped.

            <p>After this initial filtering, any <tt>multipart</tt>
            attachments that are empty are removed.  If the outer message is
            left empty after this filtering, then the whole message is
            discarded.

            <p> Then, each <tt>multipart/alternative</tt> section will
            be replaced by just the first alternative that is non-empty after
            filtering if
            <a href="?VARHELP=contentfilter/collapse_alternatives"
            >collapse_alternatives</a> is enabled.

            <p>Finally, any <tt>text/html</tt> parts that are left in the
            message may be converted to <tt>text/plain</tt> if
            <a href="?VARHELP=contentfilter/convert_html_to_plaintext"
            >convert_html_to_plaintext</a> is enabled and the site is
            configured to allow these conversions.tfilter_contenttNotYesis_Should Mailman filter the content of list traffic according
             to the settings below?tfilter_mime_typesi
sJRemove message attachments that have a matching content
             type.sUse this option to remove each message attachment that
             matches one of these content types.  Each line should contain a
             string naming a MIME <tt>type/subtype</tt>,
             e.g. <tt>image/gif</tt>.  Leave off the subtype to remove all
             parts with a matching major content type, e.g. <tt>image</tt>.

             <p>Blank lines are ignored.

             <p>See also <a href="?VARHELP=contentfilter/pass_mime_types"
             >pass_mime_types</a> for a content type whitelist.tpass_mime_typess�Remove message attachments that don't have a matching
             content type.  Leave this field blank to skip this filter
             test.s�Use this option to remove each message attachment that does
             not have a matching content type.  Requirements and formats are
             exactly like <a href="?VARHELP=contentfilter/filter_mime_types"
             >filter_mime_types</a>.

             <p><b>Note:</b> if you add entries to this list but don't add
             <tt>multipart</tt> to this list, any messages with attachments
             will be rejected by the pass filter.tfilter_filename_extensionssPRemove message attachments that have a matching filename
             extension.tpass_filename_extensionss�Remove message attachments that don't have a matching
             filename extension.  Leave this field blank to skip this filter
             test.tcollapse_alternativessUShould Mailman collapse multipart/alternative to its
             first part content?tconvert_html_to_plaintexts�Should Mailman convert <tt>text/html</tt> parts to plain
             text?  This conversion happens after MIME attachments have been
             stripped.t
filter_actionsOAction to take when a message matches the content filtering
             rules.sKOne of these actions is taken when the message matches one of
             the content filtering rules, meaning, the top-level
             content type matches one of the <a
             href="?VARHELP=contentfilter/filter_mime_types"
             >filter_mime_types</a>, or the top-level content type does
             <strong>not</strong> match one of the
             <a href="?VARHELP=contentfilter/pass_mime_types"
             >pass_mime_types</a>, or if after filtering the subparts of the
             message, the message ends up empty.

             <p>Note this action is not taken if after filtering the message
             still contains content.  In that case the message is always
             forwarded on to the list membership.

             <p>When messages are discarded, a log entry is written
             containing the Message-ID of the discarded message.  When
             messages are rejected or forwarded to the list owner, a reason
             for the rejection is included in the bounce message to the
             original author.  When messages are preserved, they are saved in
             a special queue directory on disk for the site administrator to
             view (and possibly rescue) but otherwise discarded.  This last
             option is only available if enabled by the site
             administrator.(	tNoneRtTEXTFIELDWIDTHRt%OWNERS_CAN_PRESERVE_FILTERED_MESSAGEStappendtRadiotTextttuple(RtmlisttcategorytsubcattWIDTHtactions((sg/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Gui/ContentFilter.pyt
GetConfigInfo sL	!	!						!	!	cCs�|d	krJg}xg|j�D]}|j�^q"D]�}d}|jd�}	|	dkro|rod}no|	dkr�g|jd�D]}|j�j�^q�\}
}|
s�|r�d}q�n|	dkr�d}n|s�|jtd��q8|j|j�j��q8W|dkr/||_q�|dkr�||_	q�n�|d
kr�g}x@g|j�D]}|j�^qlD]}
|j|
j��q�W|dkr�||_
q�|dkr�||_q�ntj
|||||�dS(NR
Rit/is#Bad MIME type ignored: %(spectype)sRR(sfilter_mime_typesspass_mime_types(sfilter_filename_extensionsspass_filename_extensions(t
splitlineststriptcounttsplittlowertaddErrorRRR
RRRRt	_setValue(RRtpropertytvaltdocttypeststspectypetoktslashestmaintypetsubtypetfextstext((sg/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Gui/ContentFilter.pyR(�s>,	1		,cCst|dkrtj|j�S|dkr8tj|j�S|dkrTtj|j�S|dkrptj|j�SdS(NR
RRR(tNLtjoinR
RRRR(RRtkindR)tparams((sg/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Gui/ContentFilter.pytgetValue�sN(t__name__t
__module__RRR R(R9(((sg/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Gui/ContentFilter.pyRs	{	#N(	t__doc__tMailmanRtMailman.i18nRtMailman.Gui.GUIBaseRR5R(((sg/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Gui/ContentFilter.pyt<module>s


Zerion Mini Shell 1.0