diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2000-12-06 17:42:23 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2000-12-06 17:42:23 +0000 |
commit | 012d86a81392ac10183b2cc7abe7f06132fc30b6 (patch) | |
tree | dad070209f49b1cc1abbb59ee69eba7d14a6fecb /sink.c | |
parent | 6da7693ce8c3391c5b7e1cf61edd89a4179961a8 (diff) | |
download | fetchmail-012d86a81392ac10183b2cc7abe7f06132fc30b6.tar.gz fetchmail-012d86a81392ac10183b2cc7abe7f06132fc30b6.tar.bz2 fetchmail-012d86a81392ac10183b2cc7abe7f06132fc30b6.zip |
Samuel Leo's LMTP enhancement.
svn path=/trunk/; revision=2995
Diffstat (limited to 'sink.c')
-rw-r--r-- | sink.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -104,6 +104,8 @@ static int smtp_open(struct query *ctl) xalloca(parsed_host, char *, strlen(idp->id) + 1); ctl->smtphost = idp->id; /* remember last host tried. */ + if(ctl->smtphost[0]=='/') + ctl->listener = LMTP_MODE; strcpy(parsed_host, idp->id); if ((cp = strrchr(parsed_host, '/'))) @@ -116,6 +118,10 @@ static int smtp_open(struct query *ctl) #endif /* INET6_ENABLE */ } + if (ctl->smtphost[0]=='/'){ + if((ctl->smtp_socket = UnixOpen(ctl->smtphost))==-1) + continue; + } else if ((ctl->smtp_socket = SockOpen(parsed_host,portnum,NULL, ctl->server.plugout)) == -1) continue; @@ -159,7 +165,7 @@ static int smtp_open(struct query *ctl) * enforce this. Now that we have the actual hostname, * compute what we should canonicalize with. */ - ctl->destaddr = ctl->smtpaddress ? ctl->smtpaddress : ( ctl->smtphost ? ctl->smtphost : "localhost"); + ctl->destaddr = ctl->smtpaddress ? ctl->smtpaddress : ( ctl->smtphost && ctl->smtphost[0] != '/' ? ctl->smtphost : "localhost"); if (outlevel >= O_DEBUG && ctl->smtp_socket != -1) report(stdout, _("forwarding to %s\n"), ctl->smtphost); |