Portability | portable |
---|---|
Stability | provisional |
Maintainer | simons@cryp.to |
- Useful parser combinators
- Miscellaneous tokens (section 3.2.6)
- Date and Time Specification (section 3.3)
- Address Specification (section 3.4)
- Overall message syntax (section 3.5)
- Field definitions (section 3.6)
- Miscellaneous obsolete tokens (section 4.1)
- Obsolete folding white space (section 4.2)
- Obsolete Date and Time (section 4.3)
- Obsolete Addressing (section 4.4)
- Obsolete header fields (section 4.5)
- Obsolete origination date field (section 4.5.1)
- Obsolete originator fields (section 4.5.2)
- Obsolete destination address fields (section 4.5.3)
- Obsolete identification fields (section 4.5.4)
- Obsolete informational fields (section 4.5.5)
- Obsolete resent fields (section 4.5.6)
- Obsolete trace fields (section 4.5.7)
This module provides parsers for the grammar defined in RFC2822, "Internet Message Format", http://www.faqs.org/rfcs/rfc2822.html.
Please note: The module is not particularly well tested.
Addendum for Nonstandard Version: This module deviates from the RFC currently in * Allowing for non-standard line endings.
These allowances are subject to change, and should not be
used when parsing incoming messages, only for parsing messages
that have been stored on disk. The goal of these nonstandard
Parsers is to provide a higher probability of parsing Common_
Headers (rather than only those explicitly defined in the RFC)
as well as allowing for potential oddities / changes that may
occur during storage of an email message. These parsers have
be rebranded so as not to conflict with the standard parsers
available from the excellent hsemail
package, upon which
this package depends. For patches to this package only (namely
'hsemail-ns', patches should be sent to jfredett@gmail.com,
for patches to the Proper parsers, you can send them to the
original maintainer.
- maybeOption :: GenParser tok st a -> GenParser tok st (Maybe a)
- unfold :: CharParser a b -> CharParser a b
- header :: String -> CharParser a b -> CharParser a b
- obsHeader :: String -> CharParser a b -> CharParser a b
- noWsCtl :: CharParser a Char
- text :: CharParser a Char
- specials :: CharParser a Char
- quotedPair :: CharParser a String
- fws :: CharParser a String
- ctext :: CharParser a Char
- comment :: CharParser a String
- cfws :: CharParser a String
- atext :: CharParser a Char
- atom :: CharParser a String
- dotAtom :: CharParser a String
- dotAtomText :: CharParser a String
- qtext :: CharParser a Char
- qcontent :: CharParser a String
- quotedString :: CharParser a String
- word :: CharParser a String
- phrase :: CharParser a [String]
- utext :: CharParser a Char
- unstructured :: CharParser a String
- dateTime :: CharParser a CalendarTime
- dayOfWeek :: CharParser a Day
- dayName :: CharParser a Day
- date :: CharParser a (Int, Month, Int)
- year :: CharParser a Int
- month :: CharParser a Month
- monthName :: CharParser a Month
- day :: CharParser a Int
- time :: CharParser a (TimeDiff, Int)
- timeOfDay :: CharParser a TimeDiff
- hour :: CharParser a Int
- minute :: CharParser a Int
- second :: CharParser a Int
- zone :: CharParser a Int
- data NameAddr = NameAddr {}
- address :: CharParser a [NameAddr]
- mailbox :: CharParser a NameAddr
- nameAddr :: CharParser a NameAddr
- angleAddr :: CharParser a String
- group :: CharParser a [NameAddr]
- displayName :: CharParser a String
- mailboxList :: CharParser a [NameAddr]
- addressList :: CharParser a [NameAddr]
- addrSpec :: CharParser a String
- localPart :: CharParser a String
- domain :: CharParser a String
- domainLiteral :: CharParser a String
- dcontent :: CharParser a String
- dtext :: CharParser a Char
- data Message = Message [Field] String
- message :: CharParser a Message
- body :: CharParser a String
- data Field
- = OptionalField String String
- | From [NameAddr]
- | Sender NameAddr
- | ReturnPath String
- | ReplyTo [NameAddr]
- | To [NameAddr]
- | Cc [NameAddr]
- | Bcc [NameAddr]
- | MessageID String
- | InReplyTo [String]
- | References [String]
- | Subject String
- | Comments String
- | Keywords [[String]]
- | Date CalendarTime
- | ResentDate CalendarTime
- | ResentFrom [NameAddr]
- | ResentSender NameAddr
- | ResentTo [NameAddr]
- | ResentCc [NameAddr]
- | ResentBcc [NameAddr]
- | ResentMessageID String
- | ResentReplyTo [NameAddr]
- | Received ([(String, String)], CalendarTime)
- | ObsReceived [(String, String)]
- fields :: CharParser a [Field]
- origDate :: CharParser a CalendarTime
- from :: CharParser a [NameAddr]
- sender :: CharParser a NameAddr
- replyTo :: CharParser a [NameAddr]
- to :: CharParser a [NameAddr]
- cc :: CharParser a [NameAddr]
- bcc :: CharParser a [NameAddr]
- messageId :: CharParser a String
- inReplyTo :: CharParser a [String]
- references :: CharParser a [String]
- msgId :: CharParser a String
- idLeft :: CharParser a String
- idRight :: CharParser a String
- noFoldQuote :: CharParser a String
- noFoldLiteral :: CharParser a String
- subject :: CharParser a String
- comments :: CharParser a String
- keywords :: CharParser a [[String]]
- resentDate :: CharParser a CalendarTime
- resentFrom :: CharParser a [NameAddr]
- resentSender :: CharParser a NameAddr
- resentTo :: CharParser a [NameAddr]
- resentCc :: CharParser a [NameAddr]
- resentBcc :: CharParser a [NameAddr]
- resentMsgId :: CharParser a String
- returnPath :: CharParser a String
- path :: CharParser a String
- received :: CharParser a ([(String, String)], CalendarTime)
- nameValList :: CharParser a [(String, String)]
- nameValPair :: CharParser a (String, String)
- itemName :: CharParser a String
- itemValue :: CharParser a String
- optionalField :: CharParser a (String, String)
- fieldName :: CharParser a String
- ftext :: CharParser a Char
- obsQp :: CharParser a String
- obsText :: CharParser a String
- obsChar :: CharParser a Char
- obsUtext :: CharParser a String
- obsPhrase :: CharParser a [String]
- obsPhraseList :: CharParser a [String]
- obsFws :: CharParser a String
- obsDayOfWeek :: CharParser a Day
- obsYear :: CharParser a Int
- obsMonth :: CharParser a Month
- obsDay :: CharParser a Int
- obsHour :: CharParser a Int
- obsMinute :: CharParser a Int
- obsSecond :: CharParser a Int
- obsZone :: CharParser a Int
- obsAngleAddr :: CharParser a String
- obsRoute :: CharParser a [String]
- obsDomainList :: CharParser a [String]
- obsLocalPart :: CharParser a String
- obsDomain :: CharParser a String
- obsMboxList :: CharParser a [NameAddr]
- obsAddrList :: CharParser a [NameAddr]
- obsFields :: GenParser Char a [Field]
- obsOrigDate :: CharParser a CalendarTime
- obsFrom :: CharParser a [NameAddr]
- obsSender :: CharParser a NameAddr
- obsReplyTo :: CharParser a [NameAddr]
- obsTo :: CharParser a [NameAddr]
- obsCc :: CharParser a [NameAddr]
- obsBcc :: CharParser a [NameAddr]
- obsMessageId :: CharParser a String
- obsInReplyTo :: CharParser a [String]
- obsReferences :: CharParser a [String]
- obsIdLeft :: CharParser a String
- obsIdRight :: CharParser a String
- obsSubject :: CharParser a String
- obsComments :: CharParser a String
- obsKeywords :: CharParser a [String]
- obsResentFrom :: CharParser a [NameAddr]
- obsResentSend :: CharParser a NameAddr
- obsResentDate :: CharParser a CalendarTime
- obsResentTo :: CharParser a [NameAddr]
- obsResentCc :: CharParser a [NameAddr]
- obsResentBcc :: CharParser a [NameAddr]
- obsResentMid :: CharParser a String
- obsResentReply :: CharParser a [NameAddr]
- obsReturn :: CharParser a String
- obsReceived :: CharParser a [(String, String)]
- obsPath :: CharParser a String
- obsOptional :: CharParser a (String, String)
Useful parser combinators
maybeOption :: GenParser tok st a -> GenParser tok st (Maybe a)Source
Return Nothing
if the given parser doesn't match. This
combinator is included in the latest parsec distribution as
optionMaybe
, but ghc-6.6.1 apparently doesn't have it.
unfold :: CharParser a b -> CharParser a bSource
unfold
=
between (optional cfws) (optional cfws)
header :: String -> CharParser a b -> CharParser a bSource
Construct a parser for a message header line from the header's name and a parser for the body.
obsHeader :: String -> CharParser a b -> CharParser a bSource
Like header
, but allows the obsolete white-space rules.
Primitive Tokens (section 3.2.1)
noWsCtl :: CharParser a CharSource
Match any US-ASCII non-whitespace control character.
text :: CharParser a CharSource
Match any US-ASCII character except for r
, n
.
specials :: CharParser a CharSource
Match any of the RFC's "special" characters: ()<>[]:;@,.\"
.
Quoted characters (section 3.2.2)
quotedPair :: CharParser a StringSource
Match a "quoted pair". All characters matched by text
may be
quoted. Note that the parsers returns both characters, the
backslash and the actual content.
Folding white space and comments (section 3.2.3)
fws :: CharParser a StringSource
ctext :: CharParser a CharSource
Match any non-whitespace, non-control character except for "(
",
")
", and "\
". This is used to describe the legal content of
comment
s.
Note: This parser accepts 8-bit characters, even though this is not legal according to the RFC. Unfortunately, 8-bit content in comments has become fairly common in the real world, so we'll just accept the fact.
Atom (section 3.2.4)
atext :: CharParser a CharSource
atom :: CharParser a StringSource
dotAtom :: CharParser a StringSource
Match dotAtomText
and skip any preceeding or trailing cfws
.
dotAtomText :: CharParser a StringSource
Match two or more atext
s interspersed by dots.
Quoted strings (section 3.2.5)
qtext :: CharParser a CharSource
Match any non-whitespace, non-control US-ASCII character except
for "\
" and ""
".
qcontent :: CharParser a StringSource
Match either qtext
or 'quotedPair '.
Miscellaneous tokens (section 3.2.6)
word :: CharParser a StringSource
Match either atom
or quotedString
.
utext :: CharParser a CharSource
Match any non-whitespace, non-control US-ASCII character except
for "\
" and ""
".
Date and Time Specification (section 3.3)
dateTime :: CharParser a CalendarTimeSource
Parse a date and time specification of the form
Thu, 19 Dec 2002 20:35:46 +0200
where the weekday specification "Thu,
" is optional. The parser
returns a CalendarTime
, which is set to the appropriate values.
Note, though, that not all fields of CalendarTime
will
necessarily be set correctly! Obviously, when no weekday has been
provided, the parser will set this field to Monday
- regardless
of whether the day actually is a monday or not. Similarly, the day
of the year will always be returned as 0
. The timezone name will
always be empty: ""
.
Nor will the dateTime
parser perform any consistency checking.
It will accept
40 Apr 2002 13:12 +0100
as a perfectly valid date.
In order to get all fields set to meaningful values, and in order
to verify the date's consistency, you will have to feed it into any
of the conversion routines provided in System.Time, such as
toClockTime
. (When doing this, keep in mind that most functions
return local time. This will not necessarily be the time you're
expecting.)
dayOfWeek :: CharParser a DaySource
This parser will match a dayName
, optionally wrapped in folding
whitespace, or an obsDayOfWeek
and return it's Day
value.
dayName :: CharParser a DaySource
This parser will the abbreviated weekday names ("Mon
", "Tue
", ...)
and return the appropriate Day
value.
date :: CharParser a (Int, Month, Int)Source
This parser will match a date of the form "dd:mm:yyyy
" and return
a tripple of the form (Int,Month,Int) - corresponding to
(year,month,day).
year :: CharParser a IntSource
This parser will match a four digit number and return it's integer value. No range checking is performed.
month :: CharParser a MonthSource
monthName :: CharParser a MonthSource
This parser will the abbreviated month names ("Jan
", "Feb
", ...)
and return the appropriate Month
value.
day :: CharParser a IntSource
Match either an obsDay
, or a one or two digit number and return it.
time :: CharParser a (TimeDiff, Int)Source
timeOfDay :: CharParser a TimeDiffSource
This parser will match a time-of-day specification of "hh:mm
" or
"hh:mm:ss
" and return the corrsponding time as a TimeDiff
.
hour :: CharParser a IntSource
This parser will match a two-digit number and return it's integer value. No range checking is performed.
minute :: CharParser a IntSource
This parser will match a two-digit number and return it's integer value. No range checking is performed.
second :: CharParser a IntSource
This parser will match a two-digit number and return it's integer value. No range checking takes place.
zone :: CharParser a IntSource
This parser will match a timezone specification of the form
"+hhmm
" or "-hhmm
" and return the zone's offset to UTC in
seconds as an integer. obsZone
is matched as well.
Address Specification (section 3.4)
A NameAddr is composed of an optional realname a mandatory
e-mail address
.
address :: CharParser a [NameAddr]Source
nameAddr :: CharParser a NameAddrSource
Parse an angleAddr
, optionally prefaced with a displayName
,
and return the address.
angleAddr :: CharParser a StringSource
Parse an angle_addr
or an obsAngleAddr
and return the address.
group :: CharParser a [NameAddr]Source
Parse a "group" of addresses. That is a displayName
, followed
by a colon, optionally followed by a mailboxList
, followed by a
semicolon. The found address(es) are returned - what may be none.
Here is an example:
parse group "" "my group: user1@example.org, user2@example.org;"
This input comes out as:
Right ["user1@example.org","user2@example.org"]
displayName :: CharParser a StringSource
Parse and return a phrase
.
mailboxList :: CharParser a [NameAddr]Source
Parse a list of mailbox
addresses, every two addresses being
separated by a comma, and return the list of found address(es).
addressList :: CharParser a [NameAddr]Source
Parse a list of address
addresses, every two addresses being
separated by a comma, and return the list of found address(es).
Addr-spec specification (section 3.4.1)
localPart :: CharParser a StringSource
Parse and return a "local part" of an addrSpec
. That is either
a dotAtom
or a quotedString
.
domain :: CharParser a StringSource
Parse and return a "domain part" of an addrSpec
. That is either
a dotAtom
or a domainLiteral
.
domainLiteral :: CharParser a StringSource
Parse a "domain literal". That is a "[
" character, followed by
any amount of dcontent
, followed by a terminating "]
"
character. The complete string is returned verbatim.
dcontent :: CharParser a StringSource
Parse and return any characters that are legal in a
domainLiteral
. That is dtext
or a 'quotedPair '.
dtext :: CharParser a CharSource
Parse and return any ASCII characters except "[
", "]
", and
"\
".
Overall message syntax (section 3.5)
This data type repesents a parsed Internet Message as defined in
this RFC. It consists of an arbitrary number of header lines,
represented in the Field
data type, and a message body, which may
be empty.
message :: CharParser a MessageSource
Parse a complete message as defined by this RFC and it broken down
into the separate header fields and the message body. Header lines,
which contain syntax errors, will not cause the parser to abort.
Rather, these headers will appear as OptionalField
s (which are
unparsed) in the resulting Message
. A message must be really,
really badly broken for this parser to fail.
This behaviour was chosen because it is impossible to predict what the user of this module considers to be a fatal error; traditionally, parsers are very forgiving when it comes to Internet messages.
If you want to implement a really strict parser, you'll have to put
the appropriate parser together yourself. You'll find that this is
rather easy to do. Refer to the fields
parser for further details.
body :: CharParser a StringSource
Field definitions (section 3.6)
This data type represents any of the header fields defined in this RFC. Each of the various instances contains with the return value of the corresponding parser.
fields :: CharParser a [Field]Source
This parser will parse an arbitrary number of header fields as
defined in this RFC. For each field, an appropriate Field
value
is created, all of them making up the Field
list that this parser
returns.
If you look at the implementation of this parser, you will find
that it uses Parsec's try
modifier around all of the fields.
The idea behind this is that fields, which contain syntax errors,
fall back to the catch-all optionalField
. Thus, this parser will
hardly ever return a syntax error -- what conforms with the idea
that any message that can possibly be accepted should be.
The origination date field (section 3.6.1)
origDate :: CharParser a CalendarTimeSource
Parse a "Date:
" header line and return the date it contains a
CalendarTime
.
Originator fields (section 3.6.2)
from :: CharParser a [NameAddr]Source
Parse a "From:
" header line and return the mailboxList
address(es) contained in it.
sender :: CharParser a NameAddrSource
Parse a "Sender:
" header line and return the mailbox
address
contained in it.
replyTo :: CharParser a [NameAddr]Source
Parse a "Reply-To:
" header line and return the addressList
address(es) contained in it.
Destination address fields (section 3.6.3)
to :: CharParser a [NameAddr]Source
Parse a "To:
" header line and return the addressList
address(es) contained in it.
cc :: CharParser a [NameAddr]Source
Parse a "Cc:
" header line and return the addressList
address(es) contained in it.
bcc :: CharParser a [NameAddr]Source
Parse a "Bcc:
" header line and return the addressList
address(es) contained in it.
Identification fields (section 3.6.4)
messageId :: CharParser a StringSource
Parse a "Message-Id:
" header line and return the msgId
contained in it.
inReplyTo :: CharParser a [String]Source
Parse a "In-Reply-To:
" header line and return the list of
msgId
s contained in it.
references :: CharParser a [String]Source
Parse a "References:
" header line and return the list of
msgId
s contained in it.
msgId :: CharParser a StringSource
Parse a "message ID:
" and return it. A message ID is almost
identical to an angleAddr
, but with stricter rules about folding
and whitespace.
idLeft :: CharParser a StringSource
Informational fields (section 3.6.5)
subject :: CharParser a StringSource
Parse a "Subject:
" header line and return it's contents verbatim.
comments :: CharParser a StringSource
Parse a "Comments:
" header line and return it's contents verbatim.
keywords :: CharParser a [[String]]Source
Resent fields (section 3.6.6)
resentDate :: CharParser a CalendarTimeSource
Parse a "Resent-Date:
" header line and return the date it
contains as CalendarTime
.
resentFrom :: CharParser a [NameAddr]Source
Parse a "Resent-From:
" header line and return the mailboxList
address(es) contained in it.
resentSender :: CharParser a NameAddrSource
Parse a "Resent-Sender:
" header line and return the mailboxList
address(es) contained in it.
resentTo :: CharParser a [NameAddr]Source
Parse a "Resent-To:
" header line and return the mailbox
address contained in it.
resentCc :: CharParser a [NameAddr]Source
Parse a "Resent-Cc:
" header line and return the addressList
address(es) contained in it.
resentBcc :: CharParser a [NameAddr]Source
Parse a "Resent-Bcc:
" header line and return the addressList
address(es) contained in it. (This list may be empty.)
resentMsgId :: CharParser a StringSource
Parse a "Resent-Message-ID:
" header line and return the msgId
contained in it.
Trace fields (section 3.6.7)
path :: CharParser a StringSource
received :: CharParser a ([(String, String)], CalendarTime)Source
nameValList :: CharParser a [(String, String)]Source
nameValPair :: CharParser a (String, String)Source
Optional fields (section 3.6.8)
optionalField :: CharParser a (String, String)Source
Parse an arbitrary header field and return a tuple containing the
fieldName
and unstructured
text of the header. The name will
not contain the terminating colon.
fieldName :: CharParser a StringSource
Parse and return an arbitrary header field name. That is one or
more ftext
characters.
ftext :: CharParser a CharSource
Match and return any ASCII character except for control
characters, whitespace, and ":
".
Miscellaneous obsolete tokens (section 4.1)
obsQp :: CharParser a StringSource
Match the obsolete "quoted pair" syntax, which - unlike 'quotedPair ' - allowed any ASCII character to be specified when quoted. The parser will return both, the backslash and the actual character.
obsText :: CharParser a StringSource
Match the obsolete "text" syntax, which - unlike text
- allowed
"carriage returns" and "linefeeds". This is really weird; you
better consult the RFC for details. The parser will return the
complete string, including those special characters.
obsChar :: CharParser a CharSource
Match and return the obsolete "char" syntax, which - unlike
character
- did not allow "carriage return" and "linefeed".
obsUtext :: CharParser a StringSource
Match and return the obsolete "utext" syntax, which is identical
to obsText
.
obsPhrase :: CharParser a [String]Source
Match the obsolete "phrase" syntax, which - unlike phrase
-
allows dots between tokens.
obsPhraseList :: CharParser a [String]Source
Match a "phrase list" syntax and return the list of String
s
that make up the phrase. In contrast to a phrase
, the
obsPhraseList
separates the individual words by commas. This
syntax is - as you will have guessed - obsolete.
Obsolete folding white space (section 4.2)
obsFws :: CharParser a StringSource
Obsolete Date and Time (section 4.3)
obsDayOfWeek :: CharParser a DaySource
Parse a dayName
but allow for the obsolete folding syntax.
obsYear :: CharParser a IntSource
Parse a year
but allow for a two-digit number (obsolete) and the
obsolete folding syntax.
obsMonth :: CharParser a MonthSource
Parse a monthName
but allow for the obsolete folding syntax.
obsDay :: CharParser a IntSource
Parse a day
but allow for the obsolete folding syntax.
obsHour :: CharParser a IntSource
Parse a hour
but allow for the obsolete folding syntax.
obsMinute :: CharParser a IntSource
Parse a minute
but allow for the obsolete folding syntax.
obsSecond :: CharParser a IntSource
Parse a second
but allow for the obsolete folding syntax.
obsZone :: CharParser a IntSource
Match the obsolete zone names and return the appropriate offset.
Obsolete Addressing (section 4.4)
obsAngleAddr :: CharParser a StringSource
This parser will match the "obsolete angle address" syntax. This
construct used to be known as a "route address" in earlier RFCs.
There are two differences between this construct and the
angleAddr
: For one - as usual -, the obsolete form allows for
more liberal insertion of folding whitespace and comments.
Secondly, and more importantly, angle addresses used to allow the (optional) specification of a "route". The newer version does not. Such a routing address looks like this:
<@example1.org,@example2.org:simons@example.org>
The parser will return a tuple that - in case of the above address - looks like this:
(["example1.org","example2.org"],"simons@example.org")
The first part contains a list of hosts that constitute the route
part. This list may be empty! The second part of the tuple is the
actual addrSpec
address.
obsRoute :: CharParser a [String]Source
This parser parses the "route" part of obsAngleAddr
and
returns the list of String
s that make up this route. Relies on
obsDomainList
for the actual parsing.
obsDomainList :: CharParser a [String]Source
This parser parses a list of domain names, each of them prefaced
with an "at". Multiple names are separated by a comma. The list of
domain
s is returned - and may be empty.
obsLocalPart :: CharParser a StringSource
Parse the obsolete syntax of a localPart
, which allowed for
more liberal insertion of folding whitespace and comments. The
actual string is returned.
obsDomain :: CharParser a StringSource
Parse the obsolete syntax of a domain
, which allowed for more
liberal insertion of folding whitespace and comments. The actual
string is returned.
obsMboxList :: CharParser a [NameAddr]Source
This parser will match the obsolete syntax for a mailboxList
.
This one is quite weird: An obsMboxList
contains an arbitrary
number of mailbox
es - including none -, which are separated by
commas. But you may have multiple consecutive commas without giving
a mailbox
. You may also have a valid obsMboxList
that
contains no mailbox
at all. On the other hand, you must have
at least one comma.
So, this input is perfectly valid:
","
But this one is - contrary to all intuition - not:
"simons@example.org"
Strange, isn't it?
obsAddrList :: CharParser a [NameAddr]Source
This parser is identical to obsMboxList
but parses a list of
address
es rather than mailbox
es. The main difference is that an
address
may contain group
s. Please note that as of now, the
parser will return a simple list of addresses; the grouping
information is lost.
Obsolete header fields (section 4.5)
Obsolete origination date field (section 4.5.1)
obsOrigDate :: CharParser a CalendarTimeSource
Parse a date
header line but allow for the obsolete
folding syntax.
Obsolete originator fields (section 4.5.2)
obsFrom :: CharParser a [NameAddr]Source
Parse a from
header line but allow for the obsolete
folding syntax.
obsSender :: CharParser a NameAddrSource
Parse a sender
header line but allow for the obsolete
folding syntax.
obsReplyTo :: CharParser a [NameAddr]Source
Parse a replyTo
header line but allow for the obsolete
folding syntax.
Obsolete destination address fields (section 4.5.3)
obsTo :: CharParser a [NameAddr]Source
Parse a to
header line but allow for the obsolete
folding syntax.
obsCc :: CharParser a [NameAddr]Source
Parse a cc
header line but allow for the obsolete
folding syntax.
obsBcc :: CharParser a [NameAddr]Source
Parse a bcc
header line but allow for the obsolete
folding syntax.
Obsolete identification fields (section 4.5.4)
obsMessageId :: CharParser a StringSource
Parse a messageId
header line but allow for the obsolete
folding syntax.
obsInReplyTo :: CharParser a [String]Source
Parse an inReplyTo
header line but allow for the obsolete
folding and the obsolete phrase syntax.
obsReferences :: CharParser a [String]Source
Parse a references
header line but allow for the obsolete
folding and the obsolete phrase syntax.
obsIdLeft :: CharParser a StringSource
Parses the "left part" of a message ID, but allows the obsolete
syntax, which is identical to a localPart
.
obsIdRight :: CharParser a StringSource
Parses the "right part" of a message ID, but allows the obsolete
syntax, which is identical to a domain
.
Obsolete informational fields (section 4.5.5)
obsSubject :: CharParser a StringSource
Parse a subject
header line but allow for the obsolete
folding syntax.
obsComments :: CharParser a StringSource
Parse a comments
header line but allow for the obsolete
folding syntax.
obsKeywords :: CharParser a [String]Source
Parse a keywords
header line but allow for the obsolete
folding syntax. Also, this parser accepts obsPhraseList
.
Obsolete resent fields (section 4.5.6)
obsResentFrom :: CharParser a [NameAddr]Source
Parse a resentFrom
header line but allow for the obsolete
folding syntax.
obsResentSend :: CharParser a NameAddrSource
Parse a resentSender
header line but allow for the obsolete
folding syntax.
obsResentDate :: CharParser a CalendarTimeSource
Parse a resentDate
header line but allow for the obsolete
folding syntax.
obsResentTo :: CharParser a [NameAddr]Source
Parse a resentTo
header line but allow for the obsolete
folding syntax.
obsResentCc :: CharParser a [NameAddr]Source
Parse a resentCc
header line but allow for the obsolete
folding syntax.
obsResentBcc :: CharParser a [NameAddr]Source
Parse a resentBcc
header line but allow for the obsolete
folding syntax.
obsResentMid :: CharParser a StringSource
Parse a resentMsgId
header line but allow for the obsolete
folding syntax.
obsResentReply :: CharParser a [NameAddr]Source
Parse a Resent-Reply-To
header line but allow for the
obsolete folding syntax.
Obsolete trace fields (section 4.5.7)
obsReceived :: CharParser a [(String, String)]Source
obsPath :: CharParser a StringSource
Match obsAngleAddr
.
obsOptional :: CharParser a (String, String)Source
This parser is identical to optionalField
but allows the more
liberal line-folding syntax between the "fieldName" and the "field
text".