aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.c
diff options
context:
space:
mode:
Diffstat (limited to 'fetchmail.c')
-rw-r--r--fetchmail.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fetchmail.c b/fetchmail.c
index 1caf1d98..20c9cc45 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -65,6 +65,7 @@ char *rcfile; /* path name of rc file */
char *idfile; /* UID list file */
int versioninfo; /* emit only version info */
char *user; /* the name of the invoking user */
+char *fetchmailhost; /* the name of the host running fetchmail */
char *program_name; /* the name to prefix error messages with */
static char *lockfile; /* name of lockfile */
@@ -115,6 +116,10 @@ int main (int argc, char **argv)
}
}
+ /* we'll need this for error messages */
+ gethostname(tmpbuf, sizeof(tmpbuf));
+ fetchmailhost = xstrdup(tmpbuf);
+
/*
* Backward-compatibility hack. If we're called by the name of the
* ancestral popclient, look for .poprc. This will actually work