;ς
’)?Bc           @   sΓ   d  Z  d k Z d k Z d k Z d k Z d k Z d k l Z d k l Z d k l	 Z	 d k l
 Z
 d k l Z d k Td k l Z e i Z e i e i  d	   Z d
   Z e d  Z d S(   s,   Remove/delete mailing lists through the web.N(   s   mm_cfg(   s   Utils(   s   MailList(   s   Errors(   s   i18n(   s   *(   s   syslogc       
   C   s£  t    } | i t i  t i   } t i	   } | o t d  }  | i |   | i t d t t |  d d d d    | i d  | i t    | i   GHt d d	 |  d  Sn | d
 i   } y t i | d d
 } Wn­ t i j
 o } t i |  } t d  }  | i |   | i t d t t |  d d d d    | i d  | i t    | i   GHt d d | |  d  Sn Xt i | i  | i | i  t i  o} t d  }  | i |   | i t d t t |  d d d d    | i | i!    | i   GHt d d |  d  Sn | i" d  o# t# | | |  | i   GHd  Sn t$ | |  | i | i!    | i   GHd  S(   Ns   Bad URL specificationi   s   colors   #ff0000s   sizes   +2s   <hr>s   errors   Bad URL specification: %si    s   locks&   No such list <em>%(safelistname)s</em>s   No such list "%s": %s
s!   You're being a sneaky list owner!s   mischiefs%   Attempt to sneakily delete a list: %ss   doit(%   s   Documents   docs   set_languages   mm_cfgs   DEFAULT_SERVER_LANGUAGEs   cgis   FieldStorages   cgidatas   Utilss   GetPathPiecess   partss   _s   titles   SetTitles   AddItems   Headers   Bolds   FontAttrs   MailmanLogos   Formats   syslogs   lowers   listnames   MailLists   mlists   Errorss   MMListErrors   es   websafes   safelistnames   i18ns   preferred_languages!   OWNERS_CAN_DELETE_THEIR_OWN_LISTSs   GetMailmanFooters   has_keys   process_requests   request_deletion(   s   titles   safelistnames   partss   cgidatas   mlists   listnames   es   doc(    (    s"   /var/mailman/Mailman/Cgi/rmlist.pys   main'   sX    	."	.c         C   s  | i d d  i   } y t | i d d   } Wn t j
 o d } n X| i t	 i
 t	 i t	 i f |  t	 i j o t |  | t d   d  Sn t	 i o5 d t	 i }
 t |
  t i |
 i | d d	 n d
 g } | o | i d d d d g  n d } | i   }	 x$| D]} t i i t	 i  | |	  } t i i" |  oj y t i# |  Wq=t$ j
 oF } | i& t& i' t& i( f j o   n | d	 7} t) d d |  q=Xq!t i i* |  oj y t+ i, |  Wq=t$ j
 oF } | i& t& i' t& i( f j o   n | d	 7} t) d d |  q=Xq!q!Wt d  } |  i. |  t/ d d d d  } | i1 t2 t3 t4 | d d   g  | i5 | i6   d d t	 i7 | o | i1 t d  g  n) t8 i9 | i:  } | i1 t d  g  |  i< |  |  i< d  |  i< t d  t= t8 i> d  t d   i?    |  i< t d  t= t8 i> d   t d!   i?    |  i< t@    d  S("   Ns   passwords    s   delarchivess   0i    s2   You are not authorized to delete this mailing lists   Mailman.MTA.s   cgii   s   lists/%ss   archives/private/%ss   archives/private/%s.mboxs   archives/public/%ss   archives/public/%s.mboxs   errors.   link %s not deleted due to permission problemss3   directory %s not deleted due to permission problemss   Mailing list deletion resultss   borders   widths   100%s   sizes   +1s   bgcolorsG   You have successfully deleted the mailing list
    <b>%(listname)s</b>.s   There were some problems deleting the mailing list
        <b>%(listname)s</b>.  Contact your site administrator at %(sitelist)s
        for details.s   <hr>s   Return to the s   listinfos   general list overviews   <br>Return to the s   admins   administrative list overview(A   s   cgidatas   getvalues   strips   passwords   ints   delarchivess
   ValueErrors   mlists   Authenticates   mm_cfgs   AuthCreators   AuthListAdmins   AuthSiteAdmins   UnAuthorizeds   request_deletions   docs   _s   MTAs   modnames
   __import__s   syss   moduless   removes
   REMOVABLESs   extends   problemss   internal_names   listnames   dirtmpls   oss   paths   joins
   VAR_PREFIXs   dirs   islinks   unlinks   OSErrors   es   errnos   EACCESs   EPERMs   syslogs   isdirs   shutils   rmtrees   titles   SetTitles   Tables   tables   AddRows   Centers   Bolds   FontAttrs   AddCellInfos   GetCurrentRowIndexs   WEB_HEADER_COLORs   Utilss   get_site_emails	   host_names   sitelists   AddItems   Links	   ScriptURLs   Formats   MailmanLogo(   s   docs   cgidatas   mlists
   REMOVABLESs   tables   titles   sitelists   problemss   passwords   listnames   modnames   es   delarchivess   dirs   dirtmpl(    (    s"   /var/mailman/Mailman/Cgi/rmlist.pys   process_requestf   sv    	

	  
 
(c   	      C   sΛ  | i } t d  } |  i |  t d d d d  } | i	 t
 t t | d d   g  | i | i   d d t i | oQ | i	 t d	 t t t d
  d d d d i   t |  i     g  n | i	 t d  g  t i } t | i d   } t d d d d d d d d	 d d  } | i	 t t d   t d  g  | i | i   d d | | i | i   d d | | i	 t t d   t d t d  t d  f d d d d d f g  | i | i   d d | | i | i   d d | | i	 t
 t | i d  t d    g  | i | i   d d  d! | i	 t
 t d" t d#    g  | i | i   d d  d! | i  |  | i	 | g  |  i  |  d  S($   Ns5   Permanently remove mailing list <em>%(realname)s</em>s   borderi    s   widths   100%s   sizes   +1s   bgcolori   s   Error: s   colors   #ff0000s   +2s,  This page allows you as the list owner, to permanent
    remove this mailing list from the system.  <strong>This action is not
    undoable</strong> so you should undertake it only if you are absolutely
    sure this mailing list has served its purpose and is no longer necessary.

    <p>Note that no warning will be sent to your list members and after this
    action, any subsequent messages sent to the mailing list, or any of its
    administrative addreses will bounce.

    <p>You also have the option of removing the archives for this mailing list
    at this time.  It is almost always recommended that you do
    <strong>not</strong> remove the archives, since they serve as the
    historical record of your mailing list.

    <p>For your safety, you will be asked to reconfirm the list password.
    s   rmlists   colss   2s   cellspacings   cellpaddingi   s   List password:s   passwordi   s   Also delete archives?s   delarchivess   Nos   Yess   checkeds   valuess   admins/   <b>Cancel</b> and return to list administrations   colspani   s   doits   Delete this list(!   s   mlists	   real_names   realnames   _s   titles   docs   SetTitles   Tables   tables   AddRows   Centers   Bolds   FontAttrs   AddCellInfos   GetCurrentRowIndexs   mm_cfgs   WEB_HEADER_COLORs   errmsgs   Headers   Formats   Italics   WEB_ADMINITEM_COLORs   GREYs   Forms   GetScriptURLs   forms   ftables   Labels   PasswordBoxs   RadioButtonArrays   Links   SubmitButtons   AddItem(	   s   docs   mlists   errmsgs   tables   titles   GREYs   realnames   forms   ftable(    (    s"   /var/mailman/Mailman/Cgi/rmlist.pys   request_deletionΊ   s:    	(Q	%0%(   s   __doc__s   oss   cgis   syss   errnos   shutils   Mailmans   mm_cfgs   Utilss   MailLists   Errorss   i18ns   Mailman.htmlformats   Mailman.Logging.Syslogs   syslogs   _s   set_languages   DEFAULT_SERVER_LANGUAGEs   mains   process_requests   Nones   request_deletion(   s   cgis   mains   Errorss   process_requests   errnos   Utilss   MailLists   syss   syslogs   mm_cfgs   request_deletions   i18ns   shutils   oss   _(    (    s"   /var/mailman/Mailman/Cgi/rmlist.pys   ?   s"   							?	T