base/utils/email.zeek
Summary
Functions
Extract mail addresses out of address specifications conforming to RFC5322. |
|
Extract mail addresses out of address specifications conforming to RFC5322. |
|
Extract the first email address from a string. |
|
Split email addresses from MIME headers. |
Detailed Interface
Functions
- extract_email_addrs_set
-
Extract mail addresses out of address specifications conforming to RFC5322.
- Parameters
str – A string potentially containing email addresses.
- Returns
A set of extracted email addresses. An empty set is returned if no email addresses are discovered.
- extract_email_addrs_vec
- Type
function
(str:string
) :string_vec
Extract mail addresses out of address specifications conforming to RFC5322.
- Parameters
str – A string potentially containing email addresses.
- Returns
A vector of extracted email addresses. An empty vector is returned if no email addresses are discovered.
- extract_first_email_addr
-
Extract the first email address from a string.
- Parameters
str – A string potentially containing email addresses.
- Returns
An email address or empty string if none found.
- split_mime_email_addresses
-
Split email addresses from MIME headers. The email addresses will include the display name and email address as it was given by the mail mail client. Note that this currently does not account for MIME group addresses and won’t handle them correctly. The group name will show up as part of an email address.
- Parameters
str – The argument from a MIME header.
- Returns
A set of addresses or empty string if none found.