1 #ifndef MESSAGE_DOT_HPP_INCLUDED
2 #define MESSAGE_DOT_HPP_INCLUDED
10 #include "Mailbox.hpp"
16 header(std::string_view n
, std::string_view v
)
22 std::string
as_string() const;
24 std::string_view
as_view() const
27 static_cast<size_t>(std::distance(name
.begin(), value
.end()))};
30 bool operator==(std::string_view n
) const { return iequal(n
, name
); }
32 std::string_view name
;
33 std::string_view value
;
34 }; // namespace header
37 bool parse(std::string_view input
);
38 bool parse_hdr(std::string_view input
);
40 std::string
as_string() const;
42 bool write(std::ostream
& out
) const;
44 std::vector
<header
> headers
;
46 std::string_view field_name
;
47 std::string_view field_value
;
49 std::string_view body
;
51 // New Authentication_Results field
54 // New DKIM-Signature that includes above AR
57 std::vector
<std::string
> arc_hdrs
;
60 void authentication(fs::path config_path
,
62 message::parsed
& msg
);
64 void dkim_check(fs::path config_path
, char const* domain
, message::parsed
& msg
);
66 bool rewrite(fs::path config_path
,
67 Mailbox
const& mail_from
,
69 message::parsed
& msg
);
71 void print_spf_envelope_froms(char const* domain
, message::parsed
& msg
);
73 } // namespace message
75 #endif // MESSAGE_DOT_HPP_INCLUDED