Skip to content

Commit

Permalink
daemons: emit log message when HAPROXY protocol is mandated
Browse files Browse the repository at this point in the history
References: GXH-93
  • Loading branch information
jengelh committed Aug 28, 2024
1 parent 33f4f30 commit 5f92dbf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mda/smtp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ static bool dq_reload_config(std::shared_ptr<CONFIG_FILE> gxcfg = nullptr,
}
g_rcpt_delimiter = znul(gxcfg->get_value("lda_recipient_delimiter"));
g_haproxy_level = gxcfg->get_ll("lda_accept_haproxy");
if (g_haproxy_level > 0)
mlog(LV_NOTICE, "All incoming connections must be HAPROXY type %u", g_haproxy_level);
return true;
}

Expand Down
2 changes: 2 additions & 0 deletions mra/imap/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ static bool imap_reload_config(std::shared_ptr<config_file> gxcfg = nullptr,
return false;
}
g_haproxy_level = gxcfg->get_ll("imap_accept_haproxy");
if (g_haproxy_level > 0)
mlog(LV_NOTICE, "All incoming connections must be HAPROXY type %u", g_haproxy_level);
return true;
}

Expand Down
2 changes: 2 additions & 0 deletions mra/pop3/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ static bool pop3_reload_config(std::shared_ptr<config_file> gxcfg = nullptr,
return false;
}
g_haproxy_level = gxcfg->get_ll("pop3_accept_haproxy");
if (g_haproxy_level > 0)
mlog(LV_NOTICE, "All incoming connections must be HAPROXY type %u", g_haproxy_level);
return true;
}

Expand Down

0 comments on commit 5f92dbf

Please sign in to comment.