mailman
2.1.39
About: Mailman 2 - The GNU Mailing List Management System.
![]() ![]() |
Classes | |
class | OuterExit |
Functions | |
def | list_exists (listname) |
def | list_names () |
def | wrap (text, column=70, honor_leading_ws=True) |
def | QuotePeriods (text) |
def | ParseEmail (email) |
def | LCDomain (addr) |
def | ValidateEmail (s) |
def | GetPathPieces (envar='PATH_INFO') |
def | GetRequestMethod () |
def | ScriptURL (target, web_page_url=None, absolute=False) |
def | GetPossibleMatchingAddrs (name) |
def | List2Dict (L, foldcase=False) |
def | UserFriendly_MakeRandomPassword (length) |
def | Secure_MakeRandomPassword (length) |
def | MakeRandomPassword (length=mm_cfg.MEMBER_PASSWORD_LENGTH) |
def | GetRandomSeed () |
def | set_global_password (pw, siteadmin=True) |
def | get_global_password (siteadmin=True) |
def | check_global_password (response, siteadmin=True) |
def | websafe (s, doubleescape=False) |
def | nntpsplit (s) |
def | ObscureEmail (addr, for_text=False) |
def | UnobscureEmail (addr) |
def | findtext (templatefile, dict=None, raw=False, lang=None, mlist=None) |
def | maketext (templatefile, dict=None, raw=False, lang=None, mlist=None) |
def | is_administrivia (msg) |
def | GetRequestURI (fallback=None, escape=True) |
def | reap (kids, func=None, once=False) |
def | GetLanguageDescr (lang) |
def | GetCharSet (lang) |
def | GetDirection (lang) |
def | IsLanguage (lang) |
def | get_domain () |
def | get_site_email (hostname=None, extra=None) |
def | unique_message_id (mlist) |
def | midnight (date=None) |
def | to_dollar (s) |
def | to_percent (s) |
def | dollar_identifiers (s) |
def | percent_identifiers (s) |
def | canonstr (s, lang=None) |
def | uncanonstr (s, lang=None) |
def | uquote (s) |
def | oneline (s, cset) |
def | strip_verbose_pattern (pattern) |
Variables | |
string | _lower = 'abcdefghijklmnopqrstuvwxyz' |
string | ascii_letters = _lower + _lower.upper() |
md5_new = hashlib.md5 | |
sha_new = hashlib.sha1 | |
int | True = 1 |
int | False = 0 |
bool | dns_resolver = True |
bool | have_ipaddress = True |
string | EMPTYSTRING = '' |
string | UEMPTYSTRING = u'' |
string | CR = '\r' |
string | NL = '\n' |
string | DOT = '.' |
string | IDENTCHARS = ascii_letters + digits + '_' |
cre = re.compile(r'%\(([_a-z]\w*?)\)s?', re.IGNORECASE) | |
dre = re.compile(r'(\${2})|\$([_a-z]\w*)|\${([_a-z]\w*)}', re.IGNORECASE) | |
_badchars = re.compile(r'[][()<>|:;^,\\"\000-\037\177-\377]') | |
_valid_domain = re.compile('[-a-z0-9]', re.IGNORECASE) | |
CRNLpat = re.compile(r'[^\x21-\x7e]') | |
tuple | _vowels = ('a', 'e', 'i', 'o', 'u') |
tuple | _consonants |
list | _syllables = [] |
_ampre = re.compile('&((?:#[0-9]+|[a-z]+);)', re.IGNORECASE) | |
dictionary | ADMINDATA |
int | _serial = 0 |
def Mailman.Utils.canonstr | ( | s, | |
lang = None |
|||
) |
Definition at line 890 of file Utils.py.
References Mailman.Utils.GetCharSet().
def Mailman.Utils.check_global_password | ( | response, | |
siteadmin = True |
|||
) |
Definition at line 483 of file Utils.py.
References Mailman.Utils.get_global_password(), and Mailman.Utils.sha_new.
def Mailman.Utils.dollar_identifiers | ( | s | ) |
def Mailman.Utils.findtext | ( | templatefile, | |
dict = None , |
|||
raw = False , |
|||
lang = None , |
|||
mlist = None |
|||
) |
Definition at line 549 of file Utils.py.
Referenced by Mailman.Utils.maketext().
def Mailman.Utils.get_domain | ( | ) |
Definition at line 785 of file Utils.py.
References Mailman.Utils.websafe().
Referenced by Mailman.Utils.get_site_email(), Mailman.Utils.GetPathPieces(), and Mailman.Utils.ScriptURL().
def Mailman.Utils.get_global_password | ( | siteadmin = True | ) |
Definition at line 467 of file Utils.py.
Referenced by Mailman.Utils.check_global_password().
def Mailman.Utils.get_site_email | ( | hostname = None , |
|
extra = None |
|||
) |
Definition at line 802 of file Utils.py.
References Mailman.Utils.get_domain().
def Mailman.Utils.GetCharSet | ( | lang | ) |
Definition at line 774 of file Utils.py.
Referenced by Mailman.Utils.canonstr(), and Mailman.Utils.uncanonstr().
def Mailman.Utils.GetPathPieces | ( | envar = 'PATH_INFO' | ) |
Definition at line 280 of file Utils.py.
References Mailman.Utils.get_domain(), Mailman.Utils.list_names(), and Mailman.Logging.Syslog.syslog.
def Mailman.Utils.GetPossibleMatchingAddrs | ( | name | ) |
returns a sorted list of addresses that could possibly match a given name. For Example, given scott@pobox.com, return ['scott@pobox.com'], given scott@blackbox.pobox.com return ['scott@blackbox.pobox.com', 'scott@pobox.com']
Definition at line 348 of file Utils.py.
References Mailman.Utils.ParseEmail().
def Mailman.Utils.GetRequestURI | ( | fallback = None , |
|
escape = True |
|||
) |
Return the full virtual path this CGI script was invoked with. Newer web servers seems to supply this info in the REQUEST_URI environment variable -- which isn't part of the CGI/1.1 spec. Thus, if REQUEST_URI isn't available, we concatenate SCRIPT_NAME and PATH_INFO, both of which are part of CGI/1.1. Optional argument `fallback' (default `None') is returned if both of the above methods fail. The url will be cgi escaped to prevent cross-site scripting attacks, unless `escape' is set to 0.
Definition at line 722 of file Utils.py.
References Mailman.Utils.websafe().
def Mailman.Utils.List2Dict | ( | L, | |
foldcase = False |
|||
) |
def Mailman.Utils.list_exists | ( | listname | ) |
Return true iff list `listname' exists.
Definition at line 103 of file Utils.py.
References Mailman.Logging.Syslog.syslog.
Referenced by Mailman.Site.get_listnames().
def Mailman.Utils.list_names | ( | ) |
Return the names of all lists in default list directory.
Definition at line 129 of file Utils.py.
Referenced by Mailman.Utils.GetPathPieces().
def Mailman.Utils.MakeRandomPassword | ( | length = mm_cfg.MEMBER_PASSWORD_LENGTH | ) |
Definition at line 432 of file Utils.py.
References Mailman.Utils.Secure_MakeRandomPassword(), and Mailman.Utils.UserFriendly_MakeRandomPassword().
def Mailman.Utils.maketext | ( | templatefile, | |
dict = None , |
|||
raw = False , |
|||
lang = None , |
|||
mlist = None |
|||
) |
Definition at line 660 of file Utils.py.
References Mailman.Utils.findtext().
def Mailman.Utils.ObscureEmail | ( | addr, | |
for_text = False |
|||
) |
def Mailman.Utils.oneline | ( | s, | |
cset | |||
) |
Definition at line 970 of file Utils.py.
Referenced by Mailman.Handlers.MimeDel.get_file_ext().
def Mailman.Utils.ParseEmail | ( | ) |
Definition at line 219 of file Utils.py.
Referenced by Mailman.Utils.GetPossibleMatchingAddrs(), Mailman.Utils.strip_verbose_pattern(), and Mailman.Utils.ValidateEmail().
def Mailman.Utils.percent_identifiers | ( | s | ) |
def Mailman.Utils.ScriptURL | ( | target, | |
web_page_url = None , |
|||
absolute = False |
|||
) |
target - scriptname only, nothing extra web_page_url - the list's configvar of the same name absolute - a flag which if set, generates an absolute url
Definition at line 319 of file Utils.py.
References Mailman.Utils.get_domain().
def Mailman.Utils.Secure_MakeRandomPassword | ( | length | ) |
Definition at line 399 of file Utils.py.
References Mailman.Logging.Syslog.syslog, and Mailman.Utils.UserFriendly_MakeRandomPassword().
Referenced by Mailman.Utils.MakeRandomPassword().
def Mailman.Utils.set_global_password | ( | pw, | |
siteadmin = True |
|||
) |
Definition at line 452 of file Utils.py.
References Mailman.Utils.sha_new.
def Mailman.Utils.strip_verbose_pattern | ( | pattern | ) |
Definition at line 982 of file Utils.py.
References Mailman.Utils.ParseEmail(), Mailman.Logging.Syslog.syslog, and Mailman.Utils.websafe().
def Mailman.Utils.to_dollar | ( | s | ) |
def Mailman.Utils.to_percent | ( | s | ) |
def Mailman.Utils.uncanonstr | ( | s, | |
lang = None |
|||
) |
Definition at line 937 of file Utils.py.
References Mailman.Utils.GetCharSet(), and Mailman.Utils.uquote().
def Mailman.Utils.unique_message_id | ( | mlist | ) |
Definition at line 819 of file Utils.py.
Referenced by Mailman.Handlers.Cleanse.process().
def Mailman.Utils.UnobscureEmail | ( | addr | ) |
Invert ObscureEmail() conversion.
Definition at line 538 of file Utils.py.
Referenced by Mailman.CSRFcheck.csrf_check(), and Mailman.CSRFcheck.csrf_token().
def Mailman.Utils.uquote | ( | s | ) |
Definition at line 958 of file Utils.py.
Referenced by Mailman.Utils.uncanonstr().
def Mailman.Utils.UserFriendly_MakeRandomPassword | ( | length | ) |
Definition at line 392 of file Utils.py.
Referenced by Mailman.Utils.MakeRandomPassword(), and Mailman.Utils.Secure_MakeRandomPassword().
def Mailman.Utils.ValidateEmail | ( | s | ) |
Verify that an email address isn't grossly evil.
Definition at line 247 of file Utils.py.
References Mailman.Utils.ParseEmail().
def Mailman.Utils.websafe | ( | s, | |
doubleescape = False |
|||
) |
Definition at line 492 of file Utils.py.
Referenced by Mailman.Utils.get_domain(), Mailman.Utils.GetRequestURI(), and Mailman.Utils.strip_verbose_pattern().
def Mailman.Utils.wrap | ( | text, | |
column = 70 , |
|||
honor_leading_ws = True |
|||
) |
Wrap and fill the text to the specified column. Wrapping is always in effect, although if it is not possible to wrap a line (because some word is longer than `column' characters) the line is broken at the next available whitespace boundary. Paragraphs are also always filled, unless honor_leading_ws is true and the line begins with whitespace. This is the algorithm that the Python FAQ wizard uses, and seems like a good compromise.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
dictionary Mailman.Utils.ADMINDATA |
string Mailman.Utils.ascii_letters = _lower + _lower.upper() |
Mailman.Utils.cre = re.compile(r'%\(([_a-z]\w*?)\)s?', re.IGNORECASE) |
Mailman.Utils.dre = re.compile(r'(\${2})|\$([_a-z]\w*)|\${([_a-z]\w*)}', re.IGNORECASE) |
string Mailman.Utils.IDENTCHARS = ascii_letters + digits + '_' |
Mailman.Utils.md5_new = hashlib.md5 |
Definition at line 61 of file Utils.py.
Referenced by Mailman.SecurityManager.SecurityManager.Authenticate().
Mailman.Utils.sha_new = hashlib.sha1 |
Definition at line 62 of file Utils.py.
Referenced by Mailman.SecurityManager.SecurityManager.__checkone(), Mailman.LockFile._seed(), Mailman.SecurityManager.SecurityManager.Authenticate(), Mailman.Handlers.Scrubber.calculate_attachments_dir(), Mailman.Cgi.admin.change_options(), Mailman.Utils.check_global_password(), Mailman.CSRFcheck.csrf_check(), Mailman.CSRFcheck.csrf_token(), Mailman.Queue.Switchboard.Switchboard.enqueue(), Mailman.SecurityManager.SecurityManager.MakeCookie(), Mailman.Pending.Pending.pend_new(), Mailman.Cgi.create.process_request(), and Mailman.Utils.set_global_password().