diff options
Diffstat (limited to 'fetchmail.c')
-rw-r--r-- | fetchmail.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fetchmail.c b/fetchmail.c index b3a8046a..4257562c 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -193,7 +193,10 @@ char **argv; /* if rc file didn't supply a localname, default appropriately */ if (!hostp->localname[0]) - strcpy(hostp->localname, user); + if (getuid() == 0) + strcpy(hostp->localname, hostp->remotename); + else + strcpy(hostp->localname, user); /* check that delivery is going to a real local user */ if ((pw = getpwnam(user)) == (struct passwd *)NULL) |