diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2021-03-29 16:52:17 +0200 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2021-03-29 16:55:01 +0200 |
commit | 78ca6d0a7c43715be44bf953da7f68f4d0827006 (patch) | |
tree | 3a51dabb29eeb67431cbb96da7bf6ccbd5ed9008 /fetchmail.c | |
parent | a7917f7d66b7fc781770ba7fd7d09b07d0f920f8 (diff) | |
download | fetchmail-78ca6d0a7c43715be44bf953da7f68f4d0827006.tar.gz fetchmail-78ca6d0a7c43715be44bf953da7f68f4d0827006.tar.bz2 fetchmail-78ca6d0a7c43715be44bf953da7f68f4d0827006.zip |
fetchmail.c: LMTP don't validate "port" on UNIX-domain sockets
(those with a file path).
Closes: #33
Diffstat (limited to 'fetchmail.c')
-rw-r--r-- | fetchmail.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fetchmail.c b/fetchmail.c index 9644aea0..a345e2fa 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -1421,9 +1421,10 @@ static int load_params(int argc, char **argv, int optind) { char *cp; - if (!(cp = strrchr(idp->id, '/')) - || (0 == strcmp(cp + 1, SMTP_PORT)) - || servport(cp + 1) == SMTP_PORT_NUM) + if ((idp->id[0] != '/') /* do not port-check UNIX paths */ && + (!(cp = strrchr(idp->id, '/')) + || (0 == strcmp(cp + 1, SMTP_PORT)) + || servport(cp + 1) == SMTP_PORT_NUM)) { (void) fprintf(stderr, GT_("%s configuration invalid, LMTP can't use default SMTP port\n"), |