* More on ETRN in the FAQ.
* Horst Klokow's patch to make interface check the remote IP address.
-* Roger Luethi's patc to write the UIDL file when you hit a fetchlimit.
+* Roger Luethi's patch to write the UIDL file when you hit a fetchlimit.
* Don Beusee's patch to eliminate wedging on authentication failure.
Instead, fetchmail will now notify the user on the third failure, then
continue polling silently until service is restored (at which time the
user will get a notification).
+* Samuel Leo's patch to add LMTP capability to the smtphost option.
------------------------------------------------------------------------------
fetchmail-5.6.0 (Sun Nov 26 22:11:09 EST 2000), 19625 lines:
<table width="100%" cellpadding=0><tr>
<td width="30%">Back to <a href="index.html">Fetchmail Home Page</a>
<td width="30%" align=center>To <a href="/~esr/sitemap.html">Site Map</a>
-<td width="30%" align=right>$Date: 2000/12/01 09:47:53 $
+<td width="30%" align=right>$Date: 2000/12/06 17:42:20 $
</table>
<HR>
<H2>Since 5.0:</H2>
<UL>
+<LI>It's now easy to deliver mail to a local LMTP socket.<p>
+
<LI>The interface option now checks both local and remote interface IPs.<p>
<LI>
<table width="100%" cellpadding=0><tr>
<td width="30%">Back to <a href="index.html">Fetchmail Home Page</a>
<td width="30%" align=center>To <a href="/~esr/sitemap.html">Site Map</a>
-<td width="30%" align=right>$Date: 2000/12/01 09:47:53 $
+<td width="30%" align=right>$Date: 2000/12/06 17:42:20 $
</table>
<P><ADDRESS>Eric S. Raymond <A HREF="mailto:esr@thyrsus.com"><esr@snark.thyrsus.com></A></ADDRESS>
the end of the list as an invisible default. Each hostname may have a
port number following the host name. The port number is separated from
the host name by a slash; the default port is 25 (or ``smtp'' under IPv6).
-Example:
+If you specify an absolute pathname (beginning with a /), it will be
+interpreted as the name of a UNIX socket accepting LMTP connections
+(such as is supported by the Cyrus IMAP daemon) Example:
- --smtphost server1,server2/2525,server3
+ --smtphost server1,server2/2525,server3,/var/imap/socket/lmtp
.TP
.B \-D <domain>, --smtpaddress <domain>
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, '/')))
#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;
* 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);
#else
#include <net/socket.h>
#endif
+#include <sys/un.h>
#include <netinet/in.h>
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
}
#endif /* __UNUSED__ */
+int UnixOpen(const char *path)
+{
+ int sock = -1;
+ struct sockaddr_un ad;
+ memset(&ad, 0, sizeof(ad));
+ ad.sun_family = AF_UNIX;
+ strncpy(ad.sun_path, path, sizeof(ad.sun_path)-1);
+
+ sock = socket( AF_UNIX, SOCK_STREAM, 0 );
+ if (sock < 0)
+ {
+ h_errno = 0;
+ return -1;
+ }
+ if (connect(sock, (struct sockaddr *) &ad, sizeof(ad)) < 0)
+ {
+ int olderr = errno;
+ fm_close(sock); /* don't use SockClose, no traffic yet */
+ h_errno = 0;
+ errno = olderr;
+ return -1;
+ }
+ return sock;
+}
+
#if INET6_ENABLE
int SockOpen(const char *host, const char *service, const char *options,
const char *plugin)