/*
* Text client functions for reading and writing of messages
*
- * Copyright (c) 1987-2019 by the citadel.org team
+ * Copyright (c) 1987-2020 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
char ch;
int linelen;
int final_line_is_blank = 0;
+ int is_local = 0;
has_images = 0;
color(BRIGHT_CYAN);
}
+ /* Determine if the message originated here on the local system. If it did we will suppress printing of email addresses */
+ is_local = 0;
+ char *at = !IsEmptyStr(message->email) ? strchr(message->email,'@') : NULL;
+ if (at) {
+ if (!strcasecmp(++at, ipc->ServInfo.fqdn)) {
+ is_local = 1;
+ }
+ }
+ else {
+ is_local = 1; // no address means it couldn't have originated anywhere else
+ }
+
/* View headers only */
if (pagin == 2) {
scr_printf("nhdr=%s\nfrom=%s\ntype=%d\nmsgn=%s\n",
strftime(now, sizeof now, "%F %R", &thetime);
if (dest) {
fprintf(dest, "%s from %s ", now, message->author);
- if (!IsEmptyStr(message->email)) {
+ if (!is_local) {
fprintf(dest, "<%s> ", message->email);
}
}
scr_printf("from ");
color(BRIGHT_CYAN);
scr_printf("%s ", message->author);
- if (!IsEmptyStr(message->email)) {
+ if (!is_local) {
color(DIM_WHITE);
scr_printf("<");
color(BRIGHT_BLUE);