%PDF- %PDF-
Mini Shell

Mini Shell

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

�
��ac@s�dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZddl
m
Z
ddlmZddlTddlZddlmZmZmZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZddlm Z ddl!m"Z"ddl#m$Z$ddl%m&Z&ddl'm(Z(ddl)m*Z*ddl+m,Z,ddl-m.Z.ddl/m0Z0ddl1m2Z2ddlm3Z3ddlm4Z4ddlm5Z5ddl6m7Z7ddlm8Z8ddlm9Z9ddlm:Z:ddl;m<Z<e:j=Z=d Z>ye?e@fWneAk
r�d!Z?d"Z@nXd#e,e&e.e e(e0e$e*e"e2e3j3fd$��YZBdS(%sUThe class representing a Mailman mailing list.

Mixes in many task-specific classes.
i����N(tStringIO(tUserDict(turlparse(t*(tgetaddressest
formataddrt	parseaddr(tHeader(tmm_cfg(tUtils(tErrors(tLockFile(tUserDesc(tArchiver(t
Autoresponder(tBouncer(t	Deliverer(tDigester(tGatewayManager(t
HTMLFormatter(t	ListAdmin(tSecurityManager(tTopicMgr(tPending(tGui(t
MemberAdaptor(tOldStyleMemberships(tMessage(tSite(ti18n(tsyslogtiitMailListcBseZd3dd�Zd�Zd�Zdd�Zd�Zd�Zd�Z	d	�Z
d3d
�Zd�Zd�Z
d
d�Zd�Zd�Zd�Zd�Zd�Zdd�Zddd�Zd�Zd3d
d
d3d�Zd�Zd�Zd3d�Zd3d3d3d�Zd�Zd�Zd�Zed�Z d �Z!d!�Z"d"�Z#d
d#�Z$d3d$�Z%d3d3d
d
d%�Z&d3d3ed&�Z'd3d3d3d'�Z(d(�Z)d)�Z*d*�Z+d3d+�Z,d3d3d,�Z-d-�Z.d.�Z/d/�Z0d3d0�Z1d1�Z2d2�Z3RS(4icCsx3|jjD]%}t|d�r
|j|�q
q
W|j|�t|�|_|dkrbdStj	j
|j�d�}i}yt||�Wn8t
k
r�}|jtjkr�q�tdd|�n#X|jd�}|r�||�n|r|j�n
|j�dS(Nt__init__s	extend.pyterrors"IOError reading list extension: %stextend(t	__class__t	__bases__thasattrR!tInitTempVarsRt_memberadaptortNonetostpathtjointfullpathtexecfiletIOErrorterrnotENOENTRtgettLocktLoad(tselftnametlockt	baseclasstfilenametdicttetfunc((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyR!^s*


cCsnyt|j|�SWnStk
rixC|jD]+}yt||�SWq.tk
rXq.Xq.Wt|�nXdS(N(tgetattrR(tAttributeErrort_gui(R5R6tguicomponent((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyt__getattr__�s

cCs8|j�rd}nd}d|j�|t|�fS(Ns(locked)s
(unlocked)s<mailing list "%s" %s at %x>(tLockedt
internal_nametid(R5tstatus((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyt__repr__�s
	icCsC|jj|�y|j�Wntk
r>|j��nXdS(N(t_MailList__lockR7R4t	ExceptiontUnlock(R5ttimeout((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyR3�s

cCs|jjdd�dS(Ntunconditionallyi(RGtunlock(R5((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyRI�scCs
|jj�S(N(RGtlocked(R5((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyRB�scCs|jS(N(t_internal_name(R5((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyRC�scCs|jS(N(t
_full_path(R5((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyR-�scCs=|dkr#d|j�|jfSd|j�||jfS(Ns%s@%ss%s-%s@%s(R)RCt	host_name(R5textra((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytgetListAddress�scCs
|jd�S(Ntbounces(RR(R5((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytGetBouncesEmail�scCs
|jd�S(Ntowner(RR(R5((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyt
GetOwnerEmail�sRcCs-tjr|r|j|�S|jd�SdS(Ntrequest(RtVERP_CONFIRMATIONStGetConfirmEmailRR(R5tcookie((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytGetRequestEmail�s
cCs.tjid|j�d6|d6d|jS(Ns
%s-confirmtaddrRZt@(RtVERP_CONFIRM_FORMATRCRP(R5RZ((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyRY�scCs^tjrR|rRtj�j�p0tj|j�}tt	d�|dd�}|Sd|SdS(NsCYour confirmation is required to join the %(listname)s mailing listtheader_nametsubjectsconfirm (
RRXRtget_translationtcharsetR	t
GetCharSettpreferred_languageRt_(R5tlistnameRZtcsettsubj((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytGetConfirmJoinSubject�s	cCs^tjrR|rRtj�j�p0tj|j�}tt	d�|dd�}|Sd|SdS(NsDYour confirmation is required to leave the %(listname)s mailing listR_R`sconfirm (
RRXRRaRbR	RcRdRRe(R5RfRZRgRh((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytGetConfirmLeaveSubject�s	cCs
|j�S(N(RR(R5((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytGetListEmail�scCs@|js
|St|jd��\}}d||j|fSdS(s�Usually the member addr, but modified for umbrella lists.

        Umbrella lists have other mailing lists as members, and so admin stuff
        like confirmation requests and passwords must not be sent to the
        member addresses - the sublists - but rather to the administrators of
        the sublists.  This routine picks the right address, considering
        regular member address to be their own administrative addresses.

        R]s%s%s@%sN(t
umbrella_listttupletsplittumbrella_member_suffix(R5tmembertacctthost((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytGetMemberAdminEmail�s
	cCs$tj||j|�d|j�S(Nt/(R	t	ScriptURLtweb_page_urlRC(R5t
scriptnametabsolute((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytGetScriptURL�scCsG|jd|�}|r*tj|�}nd|tj|j��fS(Ntoptionss%s/%s(RyR	tObscureEmailturllibtquotetlower(R5tusertobscureRxturl((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyt
GetOptionsURLscCsd|_tjtjjtj|p'd�ddtjdtj�|_	||_
|rmtj|�|_
n	d|_
x3|jjD]%}t|d�r�|j|�q�q�Wg|_xEtt�D]7}|jd�r�q�n|jjtt|���q�Wd	S(
s6Set transient variables of this and inherited classes.is<site>s.locktlifetimetwithloggingRR'ReN(t_MailList__timestampRR*R+R,RtLOCK_DIRtLIST_LOCK_LIFETIMEtLIST_LOCK_DEBUGGINGRGRNRtget_listpathROR$R%R&R'R?tdirRt
startswithtappendR=(R5R6R8t	component((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyR'
s"	"				cCse|r||_ntj�|_d|_i|_tj|_d|_d|_	i|_
i|_i|_i|_
tj|_tj|_tj|_tj|_tj|_tjp�tj|_tjp�tj|p�tj|_|g|_g|_ tj!|_"d|_#tj$|_%tj&|_'tj(|_)tj*|_+tj,|_-tj.|_/tj0|_1tj2|_3tj4|_5tj6|_7tj8|_9tj:|_;tj<|_=tj>|_?g|_@tjA|_BtjC|_D|jE�}|djF�|d|_Gd|_Hd|_Id|_Jd|_KtjL|_MtjN|_OtjP|_QtjR|_StjT|_UtjV|_WtjX|_Yg|_Zd|_[d|_\d|_]tj^|__tj`|_atjb|_ctjd|_etjf|_gtjh|_itjj|_ktjl|_mtjn|_od|_ptjq|_rd|_sd|_td|_utjv|_wtjx|_yd|_zg|_{g|_|g|_}g|_~tj|_�tj�|_�d|_�g|_�||_�i|_�x3|j�j�D]%}t�|d�r�|j�|�q�q�Wtj�|j�|_�tj�|_�tj�|_�t�j�|jY�dkr@d|_�n	d|_�tj�|_�tj�|_�dS(	s?Assign default values - some will be overriden by stored state.iig�?RtInitVarssus-asciiiN(�RNttimet
created_attvolumetmembersRtDATA_FILE_VERSIONtdata_versiontlast_post_timetpost_idtuser_optionstlanguaget	usernamest	passwordstDEFAULT_NEW_MEMBER_OPTIONStnew_member_optionst DEFAULT_RESPOND_TO_POST_REQUESTStrespond_to_post_requeststDEFAULT_LIST_ADVERTISEDt
advertisedtDEFAULT_MAX_NUM_RECIPIENTStmax_num_recipientstDEFAULT_MAX_MESSAGE_SIZEtmax_message_sizetDEFAULT_HOST_NAMEtDEFAULT_EMAIL_HOSTRPtDEFAULT_URLtDEFAULT_URL_PATTERNtDEFAULT_URL_HOSTRvRUt	moderatortDEFAULT_REPLY_GOES_TO_LISTtreply_goes_to_listtreply_to_addresstDEFAULT_FIRST_STRIP_REPLY_TOtfirst_strip_reply_totDEFAULT_ADMIN_IMMED_NOTIFYtadmin_immed_notifytDEFAULT_ADMIN_NOTIFY_MCHANGEStadmin_notify_mchangest$DEFAULT_REQUIRE_EXPLICIT_DESTINATIONtrequire_explicit_destinationtDEFAULT_ACCEPTABLE_ALIASEStacceptable_aliasestDEFAULT_UMBRELLA_LISTRlt$DEFAULT_UMBRELLA_MEMBER_ADMIN_SUFFIXRotDEFAULT_REGULAR_EXCLUDE_LISTStregular_exclude_liststDEFAULT_REGULAR_EXCLUDE_IGNOREtregular_exclude_ignoretDEFAULT_REGULAR_INCLUDE_LISTStregular_include_liststDEFAULT_SEND_REMINDERStsend_reminderstDEFAULT_SEND_WELCOME_MSGtsend_welcome_msgtDEFAULT_SEND_GOODBYE_MSGtsend_goodbye_msgtDEFAULT_BOUNCE_MATCHING_HEADERStbounce_matching_headerstheader_filter_rulestDEFAULT_FROM_IS_LISTtfrom_is_listtDEFAULT_ANONYMOUS_LISTtanonymous_listRCtuppert	real_nametdescriptiontinfotwelcome_msgtgoodbye_msgtDEFAULT_SUBSCRIBE_POLICYtsubscribe_policytDEFAULT_UNSUBSCRIBE_POLICYtunsubscribe_policytDEFAULT_PRIVATE_ROSTERtprivate_rostertDEFAULT_OBSCURE_ADDRESSEStobscure_addressestDEFAULT_ADMIN_MEMBER_CHUNKSIZEtadmin_member_chunksizetDEFAULT_ADMINISTRIVIAt
administriviatDEFAULT_SERVER_LANGUAGERdtavailable_languagestinclude_rfc2369_headerstinclude_list_post_headertinclude_sender_headertDEFAULT_FILTER_MIME_TYPEStfilter_mime_typestDEFAULT_PASS_MIME_TYPEStpass_mime_typest"DEFAULT_FILTER_FILENAME_EXTENSIONStfilter_filename_extensionst DEFAULT_PASS_FILENAME_EXTENSIONStpass_filename_extensionstDEFAULT_FILTER_CONTENTtfilter_contenttDEFAULT_COLLAPSE_ALTERNATIVEStcollapse_alternativest!DEFAULT_CONVERT_HTML_TO_PLAINTEXTtconvert_html_to_plaintexttDEFAULT_FILTER_ACTIONt
filter_actiontDEFAULT_NONDIGESTABLEt
nondigestabletpersonalizet!DEFAULT_DEFAULT_MEMBER_MODERATIONtdefault_member_moderationt	emergencytmember_moderation_actiontmember_moderation_noticetDEFAULT_DMARC_MODERATION_ACTIONtdmarc_moderation_actiont*DEFAULT_DMARC_QUARANTINE_MODERATION_ACTIONt"dmarc_quarantine_moderation_actiontdmarc_moderation_noticetaccept_these_nonmembersthold_these_nonmemberstreject_these_nonmemberstdiscard_these_nonmemberstDEFAULT_FORWARD_AUTO_DISCARDStforward_auto_discardst DEFAULT_GENERIC_NONMEMBER_ACTIONtgeneric_nonmember_actiontnonmember_rejection_noticetban_listtpasswordthold_and_cmd_autoresponsesR$R%R&R�tDEFAULT_SUBJECT_PREFIXt__dict__tsubject_prefixtDEFAULT_MSG_HEADERt
msg_headertDEFAULT_MSG_FOOTERt
msg_footerR	Rctencode_ascii_prefixestDEFAULT_SCRUB_NONDIGESTtscrub_nondigesttDEFAULT_MAX_DAYS_TO_HOLDtmax_days_to_hold(R5R6tadmintcrypted_passwordturlhosttinternalnameR8((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyR�%s�																																		cCsYdtfd��Y}|�}x3|jD](}|j�\}}||f||<q)W|S(NtCategoryDictcBs,eZd�Zd�Zd�Zd�ZRS(cSstj|�tj|_dS(N(RR!RtADMIN_CATEGORIEStkeysinorder(R5((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyR!�s
cSs|jS(N(R(R5((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytkeys�scSs8g}x+tjD] }|j||j|f�qW|S(N(RRR�tdata(R5titemstk((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyR"�scSs2g}x%tjD]}|j|j|�qW|S(N(RRR�R!(R5tvaluesR#((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyR$�s(t__name__t
__module__R!R R"R$(((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyR�s			(RR?tGetConfigCategory(R5Rt
categoriestguiR#tv((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytGetConfigCategories�s	cCsIxB|jD]7}t|d�r
|j|�}|dk	rA|Sq
q
WdS(NtGetConfigSubCategories(R?R&R,R)(R5tcategoryR)tsubcat((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyR,�scCsIxB|jD]7}t|d�r
|j|||�}|rA|Sq
q
WdS(Nt
GetConfigInfo(R?R&R/(R5R-R.R)tvalue((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyR/�s
cCsT||j�kstd��tj|�r<tj|�nttjt	j
d|��dkrotj|�n|dkr�t	j
}nd||f}ytj|�Wn tjk
r�tj|�nXtj|�||_tj|dd�|_|jj�|j|||d|�|j�|dkrG|jg|_n	||_dS(Ns!List name must be all lower case.Ris%s@%stcreateiR(R~tAssertionErrorR	tlist_existsR
tMMListAlreadyExistsErrortlentretsubRtACCEPTABLE_LISTNAME_CHARACTERStBadListNameErrorR)R�t
ValidateEmailtEmailAddressErrorRNRR�RORGR7R�tCheckValuesRdR�(R5R6RRtlangst	emailhostRtpostingaddr((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytCreate�s*$
	

cCs�tjj|j�d�}|dtj�tj�f}|d}d}yYt|d�}t	j
||d�|j�tj
r�tj|j��n|j�WnBtk
r�}tdd|�|dk	r�tj|�n�nXytj|�Wn+tk
r'}|jtjkr(�q(nXytj||�Wn+tk
ri}|jtjkrj�qjnXtj||�tjj|�|_dS(Ns
config.pcks
.tmp.%s.%ds.lasttwiR"s0Failed config.pck write, retaining old state.
%s(R*R+R,R-tsockettgethostnametgetpidR)topentcPickletdumptflushRtSYNC_AFTER_WRITEtfsynctfilenotcloseR/RtunlinktOSErrorR0R1tlinktrenametgetmtimeR�(R5R:tfnamet	fname_tmpt
fname_lasttfpR;((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyt__save
s: 

	


cCs�|jj�i}xO|jj�D]>\}}|ddks#t|�tkrWq#n|||<q#Wtjd�}z|j|�Wdtj|�|j	�X|j
�dS(NiRei(RGtrefreshRR"ttypet
MethodTypeR*tumaskt_MailList__savetSaveRequestsDbtCheckHTMLArchiveDir(R5R:tkeyR0tomask((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytSave2s
"
cCs\|jd�s|jd�r*tj}n<|jd�sH|jd�rTtj}ndsftd��y5tjj|�}||jkr�dSt
|�}Wn2tk
r�}|jtj
kr��nd|fSXz_y&||�}t|�tkr�d	SWn2tttttjtjfk
r-}d|fSXWd|j�Xttj��|_|dfS(
Ns.dbs.db.lasts.pcks	.pck.lastisBad database file names&Load() expected to return a dictionary(NN(Ns&Load() expected to return a dictionary(tendswithtmarshaltloadRFR2R*R+RQR�R)REtEnvironmentErrorR0R1RXtDictTypetEOFErrort
ValueErrort	TypeErrortMemoryErrort
PicklingErrortUnpicklingErrorRLtintR�(R5tdbfiletloadfunctmtimeRUR;R:((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyt__loadHs2
c
Cs�tj|j��s!tj�ntjj|j�d�}|d}tjj|j�d�}|d}x�||||fD]Q}|j	|�\}}|dkr�|dk	r�tdd||�q�dSq~Pq~Wtdd|j��tj|�||ks
||kr�tdd|�t
}	zKy|jj�Wntjk
rSt}	nX|j|||||�Wd|	r�|jj�nXn|jj|�|r�|j|�|j�ndS(Ns
config.pcks.lasts	config.dbR"scouldn't load config file %s
%ss(All %s fallbacks were corrupt, giving ups%fixing corrupt config file, using: %s(R	R3RCR
tMMUnknownListErrorR*R+R,R-t_MailList__loadR)RtMMCorruptListDatabaseErrortTrueRGR7RtAlreadyLockedErrortFalset_MailList__fix_corrupt_pckfileRLRtupdatetCheckVersionR<(
R5t
check_versiontpfiletplasttdfiletdlasttfileR:R;RL((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyR4�s@

	
	


cCs|||kr�ytj||d�Wn+tk
rQ}|jtjkrR�qRnXytj|d�Wn+tk
r�}|jtjkr��q�nXtj||�tj||d�n�||krxytj||d�Wn+tk
r
}|jtjkr�qnXytj|d�Wn+tk
rP}|jtjkrQ�qQnXtj||�tj||d�ndS(Ns.corrupts.safety(R*RPRNR0R1tremovetshutiltcopy(R5RR{R|R}R~R;((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyt__fix_corrupt_pckfile�s4



cCs�|jtjkrUt|d�rUt|d�rUt|d�rUt|d�rUdSn|j�d|_|jdd�|j�}|s�|j�nz7dd	l	m
}|||�tj|_|j�Wd|s�|j�nXdS(
s Auto-update schema if necessary.R�R�RR�NiRzi����(tUpdate(
R�RR�R&R�R�R4RBR3tversionsR�R`RI(R5tstored_statet	waslockedR�((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyRy�s&
	

c
Csndt|j�d kr8tjp/tjtj|_n|jrg|jddkrg|jd|_ny/|jj�r�|jr�t	j
|j�nWnBtjk
r�t
dd|j|j��d|_d|_nXg}x}|jD]r\}}}}ytj|�Wn3tjtfk
rCt
dd||j��q�X|j||||f�q�W||_d	S(
s+Normalize selected values to known formats.Rii����RtR"s.Bad reply_to_address "%s" cleared for list: %sis#Bad topic pattern "%s" for list: %sN(RRvRR�R�R�R�tstripR�R	R:R
R;RRCttopicsR6tcompileR"RhR�(R5t
goodtopicsR6tpatterntdesct	emptyflag((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyR<�s,			
	cCs`|j}tj|�|j|�}|r:tj|�n|j�|_|jt	j
|�}|jd�}d|jddd�|f}|j
}|tjdi|d6|d6|jd	6|d
6|d6|d6|j�d
6d|�7}|j|�}	tj||	d|d|j�}
|j||�}|
d=||
d<|
d=d|
d<|
j|�dS(s�Invite a new member to the list.

        This is done by creating a subscription pending for the user, and then
        crafting a message to the member informing them of the invitation.
        RWs%s/%stconfirmRxis
invite.txttemailRfthostnamet
confirmurltrequestaddrRZt	listownertmlistttexttlangR`tSubjectsauto-submittedsauto-generatedsAuto-SubmittedN(taddressR	R:tGetBannedPatternR
tMembershipIsBannedRCt
invitationtpend_newRtSUBSCRIPTIONRRRyR�tmaketextRPRVR[RtUserNotificationRdRitsend(R5tuserdescR�tinviteeR�RZR�R�RftsendertmsgRh((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytInviteNewMembers>	

		


	

c
Cs�|j�st�tj|j�}t|dd�}t|d|j�}t|dd(�}t|dtj��}|d(kr�|j	r�d}q�d}ntj
|�|j|�r�tj
|�n|j�|j�j�kr�tj�n|j}|j|�}	|	r4tdd	|||	�tj|	�n|rP|jrPtj�n|rm|j	rmtj�n||_||_||_||_||_|jdkr�|j|d
|p�d�n�|jdks�|jdkr�|jtj |�}
|d(krd}}nd|}t!d
�}|j"|�}d|j#ddd�|
f}
tj$di|d6|j�d6|d6|
d6|j%d�d6|d6|j&�d6|
d6d|d|�}t'j(||j)|
�d|d|�}|d=|j*||
�|d<|j)|
�|d <|j�j+|j��r;d!}nd"}|d#=||d$<|j,|�t-||f�}td%d&|j.�||�tj/�n+|j0|||||�tj1t!d'��d(S()s�Front end to member subscription.

        This method enforces subscription policy, validates values, sends
        notifications, and any other grunt work involved in subscribing a
        user.  It eventually calls ApprovedAddMember() to do the actual work
        of subscribing the user.

        userdesc is an instance with the following public attributes:

            address  -- the unvalidated email address of the member
            fullname -- the member's full name (i.e. John Smith)
            digest   -- a flag indicating whether the user wants digests or not
            language -- the requested default language for the user
            password -- the user's password

        Other attributes may be defined later.  Only address is required; the
        others all have defaults (fullname='', digests=0, language=list's
        preferred language, password=generated).

        remote is a string which describes where this add request came from.
        tfullnameRR�tdigestRiitvettes(%s banned subscription: %s (matched: %s)twhenceit s from %(remote)ss%s/%sR�Rxs
verify.txtR�tlistaddrRfRZRWR�tremotet	listadminR�R�R�R�R`R�sReply-Tosauto-repliedsauto-generatedsauto-submittedsAuto-Submittedt	subscribes%s: pending %s %ss8subscriptions to %(realname)s require moderator approvalN(2RBR2R	tLCDomainR�R=RdR)tMakeRandomPasswordR�R:tisMemberR
tMMAlreadyAMemberR~RktMMBadEmailErrorR�R�RR�t
digestabletMMCantDigestErrortMMMustDigestErrorR�R�R�RR�tApprovedAddMemberR�RR�ReRsRyR�RRRVRR�R[RiRaR�RRCtMMSubscribeNeedsConfirmationtHoldSubscriptiontMMNeedApproval(R5R�R�R�R6R�R�RtrealnameR�RZtbyt	recipientR�R�R�tautosubtwho((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyt	AddMemberGs�			
		
					






	

		c
Cs�|j�st�|d
kr*|j}n|d
krB|j}ntj|j�}t|dd�}t|d|j	�}t|dd
�}	t|dtj
��}
|	d
kr�|jr�d}	q�d}	ntj|�|j
|�r�tj|�n|j|�}|rtj|�n|j|d|d|	d|
d|�|j|tjd|j�|j|tj|j�|	r�d	}nd}td
d|j�|t||f�|�|r�|j||j|�|	|�n|r�|j	}tj�}
tj |�z|j!}t"d�}Wd
tj#|
�Xt$|t%�r]|j&tj'|�d�}ntj(di|d6t||f�d6d|�}t)j*|||�}|j+|�nd
S(sAdd a member right now.

        The member's subscription must be approved by what ever policy the
        list enforces.

        userdesc is as above in AddMember().

        ack is a flag that specifies whether the user should get an
        acknowledgement of their being subscribed.  Default is to use the
        list's default flag value.

        admin_notif is a flag that specifies whether the list owner should get
        an acknowledgement of this subscription.  Default is to use the list's
        default flag value.
        R�RR�R�RiiR�s	 (digest)R�s%s: new%s %s, %ss&%(realname)s subscription notificationNtreplacesadminsubscribeack.txtRfRpR�(,RBR2R)R�R�R	R�R�R=RdR�R�R:R�R
R�R�R�taddNewMembertsetMemberOptionRtDisableMimetmime_is_default_digesttModerateR�RRCRtSendSubscribeAcktgetMemberPasswordRRatset_languageR�Retset_translationt
isinstancetUnicodeTypetencodeRcR�RtOwnerNotificationR�(R5R�tacktadmin_notifR�R�R�R6R�R�RR�tkindtotransR�R`R�((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyR��sf			


	
	
	
	cCs]t|�\}}|jdkr:|j||||�n|j|�tjtd��dS(Nis*unsubscriptions require moderator approval(RR�tApprovedDeleteMembertHoldUnsubscriptionR
R�Re(R5R6R�R�tuserackR�R�((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytDeleteMembers
	cCs)|dkr|j}n|dkr0|j}nt|�\}}|j|�}|j|�|rw|j||�ntj|j	�|r�|j
}td�}	tj
di|d6|j
d6d|�}
tj||	|
�}|j|�n|rd|}nd}tdd	|j�||�dS(
Ns%%(realname)s unsubscribe notificationsadminunsubscribeack.txtRpRfR�s; %sRR�s%s: deleted %s%s(R)R�R�RtgetMemberLanguagetremoveMembertSendUnsubscribeAckRR�RdR�ReR	R�RR�R�RRC(R5R6R�R�R�R�t	emailaddrtuserlangR�R`R�R�((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyR�s2
	

	
	cCs�|j||�|sdSx�tj�D]�}||j�krEq'nt|dd�}|j|jkroq'n|j|�s�q'n|j�z|j||�|j�Wd|j	�Xq'WdS(NR7i(
t
setMemberNameR	t
list_namesRCR RPR�R3R`RI(R5R\R6tgloballyRfR�((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytChangeMemberName8s 
c	Cs�tj|�}tj|�|rS|j|�rS||j|�krStj�n||j�j�krwtj	�n|j
}|j|�}|r�tdd||||�tj
|�n|jtj|||�}d|jddd�|f}|j|�}tjdi|d6|j�d	6|d
6|d6|jd�d
6dd6|j�d6|d6d|d|�}	tj||j|�d|	d|�}
|
d=|j||�|
d<|j|�|
d<|
j|�dS(NR�s0%s banned address change: %s -> %s (matched: %s)s%s/%sR�Rxis
verify.txtR�R�RfRZRWR�RR�R�R�R�R�R�R`R�sReply-To(R	R�R:R�tgetMemberCPAddressR
R�RkR~R�R�R�RR�R�RtCHANGE_OF_ADDRESSRyR�R�RRRVRR�R[RiR�(R5toldaddrtnewaddrR�R�R�RZR�R�R�R�((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytChangeMemberAddressLsJ
	




cCs�|j|�}|r$tj|�n|j|�rp|j|�|krp|j|�|kr�|j|�q�n|j||�|s�dSxtj�D]�}||j	�kr�q�nt
|dd�}|j|jkr�q�n|j|�s�q�n|j|�r	q�n|j�zj|j|�rb|j|�|krb|j|�|krr|j|�qrn|j||�|j
�Wd|j�Xq�WdS(NR7i(R�R
R�R�R�R�tchangeMemberAddressR	R�RCR RPR3R`RI(R5R�R�R�R�RfR�((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytApprovedChangeMemberAddress�s:		
cCs�|j|�}|dkr.tjd|�ny|d}|d}Wn$tk
rltjd|f�nX|tjkr�d}y]|d}t|t�r�||7}d}n|j	}|j
}	|j}
|j}|j
}Wn$tk
rtjd|f�nXt|dt�}
|
rO|
|j�kr�|j|
|�tj�q�nF|jdkr�|j||	|
||�|j}tjtd��n|j|d|�|||
||fS|tjkr|d}t|tj�r�d
}nd}|j|d|�||fS|tjkrP|\}}}|j|||�|||fS|tjkrR|d}d}t|tj�r�|jd|jd��}|s�y&t t!j"j#|dd��d}Wnt$k
r�d}nX|r�t%|j&dt'��}x�t'r�|j(�}|sPn|j)�s1qn|j*d�}|dkr�|| j)�j+�dks�|| j)�j+�dkr�||dj)�}q�nPqWq�q�n|dk	r|j,t-j.t-j/g|�t-j0kr�t-j1}q|j2||�tj3�n	t-j4}y|j5||�Wn!t6k
rGt7dd|�nX||fS|tj8kr�|d}|j9|t:j;�||fSds�t<d|��dS(NsNo cookie record for %siisop-less data %ssvia email confirmationsvia web confirmationsbad subscr data %sR�iis8subscriptions to %(name)s require administrator approvalR�semail confirmationsweb confirmationtApprovedtApproveR�tplaintdecodet:tapprovetapprovedR"s"Could not process HELD_MESSAGE: %ss
Bad op: %s(ii(=tpend_confirmR)R
tMMBadConfirmationRgRR�R�RR�R�RR�R�R=RvRCtSendHostileSubscriptionNoticetHostileSubscriptionErrorR�R�R�R�ReR�tUNSUBSCRIPTIONRR�R�R�tHELD_MESSAGER2tlistR�t	Iteratorsttyped_subpart_iteratort
IndexErrorRtget_payloadRttreadlineR�tfindR~tAuthenticateRt
AuthListAdmintAuthListModeratortUnAuthorizedtAPPROVEtpend_rependtMMBadPasswordErrortDISCARDt
HandleRequesttKeyErrorRt	RE_ENABLEtsetDeliveryStatusRtENABLEDR2(R5RZtcontexttrectopR!R�R�R\R�RR�R�R�R6R�R�R�RDR�tsubparttstlinetitactionRp((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytProcessConfirmation�s�



					

		
	




			



c
Csp|dkr|j|�}n|jtj|�}d|jddd�|f}|j}|dk	r�d|}td�}nd}d}tj	di|d	6|j
�d
6|d6|d6|jd
�d6|d6|j�d6|d6d|d|�}t
j||j|�d|d|�}	|	d=|j||�|	d<|j|�|	d<|	d=d|	d<|	j|�dS(Ns%s/%sR�RxiR�s from %(remote)sRs	unsub.txtR�R�RfRZRWR�R�R�R�R�R�R�R`R�sReply-Tosauto-submittedsauto-generatedsAuto-Submitted(R)R�R�RR�RyR�ReR	R�RkRRRVRR�R[RjR�(
R5R\R�R�RZR�R�R�R�R�((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytConfirmUnsubscription9s>
	





c
Cs`d|j�|jf}g}g}x-d	D]%}|jt|j|g���q,Wxz|D]r\}}|d
krzq\n|j�}|jd�d}||j�ks�||kr�tS|j	||f�q\Wd�}	|j
j�}
xo|D]g\}}xX|
D]P}|j�}|s"qnd|krA|	||�rAtS|	||�rtSqWq�Wt
S(stTrue if list name or any acceptable_alias is included among the
        addresses in the recipient headers.
        s%s@%sttotccs	resent-tos	resent-ccR]icSs`y tj||tj�rtSWn9tjk
r[tjtj|�|tj�r\tSnXtS(N(R6tmatcht
IGNORECASERtR"tescapeRv(R�R\((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytdomatchzs!(stoRs	resent-tos	resent-ccN(RCRPR#Rtget_allR)R~RnRtR�R�t
splitlinesR�Rv(
R5R�tlistfullnametrecipsRtheaderR�R\t	localpartRtaliasestaliaststripped((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytHasExplicitDest`s4
#	
cCsg}x�|jjd�D]�}|j�}|s|ddkrHqn|jd�}|dkr|tdd|j|�q|| }||dj�}ytj|tj	�}Wn/tj
k
r�}tdd|j||�qX|j|||f�qW|S(	s:Return a list of triples [(field name, regex, line), ...].s
it#R�tconfigs&bad bounce_matching_header line: %s
%sis=bad regexp in bounce_matching_header line: %s

%s (cause: %s)(R�RnR�R�RR�tlstripR6R�RR"R�(R5tallRRRR0tcreR;((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytparse_matching_header_opt�s$	
cCsTxM|j�D]?\}}}x-|j|g�D]}|j|�r/|Sq/Wq
WdS(s�Return true if named header field matches a regexp in the
        bounce_matching_header list variable.

        Returns constraint line which matches or empty string for no
        matches.
        i(R(Rtsearch(R5R�RR'RR0((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pythasMatchingHeader�s
c	Cs�|dkr|j}ntj|�tjdkr8dStj�d }|jj	|�}|dksv|d|kr�|df|j|<dS|\}}|dkr�t
dd|�dS|tjkrpt
dd|�|df|j|<tjdi|d	6d
|j
|jfd6|d6|j�d
6d|�}tj||j�td�|d|�}|j|�dS||df|j|<dS(sReturn true if Mailman should auto-respond to this sender.

        This is only consulted for messages sent to the -request address, or
        for posting hold notifications, and serves only as a safety value for
        mail loops with email 'bots.
        iiiR�s,-request/hold autoresponse discarded for: %ss,-request/hold autoresponse limit hit for: %si����snomoretoday.txtR�s%s@%sRftnumt
owneremailR�s(Last autoresponse notification for todayN(R)RdRR�RtMAX_AUTORESPONSES_PER_DAYR�t	localtimeRR2RR	R�R�RPRVRR�ReR�(	R5R�R�ttodayR�tdatetcountR�R�((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytautorespondToSender�sD
		
		
cCs�t}x�|jD]w}|jd�rey&tj||tj�rJt}PnWq�tjk
raq�Xq|j�|j�krt}PqqW|r�|SdSdS(s\Returns matched entry in ban_list if email matches.
        Otherwise returns None.
        t^N(
RvR
R�R6R)RRtR"R~R)(R5R�tbanR�((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyR��scCsT|j}tj|kr+|jtj�ng|D]}tjj|�r2|^q2S(N(R�RR�R�tLC_DESCRIPTIONSthas_key(R5R=R�((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pytGetAvailableLanguagess	N(4R%R&R)R!RARFR3RIRBRCR-RRRTRVR[RYRiRjRkRsRyR�R'R�R+R,R/R@R[R`RrRtR4RwRyR<R�R�R�R�R�R�R�R�RRR"R(R*R2R�R7(((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyR Wsf&		
											
		�			(	(		86	"		%,x	N	 		:	7|'	9	 	
1	(Ct__doc__tsysR*R�RbR0R6R�RBR|RFt	cStringIORRRttypestemail.IteratorsR�temail.UtilsRRRtemail.HeaderRtMailmanRR	R
RtMailman.UserDescRtMailman.ArchiverR
tMailman.AutoresponderRtMailman.BouncerRtMailman.DelivererRtMailman.DigesterRtMailman.GatewayManagerRtMailman.HTMLFormatterRtMailman.ListAdminRtMailman.SecurityManagerRtMailman.TopicMgrRRRRtMailman.OldStyleMembershipsRRRRtMailman.Logging.SyslogRRetEMPTYSTRINGRtRvt	NameErrorR (((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/MailList.pyt<module>sd
	



Zerion Mini Shell 1.0