7 #include <fmt/format.h>
8 #include <fmt/ostream.h>
10 #include <gflags/gflags.h>
12 #include <glog/logging.h>
14 using namespace std::string_literals
;
16 int main(int argc
, char* argv
[])
18 google::ParseCommandLineFlags(&argc
, &argv
, true);
20 fs::path config_path
= osutil::get_config_dir();
22 SRS0
srs(config_path
);
25 srs
.enc_reply(SRS0::from_to
{"reply@example.com", "local-A"});
27 std::cout
<< rep_enc
<< '\n';
29 auto const rep_dec
= srs
.dec_reply(rep_enc
);
32 std::cout
<< rep_dec
->mail_from
<< '\n';
33 std::cout
<< rep_dec
->rcpt_to_local_part
<< '\n';
36 srs
.enc_bounce(SRS0::from_to
{"noreply@example.com", "local-B"});
38 std::cout
<< bnc_enc
<< '\n';
40 auto const bnc_dec
= srs
.dec_bounce(bnc_enc
, 10);
43 std::cout
<< bnc_dec
->mail_from
<< '\n';