%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/mailman/Mailman/Handlers/
Upload File :
Create Path :
Current File : //lib/mailman/Mailman/Handlers/SpamDetect.pyc

�
��ac@s
dZddlZddlmZddlmZddlmZddlmZddlm	Z	ddl
mZdd	lm
Z
yeefWnek
r�d
ZdZnXd�Zd
ejfd��YZdejfd��YZe	jZdd�Zd�ZdS(s9Do more detailed spam detection.

This module hard codes site wide spam detection.  By hacking the
KNOWN_SPAMMERS variable, you can set up more regular expression matches
against message headers.  If spam is detected the message is discarded
immediately.

TBD: This needs to be made more configurable and robust.
i����N(tHeaderParseError(t
decode_header(tmm_cfg(tErrors(ti18n(t
GetCharSet(thold_for_approvaliicCs|S(N((ts((si/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Handlers/SpamDetect.pyt_/stSpamDetectedcBseZdZRS(sThe message contains known spam(t__name__t
__module__t__doc__(((si/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Handlers/SpamDetect.pyR	4stHeaderMatchHoldcBseZed�ZRS(s)The message headers matched a filter rule(R
RRtreason(((si/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Handlers/SpamDetect.pyR
7ssutf-8cCs�d}x�|j�D]�\}}d}yttjdd|��}Wn tk
rf|dfg}nXx9|D]1\}}|s�d}n|t||d�7}qnW|d||j|d�f7}qW|S(soReturns a string containing all the headers of msg, unfolded and
    RFC 2047 decoded and encoded in cset.
    tus
\st sus-asciitreplaces%s: %s
(titemsRtretsubRtunicodetencode(tmsgtcsettheadersthtvtuvaluetfragtcs((si/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Handlers/SpamDetect.pytgetDecodedHeaders@s
	$cCs�|jd�rdSxgtjD]\\}}tj|tj�}x8|j|g�D]$}|j|�}|rQt�qQqQWqWd}t	|j
�}	x'|j�D]}
|t|
|	�7}q�Wx7|j
D],\}}}
|tjkr�q�nx|j�D]�}|jd�rq�n|j�s$q�ntj||tjtjB�r�|tjkr^tj�n|tjkr�|jd�r�tj�ntjtd���n|tjkr�|jd�r�dSt|||t�n|tjkr�dSq�q�Wq�WdS(NtapprovedRt#ttoowners%Message rejected by filter rule match(tgetRtKNOWN_SPAMMERSRtcompilet
IGNORECASEtget_alltsearchR	Rtpreferred_languagetwalkRtheader_filter_rulestDEFERt
splitlinest
startswithtstript	MULTILINEtDISCARDRtDiscardMessagetREJECTt
RejectMessageRtHOLDRR
tACCEPT(tmlistRtmsgdatatheadertregextcretvaluetmoRtlcsettptpatternstactiontemptytpattern((si/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Handlers/SpamDetect.pytprocessUsD(RRtemail.ErrorsRtemail.HeaderRtMailmanRRRt
Mailman.UtilsRtMailman.Handlers.HoldRtTruetFalset	NameErrorRR2R	tHoldMessageR
RRD(((si/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/Handlers/SpamDetect.pyt<module>s&

		

Zerion Mini Shell 1.0