summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-06-12 13:43:54 +0200
committerErich Eckner <git@eckner.net>2020-06-12 13:43:54 +0200
commitceefc912fb1f7f4e9052ea73964f170058cd100f (patch)
tree7c1accda20d6dfb4c33a5d89e10f9aa521573481
parent6c702a26f10f04bf225aa914b2eae5b89e3d0b4a (diff)
downloadalpine-hide-hostname.tar.xz
pith/reply.c: use hostname in message id only if userdomain is not availablehide-hostname
-rw-r--r--pith/reply.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/pith/reply.c b/pith/reply.c
index ab4e97c..d7bdc91 100644
--- a/pith/reply.c
+++ b/pith/reply.c
@@ -3369,13 +3369,17 @@ generate_message_id(void)
get_alpine_revision_number(revisionbuf, sizeof(revisionbuf));
if(F_ON(F_ROT13_MESSAGE_ID, ps_global)){
- hostpart = rot13(ps_global->hostname);
+ hostpart = rot13(ps_global->userdomain
+ ? ps_global->userdomain
+ : ps_global->hostname);
alpine_name = rot13("alpine");
alpine_version = rot5n(ALPINE_VERSION);
system_os = rot13(SYSTYPE);
revision = rot5n(revisionbuf);
} else {
- hostpart = cpystr(ps_global->hostname);
+ hostpart = cpystr(ps_global->userdomain
+ ? ps_global->userdomain
+ : ps_global->hostname);
alpine_name = cpystr("alpine");
alpine_version = cpystr(ALPINE_VERSION);
system_os = cpystr(SYSTYPE);