%PDF- %PDF-
Mini Shell

Mini Shell

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

�
��ac@s�dZddlZddlmZmZddlmZddlmZddlmZddl	m
Z
ddlmZdd	l
mZd
�Zd�ZgZd�Zd
�Zd�Zd�Zd�ZdS(sRRoutines which rectify an old mailing list with current structure.

The MailList.CheckVersion() method looks for an old .data_version setting in
the loaded structure, and if found calls the Update() routine from this
module, supplying the list and the state last loaded from storage.  The state
is necessary to distinguish from default assignments done in the .InitVars()
methods, before .CheckVersion() is called.

For new versions you should add sections to the UpdateOldVars() and the
UpdateOldUsers() sections, to preserve the sense of settings across structural
changes.  Note that the routines have only one pass - when .CheckVersions()
finds a version change it runs this routine and then updates the data_version
number of the list, and then does a .Save(), so the transformations won't be
run again until another version change is detected.
i����N(tListTypet
StringType(tmm_cfg(tUtils(tMessage(t_BounceInfo(tUNKNOWN(tsyslogcCsCt|�t|�t|�t||�t|�t|�dS(sHDispose of old vars and user options, mapping to new ones when suitable.N(t
ZapOldVarstUpdateOldUserstNewVarst
UpdateOldVarstCanonicalizeUserOptionstNewRequestsDatabase(tltstored_state((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/versions.pytUpdate1s




c
Cs4x-dD]%}t||�rt||�qqWdS(Nt
num_spawnstfilter_progtclobber_datetpublic_archive_file_dirtprivate_archive_file_dirtarchive_directorytminimum_removal_datet'minimum_post_count_before_bounce_actiontautomatic_bounce_actiontmax_posts_between_bounces(
RRRRRRRRRR(thasattrtdelattr(tmlisttname((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/versions.pyR<s
cCs�t||d�}t|d�rUt|d�}t|d�sL||_n|`nt|d�sstj|_nt|d�s�g|_nt|d�s�g|_	nt|d�s�g|_
nt|d�s�g|_nt|d	�s�tj|_
nt|d
�stj|_nt|d�r|jr�x3|jD](}|j|�s=|jj|�q=q=Wx3|j�D]%}|j|tj||jk�qvWd|_d|_nJ|jr5x3|jD](}|j|�s�|jj|�q�q�Wx*|j�D]}|j|tjd
�qWd|_d
|_n�|js�x*|j�D]}|j|tjd
�qKWd
|_d
|_n~x3|jD](}|j|�s�|jj|�q�q�Wx3|j�D]%}|j|tj||jk�q�Wd|_d|_|`|`|`nt|d�r}|j}xF|D]>}|j|�r`|j|tjd�q2|j	j|�q2W|`n|ddtj�|dd�|dd�|dd�|dd�|dd�t|d�r#|jr
tjr�d
|_qd|_n	d|_t|d�nt|d�sHt|dtj�nt|d�smt|dtj �nt|d�r�|j!r�|jr�d|_q�n|jr�d
|_nt|d�n$|j"dkr�|jr�d
|_nt#|j$�t%kr+i}x|j$D]}d||<qW||_$nt#|j&�t%krpi}	x|j&D]}
d|	|
<qPW|	|_&nt|d�s�t|dtj'�nx�|j$j(�D]�}|j)�|kr�t*j+|�|j$|j)�<|j$|=q�t#|j$|�t,kr||j$|j)�krq�d
|j$|<q�Wx�|j&j(�D]�}|j)�|kr}t*j+|�|j&|j)�<|j&|=q<t#|j&|�t,kr�||j&|j)�kr�q<d
|j&|<q<W|d d!tj-�d"S(#s�Transform old variable values into new ones, deleting old ones.
    stored_state is last snapshot from file, as opposed to from InitVars().cSs}t||�rJ|j|�s:t||t||��nt||�nt||�ry|tk	ryt|||�ndS(s&Use specified old value if new value is not in stored state.

        If the old attr does not exist, and no newdefault is specified, the
        new attr is *not* created - so either specify a default or be positive
        that the old attr exists - or don't depend on the new attr.

        N(Rthas_keytsetattrtgetattrRt	uniqueval(toldnametnewnamet
newdefaultRtstate((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/versions.pytPreferStoredPs	tdont_respond_to_post_requeststrespond_to_post_requeststdefault_member_moderationtaccept_these_nonmembersthold_these_nonmemberstreject_these_nonmemberstdiscard_these_nonmemberstforward_auto_discardstgeneric_nonmember_actiont	moderatediitforbidden_posterstreminders_to_adminst
umbrella_listtauto_subscribetopen_subscribetclosedtprivate_rostert!mimimum_post_count_before_removalt'mimimum_post_count_before_bounce_actiontbad_posterstautomatically_removeRit
administriviatadmin_member_chunksizetposters_includes_membersi
tadmin_notify_mchangestauthor_is_listtfrom_is_listN(.R"RR!R)R(Rt!DEFAULT_DEFAULT_MEMBER_MODERATIONR*R+R,R-R.tDEFAULT_FORWARD_AUTO_DISCARDSR/t DEFAULT_GENERIC_NONMEMBER_ACTIONR0R1tposterstisMembertappendt
getMemberstsetMemberOptiontModeratetmember_posting_onlyR2tDEFAULT_UMBRELLA_LISTR6tALLOW_OPEN_SUBSCRIBEtsubscribe_policyRR tDEFAULT_ADMINISTRIVIAtDEFAULT_ADMIN_MEMBER_CHUNKSIZER?tdata_versionttypetmembersRtdigest_memberstDEFAULT_ADMIN_NOTIFY_MCHANGEStkeystlowerRtLCDomainRtDEFAULT_FROM_IS_LIST(RRR'toldvaltaddrtmembert
forbiddensRTtmtdmemberstdmtk((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/versions.pyRLs�
	9										
		




				
				

2
	cCs�|d�}|dd�|dd�|dd�|dd�|dd�|d	d�|d
d�|di�|d
i�|dd�|dtj�|dg�|dtj�|dd�|ddI�|ddI�|dg�|dg�|dd�|dd�|di�|di�|dd�|dtj�|dtj�|dtj�|d d!�|d"d!�|d#d!�|d$tj�|d%tj�|d&tj	�|d'tj
�|d(tj�|d)tj�|d*tj
�|d+g�|d,tj�|d-tj�|d.tj�|d/tj�|d0tj�|d1i�|d2d�|d3d�|d4tj�|d5tj�|d6d�|d7tj�|d8d�|d9i�|d:d!�tj|j�d;kr
d}nd<}|d=|�|d>d�|d?g�|d@d�|dAtj�|dBg�|dCd�|dDd�|dEtj�|dFtj�|dGtj�|dHtj�dIS(Js9Add defaults for these new variables if they don't exist.cSs&t||�s"t|||�ndS(N(RR (tattrtinitvalR((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/versions.pytadd_only_if_missingDstautorespond_postingsitautorespond_admintautorespond_requeststautoresponse_postings_textttautoresponse_admin_texttautoresponse_request_texttautoresponse_graceperiodiZtpostings_responsestadmin_responsestreply_goes_to_listtpreferred_languagetavailable_languagestdigest_volume_frequencytdigest_last_sent_attmod_passwordt
post_passwordt	moderatorttopicsttopics_enabledttopics_bodylines_limititone_last_digestt	usernamestpersonalizetfirst_strip_reply_totunsubscribe_policytsend_goodbye_msgtinclude_rfc2369_headersitinclude_list_post_headertinclude_sender_headertbounce_score_thresholdtbounce_info_stale_aftert bounce_you_are_disabled_warningst)bounce_you_are_disabled_warnings_intervalt&bounce_unrecognized_goes_to_list_ownertbounce_notify_owner_on_disabletbounce_notify_owner_on_removaltban_listtfilter_mime_typestpass_mime_typestfilter_contenttconvert_html_to_plaintextt
filter_actiontdelivery_statustmember_moderation_actiontmember_moderation_noticetdmarc_moderation_actiont"dmarc_quarantine_moderation_actiontdmarc_moderation_noticetnew_member_optionst	emergencythold_and_cmd_autoresponsestnews_prefix_subject_toosus-asciiitencode_ascii_prefixestnews_moderationtheader_filter_rulestscrub_nondigesttfilter_filename_extensionstpass_filename_extensionstmax_days_to_holdtnonmember_rejection_noticetcollapse_alternativestregular_exclude_liststregular_include_liststregular_exclude_ignoreN(RtDEFAULT_SERVER_LANGUAGEtDEFAULT_DIGEST_VOLUME_FREQUENCYtNonetDEFAULT_FIRST_STRIP_REPLY_TOtDEFAULT_UNSUBSCRIBE_POLICYtDEFAULT_SEND_GOODBYE_MSGtDEFAULT_BOUNCE_SCORE_THRESHOLDtDEFAULT_BOUNCE_INFO_STALE_AFTERt(DEFAULT_BOUNCE_YOU_ARE_DISABLED_WARNINGSt1DEFAULT_BOUNCE_YOU_ARE_DISABLED_WARNINGS_INTERVALt.DEFAULT_BOUNCE_UNRECOGNIZED_GOES_TO_LIST_OWNERt&DEFAULT_BOUNCE_NOTIFY_OWNER_ON_DISABLEt&DEFAULT_BOUNCE_NOTIFY_OWNER_ON_REMOVALtDEFAULT_FILTER_MIME_TYPEStDEFAULT_PASS_MIME_TYPEStDEFAULT_FILTER_CONTENTt!DEFAULT_CONVERT_HTML_TO_PLAINTEXTtDEFAULT_FILTER_ACTIONtDEFAULT_DMARC_MODERATION_ACTIONt*DEFAULT_DMARC_QUARANTINE_MODERATION_ACTIONtDEFAULT_NEW_MEMBER_OPTIONSRt
GetCharSetRqt"DEFAULT_FILTER_FILENAME_EXTENSIONStDEFAULT_COLLAPSE_ALTERNATIVEStDEFAULT_REGULAR_EXCLUDE_LISTStDEFAULT_REGULAR_INCLUDE_LISTStDEFAULT_REGULAR_EXCLUDE_IGNORE(RRetencode((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/versions.pyR
Bs�













































	










cCs�i}x-|jj�D]\}}|||j�<qW||_xM|jj�D]<}|j|�s~t|j|�t�rO|j|=qOqOWdS(s(Transform sense of changed user options.N(	t	passwordstitemsRXtbounce_infoRWRGt
isinstancet
getBounceInfoR(RR�RbtvR_((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/versions.pyR	�s	
cCs)t|dd�dkrdSi}xq|jj�D]`\}}|dkrPq2n|j�}d}|j|�r~||}n||O}|||<q2W||_xz|jj�D]i\}}|j|�s�|j|=q�n|j|tj	�r�|j
|t�|j|tj	d�q�q�Wd|_
dS(sFix up the user options.tuseropts_versioniNi(R!tuser_optionsR�R�RXRRGtgetMemberOptionRtDisableDeliverytsetDeliveryStatusRRJR�(RtoptionsRbR�tlcusertflags((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/versions.pyR�s*

	
c
Cst|di�}|sdSx�|j�D]�\}}|dkr�xM|D]E}|d\}}|d}tj|tj�}|j||�qHW||=q)|dkr�x9|D]1\}	}	}
}}|j|d||
tj�q�W||=q)t	dd	||j
��q)WdS(
s?With version 1.2, we use a new pending request database schema.trequestsNtpostiit
add_memberRjterrorsDVERY BAD NEWS.  Unknown pending request type `%s' found for list: %s(R!R�temailtmessage_from_stringRtHoldMessagetHoldSubscriptionRR�Rt
internal_name(
RtrRbR�tptauthorttexttreasontmsgtigntdigestR\tpassword((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/versions.pyR
�s&





(t__doc__R�ttypesRRtMailmanRRRtMailman.BouncerRtMailman.MemberAdaptorRtMailman.Logging.SyslogRRRR"RR
R	RR
(((s^/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/Mailman/versions.pyt<module>!s 			�	n		$

Zerion Mini Shell 1.0