Parse an email header.
Process a line from an email header. Each line that is recognised is parsed and the information put in the Envelope or Header.
611 bool matched =
false;
613 switch (tolower(line[0]))
769 char *beg = NULL, *end = NULL;
770 for (beg = strchr(p,
'<'); beg; beg = strchr(end,
','))
773 end = strchr(beg,
'>');
872 char *d = strrchr(p,
';');
1009 if (!matched && user_hdrs)
1012 line[strlen(line)] =
':';
enum UrlScheme url_check_scheme(const char *str)
Check the protocol of a URL.
time_t mutt_date_epoch(void)
Return the number of seconds since the Unix epoch.
bool mutt_matches_ignore(const char *s)
Does the string match the ignore list.
char * mutt_str_skip_whitespace(const char *p)
Find the first non-whitespace character in a string.
int lines
How many lines in the body of this message?
int mutt_str_atoi(const char *str, int *dst)
Convert ASCII string to an integer.
bool C_MarkOld
Config: Mark new emails as old when leaving the mailbox.
struct AddressList mail_followup_to
Email's 'mail-followup-to'.
struct Body * body
List of MIME parts.
struct AutocryptHeader * autocrypt_gossip
struct AddressList reply_to
Email's 'reply-to'.
int mutt_addrlist_parse(struct AddressList *al, const char *s)
Parse a list of email addresses.
char * supersedes
Supersedes header.
struct AddressList bcc
Email's 'Bcc' list.
void mutt_addrlist_clear(struct AddressList *al)
Unlink and free all Address in an AddressList.
char * xref
List of cross-references.
bool C_Autocrypt
Config: Enables the Autocrypt feature.
static size_t plen
Length of cached packet.
static void parse_content_disposition(const char *s, struct Body *ct)
Parse a content disposition.
char * mutt_str_dup(const char *str)
Copy a string, safely.
struct ListHead userhdrs
user defined headers
struct AutocryptHeader * autocrypt
int mutt_str_atol(const char *str, long *dst)
Convert ASCII string to a long.
time_t mutt_date_parse_date(const char *s, struct Tz *tz_out)
Parse a date string in RFC822 format.
bool zoccident
True, if west of UTC, False if east.
bool expired
Already expired?
void mutt_list_free(struct ListHead *h)
Free a List AND its strings.
bool C_AutoSubscribe
Config: Automatically check if the user is subscribed to a mailing list.
struct ListHead in_reply_to
in-reply-to header content
char * message_id
Message ID.
bool old
Email is seen, but unread.
void rfc2047_decode(char **pd)
Decode any RFC2047-encoded header fields.
struct AddressList from
Email's 'From' list.
char * mutt_strn_dup(const char *begin, size_t len)
Duplicate a sub-string.
bool mime
Has a MIME-Version header?
struct AddressList cc
Email's 'Cc' list.
unsigned int encoding
content-transfer-encoding, ContentEncoding
static struct AutocryptHeader * parse_autocrypt(struct AutocryptHeader *head, const char *s)
Parse an Autocrypt header line.
static void parse_content_language(const char *s, struct Body *ct)
Read the content's language.
bool mutt_istr_equal(const char *a, const char *b)
Compare two strings, ignoring case.
time_t date_sent
Time when the message was sent (UTC)
struct ListNode * mutt_list_insert_tail(struct ListHead *h, char *s)
Append a string to the end of a List.
void mutt_str_remove_trailing_ws(char *s)
Trim trailing whitespace from a string.
char * x_comment_to
List of 'X-comment-to' fields.
int mutt_check_encoding(const char *c)
Check the encoding type.
LOFF_T length
length (in bytes) of attachment
char * mutt_extract_message_id(const char *s, size_t *len)
Find a message-id.
char * mutt_str_skip_email_wsp(const char *s)
Skip over whitespace as defined by RFC5322.
size_t mutt_istr_startswith(const char *str, const char *prefix)
Check whether a string starts with a prefix, ignoring case.
unsigned int zhours
Hours away from UTC.
char * description
content-description
static void parse_references(struct ListHead *head, const char *s)
Parse references from an email header.
char * list_post
This stores a mailto URL, or nothing.
bool mutt_strn_equal(const char *a, const char *b, size_t l)
Check for equality of two strings (to a maximum), safely.
void mutt_parse_content_type(const char *s, struct Body *ct)
Parse a content type.
char * subject
Email's subject.
struct AddressList return_path
Return path for the Email.
List of recognised Timezones.
bool flagged
Marked important?
char * newsgroups
List of newsgroups.
char * mutt_str_replace(char **p, const char *s)
Replace one string with another.
bool deleted
Email is deleted.
bool replied
Email has been replied to.
char * followup_to
List of 'followup-to' fields.
char * organization
Organisation header.
bool C_Weed
Config: Filter headers when displaying/forwarding/printing/replying.
struct AddressList to
Email's 'To' list.
struct AddressList sender
Email's sender.
struct ListHead references
message references (in reverse order)
struct AddressList x_original_to
Email's 'X-Orig-to'.
unsigned int zminutes
Minutes away from UTC.
time_t received
Time when the message was placed in the mailbox.
void mutt_auto_subscribe(const char *mailto)
Check if user is subscribed to mailing list.