Fred Drake | 295da24 | 1998-08-10 19:42:37 +0000 | [diff] [blame] | 1 | \section{\module{rfc822} --- |
| 2 | Parse RFC 822 mail headers.} |
Fred Drake | b91e934 | 1998-07-23 17:59:49 +0000 | [diff] [blame] | 3 | \declaremodule{standard}{rfc822} |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 4 | |
Fred Drake | b91e934 | 1998-07-23 17:59:49 +0000 | [diff] [blame] | 5 | \modulesynopsis{Parse \rfc{822} style mail headers.} |
| 6 | |
Fred Drake | cdea8a3 | 1998-03-14 06:17:43 +0000 | [diff] [blame] | 7 | This module defines a class, \class{Message}, which represents a |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 8 | collection of ``email headers'' as defined by the Internet standard |
Fred Drake | c589124 | 1998-02-09 19:16:20 +0000 | [diff] [blame] | 9 | \rfc{822}. It is used in various contexts, usually to read such |
Guido van Rossum | 8729483 | 1998-06-16 22:27:40 +0000 | [diff] [blame] | 10 | headers from a file. This module also defines a helper class |
| 11 | \class{AddressList} for parsing RFC822 addresses. |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 12 | |
Fred Drake | 5ca9033 | 1997-12-16 15:19:47 +0000 | [diff] [blame] | 13 | Note that there's a separate module to read \UNIX{}, MH, and MMDF |
Fred Drake | cdea8a3 | 1998-03-14 06:17:43 +0000 | [diff] [blame] | 14 | style mailbox files: \module{mailbox}\refstmodindex{mailbox}. |
Guido van Rossum | 067a2ac | 1997-06-02 17:30:03 +0000 | [diff] [blame] | 15 | |
Fred Drake | cdea8a3 | 1998-03-14 06:17:43 +0000 | [diff] [blame] | 16 | \begin{classdesc}{Message}{file\optional{, seekable}} |
Guido van Rossum | 1299100 | 1998-06-10 21:34:27 +0000 | [diff] [blame] | 17 | A \class{Message} instance is instantiated with an input object as |
| 18 | parameter. Message relies only on the input object having a |
Fred Drake | 23329d4 | 1998-08-10 17:46:22 +0000 | [diff] [blame] | 19 | \method{readline()} method; in particular, ordinary file objects |
| 20 | qualify. Instantiation reads headers from the input object up to a |
| 21 | delimiter line (normally a blank line) and stores them in the |
| 22 | instance. |
Guido van Rossum | 1299100 | 1998-06-10 21:34:27 +0000 | [diff] [blame] | 23 | |
Fred Drake | 23329d4 | 1998-08-10 17:46:22 +0000 | [diff] [blame] | 24 | This class can work with any input object that supports a |
| 25 | \method{readline()} method. If the input object has seek and tell |
| 26 | capability, the \method{rewindbody()} method will work; also, illegal |
| 27 | lines will be pushed back onto the input stream. If the input object |
| 28 | lacks seek but has an \method{unread()} method that can push back a |
| 29 | line of input, \class{Message} will use that to push back illegal |
| 30 | lines. Thus this class can be used to parse messages coming from a |
| 31 | buffered stream. |
Guido van Rossum | 1299100 | 1998-06-10 21:34:27 +0000 | [diff] [blame] | 32 | |
Fred Drake | 23329d4 | 1998-08-10 17:46:22 +0000 | [diff] [blame] | 33 | The optional \var{seekable} argument is provided as a workaround for |
| 34 | certain stdio libraries in which \cfunction{tell()} discards buffered |
| 35 | data before discovering that the \cfunction{lseek()} system call |
| 36 | doesn't work. For maximum portability, you should set the seekable |
| 37 | argument to zero to prevent that initial \method{tell()} when passing |
| 38 | in an unseekable object such as a a file object created from a socket |
| 39 | object. |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 40 | |
| 41 | Input lines as read from the file may either be terminated by CR-LF or |
| 42 | by a single linefeed; a terminating CR-LF is replaced by a single |
| 43 | linefeed before the line is stored. |
| 44 | |
| 45 | All header matching is done independent of upper or lower case; |
Fred Drake | 23329d4 | 1998-08-10 17:46:22 +0000 | [diff] [blame] | 46 | e.g.\ \code{\var{m}['From']}, \code{\var{m}['from']} and |
Fred Drake | cdea8a3 | 1998-03-14 06:17:43 +0000 | [diff] [blame] | 47 | \code{\var{m}['FROM']} all yield the same result. |
| 48 | \end{classdesc} |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 49 | |
Guido van Rossum | 8729483 | 1998-06-16 22:27:40 +0000 | [diff] [blame] | 50 | \begin{classdesc}{AddressList}{field} |
| 51 | You may instantiate the AddresssList helper class using a single |
Fred Drake | 23329d4 | 1998-08-10 17:46:22 +0000 | [diff] [blame] | 52 | string parameter, a comma-separated list of \rfc{822} addresses to be |
| 53 | parsed. (The parameter \code{None} yields an empty list.) |
Guido van Rossum | 8729483 | 1998-06-16 22:27:40 +0000 | [diff] [blame] | 54 | \end{classdesc} |
| 55 | |
Guido van Rossum | 843e712 | 1996-12-06 21:23:53 +0000 | [diff] [blame] | 56 | \begin{funcdesc}{parsedate}{date} |
Fred Drake | cdea8a3 | 1998-03-14 06:17:43 +0000 | [diff] [blame] | 57 | Attempts to parse a date according to the rules in \rfc{822}. |
| 58 | however, some mailers don't follow that format as specified, so |
| 59 | \function{parsedate()} tries to guess correctly in such cases. |
Fred Drake | c589124 | 1998-02-09 19:16:20 +0000 | [diff] [blame] | 60 | \var{date} is a string containing an \rfc{822} date, such as |
Fred Drake | cdea8a3 | 1998-03-14 06:17:43 +0000 | [diff] [blame] | 61 | \code{'Mon, 20 Nov 1995 19:12:08 -0500'}. If it succeeds in parsing |
| 62 | the date, \function{parsedate()} returns a 9-tuple that can be passed |
| 63 | directly to \function{time.mktime()}; otherwise \code{None} will be |
Guido van Rossum | 843e712 | 1996-12-06 21:23:53 +0000 | [diff] [blame] | 64 | returned. |
| 65 | \end{funcdesc} |
| 66 | |
| 67 | \begin{funcdesc}{parsedate_tz}{date} |
Fred Drake | cdea8a3 | 1998-03-14 06:17:43 +0000 | [diff] [blame] | 68 | Performs the same function as \function{parsedate()}, but returns |
| 69 | either \code{None} or a 10-tuple; the first 9 elements make up a tuple |
| 70 | that can be passed directly to \function{time.mktime()}, and the tenth |
| 71 | is the offset of the date's timezone from UTC (which is the official |
| 72 | term for Greenwich Mean Time). (Note that the sign of the timezone |
| 73 | offset is the opposite of the sign of the \code{time.timezone} |
| 74 | variable for the same timezone; the latter variable follows the |
| 75 | \POSIX{} standard while this module follows \rfc{822}.) If the input |
| 76 | string has no timezone, the last element of the tuple returned is |
| 77 | \code{None}. |
Guido van Rossum | 843e712 | 1996-12-06 21:23:53 +0000 | [diff] [blame] | 78 | \end{funcdesc} |
| 79 | |
Guido van Rossum | 8cf94e6 | 1998-02-18 05:09:14 +0000 | [diff] [blame] | 80 | \begin{funcdesc}{mktime_tz}{tuple} |
Fred Drake | cdea8a3 | 1998-03-14 06:17:43 +0000 | [diff] [blame] | 81 | Turn a 10-tuple as returned by \function{parsedate_tz()} into a UTC |
| 82 | timestamp. It the timezone item in the tuple is \code{None}, assume |
| 83 | local time. Minor deficiency: this first interprets the first 8 |
| 84 | elements as a local time and then compensates for the timezone |
| 85 | difference; this may yield a slight error around daylight savings time |
Guido van Rossum | 8cf94e6 | 1998-02-18 05:09:14 +0000 | [diff] [blame] | 86 | switch dates. Not enough to worry about for common use. |
| 87 | \end{funcdesc} |
| 88 | |
Guido van Rossum | ecde781 | 1995-03-28 13:35:14 +0000 | [diff] [blame] | 89 | \subsection{Message Objects} |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 90 | \label{message-objects} |
Guido van Rossum | ecde781 | 1995-03-28 13:35:14 +0000 | [diff] [blame] | 91 | |
Fred Drake | cdea8a3 | 1998-03-14 06:17:43 +0000 | [diff] [blame] | 92 | A \class{Message} instance has the following methods: |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 93 | |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 94 | \begin{methoddesc}{rewindbody}{} |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 95 | Seek to the start of the message body. This only works if the file |
| 96 | object is seekable. |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 97 | \end{methoddesc} |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 98 | |
Guido van Rossum | 444d0f8 | 1998-06-11 13:50:02 +0000 | [diff] [blame] | 99 | \begin{methoddesc}{isheader}{line} |
| 100 | Returns a line's canonicalized fieldname (the dictionary key that will |
| 101 | be used to index it) if the line is a legal RFC822 header; otherwise |
| 102 | returns None (implying that parsing should stop here and the line be |
| 103 | pushed back on the input stream). It is sometimes useful to override |
| 104 | this method in a subclass. |
| 105 | \end{methoddesc} |
| 106 | |
Guido van Rossum | 1299100 | 1998-06-10 21:34:27 +0000 | [diff] [blame] | 107 | \begin{methoddesc}{islast}{line} |
| 108 | Return true if the given line is a delimiter on which Message should |
Guido van Rossum | 444d0f8 | 1998-06-11 13:50:02 +0000 | [diff] [blame] | 109 | stop. The delimiter line is consumed, and the file object's read |
| 110 | location positioned immediately after it. By default this method just |
| 111 | checks that the line is blank, but you can override it in a subclass. |
Guido van Rossum | 1299100 | 1998-06-10 21:34:27 +0000 | [diff] [blame] | 112 | \end{methoddesc} |
| 113 | |
| 114 | \begin{methoddesc}{iscomment}{line} |
| 115 | Return true if the given line should be ignored entirely, just skipped. |
| 116 | By default this is a stub that always returns false, but you can |
| 117 | override it in a subclass. |
| 118 | \end{methoddesc} |
| 119 | |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 120 | \begin{methoddesc}{getallmatchingheaders}{name} |
Guido van Rossum | 6c4f003 | 1995-03-07 10:14:09 +0000 | [diff] [blame] | 121 | Return a list of lines consisting of all headers matching |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 122 | \var{name}, if any. Each physical line, whether it is a continuation |
| 123 | line or not, is a separate list item. Return the empty list if no |
| 124 | header matches \var{name}. |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 125 | \end{methoddesc} |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 126 | |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 127 | \begin{methoddesc}{getfirstmatchingheader}{name} |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 128 | Return a list of lines comprising the first header matching |
| 129 | \var{name}, and its continuation line(s), if any. Return \code{None} |
| 130 | if there is no header matching \var{name}. |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 131 | \end{methoddesc} |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 132 | |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 133 | \begin{methoddesc}{getrawheader}{name} |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 134 | Return a single string consisting of the text after the colon in the |
| 135 | first header matching \var{name}. This includes leading whitespace, |
| 136 | the trailing linefeed, and internal linefeeds and whitespace if there |
| 137 | any continuation line(s) were present. Return \code{None} if there is |
| 138 | no header matching \var{name}. |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 139 | \end{methoddesc} |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 140 | |
Guido van Rossum | 1299100 | 1998-06-10 21:34:27 +0000 | [diff] [blame] | 141 | \begin{methoddesc}{getheader}{name\optional{, default}} |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 142 | Like \code{getrawheader(\var{name})}, but strip leading and trailing |
Guido van Rossum | 1299100 | 1998-06-10 21:34:27 +0000 | [diff] [blame] | 143 | whitespace. Internal whitespace is not stripped. The optional |
| 144 | \var{default} argument can be used to specify a different default to |
| 145 | be returned when there is no header matching \var{name}. |
| 146 | \end{methoddesc} |
| 147 | |
| 148 | \begin{methoddesc}{get}{name\optional{, default}} |
Fred Drake | 23329d4 | 1998-08-10 17:46:22 +0000 | [diff] [blame] | 149 | An alias for \method{getheader()}, to make the interface more compatible |
Guido van Rossum | 1299100 | 1998-06-10 21:34:27 +0000 | [diff] [blame] | 150 | with regular dictionaries. |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 151 | \end{methoddesc} |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 152 | |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 153 | \begin{methoddesc}{getaddr}{name} |
Fred Drake | cdea8a3 | 1998-03-14 06:17:43 +0000 | [diff] [blame] | 154 | Return a pair \code{(\var{full name}, \var{email address})} parsed |
| 155 | from the string returned by \code{getheader(\var{name})}. If no |
| 156 | header matching \var{name} exists, return \code{(None, None)}; |
| 157 | otherwise both the full name and the address are (possibly empty) |
| 158 | strings. |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 159 | |
Fred Drake | cdea8a3 | 1998-03-14 06:17:43 +0000 | [diff] [blame] | 160 | Example: If \var{m}'s first \code{From} header contains the string |
Guido van Rossum | 470be14 | 1995-03-17 16:07:09 +0000 | [diff] [blame] | 161 | \code{'jack@cwi.nl (Jack Jansen)'}, then |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 162 | \code{m.getaddr('From')} will yield the pair |
Guido van Rossum | 470be14 | 1995-03-17 16:07:09 +0000 | [diff] [blame] | 163 | \code{('Jack Jansen', 'jack@cwi.nl')}. |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 164 | If the header contained |
Guido van Rossum | 470be14 | 1995-03-17 16:07:09 +0000 | [diff] [blame] | 165 | \code{'Jack Jansen <jack@cwi.nl>'} instead, it would yield the |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 166 | exact same result. |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 167 | \end{methoddesc} |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 168 | |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 169 | \begin{methoddesc}{getaddrlist}{name} |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 170 | This is similar to \code{getaddr(\var{list})}, but parses a header |
Fred Drake | 23329d4 | 1998-08-10 17:46:22 +0000 | [diff] [blame] | 171 | containing a list of email addresses (e.g.\ a \code{To} header) and |
Fred Drake | cdea8a3 | 1998-03-14 06:17:43 +0000 | [diff] [blame] | 172 | returns a list of \code{(\var{full name}, \var{email address})} pairs |
| 173 | (even if there was only one address in the header). If there is no |
| 174 | header matching \var{name}, return an empty list. |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 175 | |
Barry Warsaw | 53610ca | 1999-01-14 21:26:54 +0000 | [diff] [blame] | 176 | If multiple headers exist that match the named header (e.g. if there |
| 177 | are several \code{Cc} headers), all are parsed for addresses. Any |
| 178 | continuation lines the named headers contain are also parsed. |
| 179 | |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 180 | XXX The current version of this function is not really correct. It |
| 181 | yields bogus results if a full name contains a comma. |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 182 | \end{methoddesc} |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 183 | |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 184 | \begin{methoddesc}{getdate}{name} |
Fred Drake | cdea8a3 | 1998-03-14 06:17:43 +0000 | [diff] [blame] | 185 | Retrieve a header using \method{getheader()} and parse it into a 9-tuple |
| 186 | compatible with \function{time.mktime()}. If there is no header matching |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 187 | \var{name}, or it is unparsable, return \code{None}. |
| 188 | |
| 189 | Date parsing appears to be a black art, and not all mailers adhere to |
| 190 | the standard. While it has been tested and found correct on a large |
| 191 | collection of email from many sources, it is still possible that this |
| 192 | function may occasionally yield an incorrect result. |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 193 | \end{methoddesc} |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 194 | |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 195 | \begin{methoddesc}{getdate_tz}{name} |
Fred Drake | cdea8a3 | 1998-03-14 06:17:43 +0000 | [diff] [blame] | 196 | Retrieve a header using \method{getheader()} and parse it into a |
| 197 | 10-tuple; the first 9 elements will make a tuple compatible with |
| 198 | \function{time.mktime()}, and the 10th is a number giving the offset |
| 199 | of the date's timezone from UTC. Similarly to \method{getdate()}, if |
Guido van Rossum | 843e712 | 1996-12-06 21:23:53 +0000 | [diff] [blame] | 200 | there is no header matching \var{name}, or it is unparsable, return |
| 201 | \code{None}. |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 202 | \end{methoddesc} |
Guido van Rossum | 843e712 | 1996-12-06 21:23:53 +0000 | [diff] [blame] | 203 | |
Fred Drake | cdea8a3 | 1998-03-14 06:17:43 +0000 | [diff] [blame] | 204 | \class{Message} instances also support a read-only mapping interface. |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 205 | In particular: \code{\var{m}[name]} is like |
| 206 | \code{\var{m}.getheader(name)} but raises \exception{KeyError} if |
| 207 | there is no matching header; and \code{len(\var{m})}, |
Fred Drake | cdea8a3 | 1998-03-14 06:17:43 +0000 | [diff] [blame] | 208 | \code{\var{m}.has_key(name)}, \code{\var{m}.keys()}, |
| 209 | \code{\var{m}.values()} and \code{\var{m}.items()} act as expected |
| 210 | (and consistently). |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 211 | |
Fred Drake | cdea8a3 | 1998-03-14 06:17:43 +0000 | [diff] [blame] | 212 | Finally, \class{Message} instances have two public instance variables: |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 213 | |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 214 | \begin{memberdesc}{headers} |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 215 | A list containing the entire set of header lines, in the order in |
Guido van Rossum | 8729483 | 1998-06-16 22:27:40 +0000 | [diff] [blame] | 216 | which they were read (except that setitem calls may disturb this |
| 217 | order). Each line contains a trailing newline. The |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 218 | blank line terminating the headers is not contained in the list. |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 219 | \end{memberdesc} |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 220 | |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 221 | \begin{memberdesc}{fp} |
Guido van Rossum | a12ef94 | 1995-02-27 17:53:25 +0000 | [diff] [blame] | 222 | The file object passed at instantiation time. |
Fred Drake | e14dde2 | 1998-04-04 06:19:30 +0000 | [diff] [blame] | 223 | \end{memberdesc} |
Guido van Rossum | 8729483 | 1998-06-16 22:27:40 +0000 | [diff] [blame] | 224 | |
| 225 | \subsection{AddressList Objects} |
| 226 | \label{addresslist-objects} |
| 227 | |
| 228 | An \class{AddressList} instance has the following methods: |
| 229 | |
| 230 | \begin{methoddesc}{__len__}{name} |
| 231 | Return the number of addresses in the address list. |
| 232 | \end{methoddesc} |
| 233 | |
| 234 | \begin{methoddesc}{__str__}{name} |
| 235 | Return a canonicalized string representation of the address list. |
| 236 | Addresses are rendered in "name" <host@domain> form, comma-separated. |
| 237 | \end{methoddesc} |
| 238 | |
| 239 | \begin{methoddesc}{__add__}{name} |
| 240 | Return an AddressList instance that contains all addresses in both |
| 241 | AddressList operands, with duplicates removed (set union). |
| 242 | \end{methoddesc} |
| 243 | |
| 244 | \begin{methoddesc}{__sub__}{name} |
| 245 | Return an AddressList instance that contains every address in the |
| 246 | left-hand AddressList operand that is not present in the right-hand |
| 247 | address operand (set difference). |
| 248 | \end{methoddesc} |
| 249 | |
| 250 | |
| 251 | Finally, \class{AddressList} instances have one public instance variable: |
| 252 | |
| 253 | \begin{memberdesc}{addresslist} |
| 254 | A list of tuple string pairs, one per address. In each member, the |
| 255 | first is the canonicalized name part of the address, the second is the |
| 256 | route-address (@-separated host-domain pair). |
| 257 | \end{memberdesc} |