aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.in2
-rw-r--r--NEWS6
-rw-r--r--conf.c5
-rw-r--r--driver.c15
-rw-r--r--fetchmail.c44
-rwxr-xr-xfetchmailconf12
-rw-r--r--rcfile_y.y11
-rwxr-xr-xspecgen.sh25
8 files changed, 89 insertions, 31 deletions
diff --git a/Makefile.in b/Makefile.in
index 3c96fd98..40b0d035 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -4,7 +4,7 @@
# So just uncomment all the lines marked QNX.
PACKAGE = fetchmail
-VERSION = 5.2.8
+VERSION = 5.2.9
SUBDIRS = @INTLSUB@ @POSUB@
diff --git a/NEWS b/NEWS
index 26f37f73..ebd74527 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,12 @@
(The `lines' figures total .c, .h, .l, and .y files under version control.)
+* Horst von Brand's improvements to the specfile generator.
+* Joop Susan's improvements in error status reporting.
+* Only emit progress dots when stdout is connected to a tty.
+* Fix for GNATS bug 16468, "INET6 breaks fetchmail preconnect"
+ by Munechika SUMIKAWA <sumikawa@ebina.hitachi.co.jp>.
+
fetchmail-5.2.8 (Mon Feb 14 19:16:46 EST 2000), 18571 lines:
* Attempted fix for Joop Susan's ENOTCONN bug.
diff --git a/conf.c b/conf.c
index 6be990db..19f290f0 100644
--- a/conf.c
+++ b/conf.c
@@ -249,10 +249,9 @@ void dump_config(struct runctl *runp, struct query *querylist)
stringdump("via", ctl->server.via);
stringdump("protocol",
using_kpop ? "KPOP" : showproto(ctl->server.protocol));
-#if !INET6_ENABLE
numdump("port", ctl->server.port);
-#else
- stringdump("service", ctl->server.service);
+#if INET6_ENABLE
+ stringdump("service", ctl->server.service);
#endif
numdump("timeout", ctl->server.timeout);
numdump("interval", ctl->server.interval);
diff --git a/driver.c b/driver.c
index 9157a14f..0bc9b6f3 100644
--- a/driver.c
+++ b/driver.c
@@ -529,7 +529,7 @@ static int readheaders(int sock,
sizeticker += linelen;
while (sizeticker >= SIZETICKER)
{
- if (!run.use_syslog)
+ if (!run.use_syslog && isatty(1))
{
fputc('.', stdout);
fflush(stdout);
@@ -1045,7 +1045,7 @@ static int readheaders(int sock,
free_str_list(&msgblk.recipients);
return(PS_IOERR);
}
- else if ((run.poll_interval == 0 || nodetach) && outlevel >= O_VERBOSE)
+ else if ((run.poll_interval == 0 || nodetach) && outlevel >= O_VERBOSE && isatty(2))
fputs("#", stderr);
/* write error notifications */
@@ -1155,7 +1155,7 @@ static int readbody(int sock, struct query *ctl, flag forward, int len)
sizeticker += linelen;
while (sizeticker >= SIZETICKER)
{
- if ((run.poll_interval == 0 || nodetach) && outlevel > O_SILENT)
+ if ((run.poll_interval == 0 || nodetach) && outlevel > O_SILENT && isatty(1))
{
fputc('.', stdout);
fflush(stdout);
@@ -1213,7 +1213,7 @@ static int readbody(int sock, struct query *ctl, flag forward, int len)
release_sink(ctl);
return(PS_IOERR);
}
- else if (outlevel >= O_VERBOSE)
+ else if (outlevel >= O_VERBOSE && isatty(1))
{
fputc('*', stdout);
fflush(stdout);
@@ -1597,7 +1597,8 @@ const int maxfetch; /* maximum number of messages to fetch */
* in daemon mode but the connection to the outside world
* is down.
*/
- if (!(err_no == EHOSTUNREACH && run.poll_interval))
+ if (!((err_no == EHOSTUNREACH || err_no == EHOSTUNREACH)
+ && run.poll_interval))
{
report_build(stderr, _("fetchmail: %s connection to %s failed"),
protocol->name, ctl->server.pollname);
@@ -2020,7 +2021,7 @@ const int maxfetch; /* maximum number of messages to fetch */
*/
if (protocol->fetch_body && !suppress_readbody)
{
- if (outlevel >= O_VERBOSE)
+ if (outlevel >= O_VERBOSE && isatty(1))
{
fputc('\n', stdout);
fflush(stdout);
@@ -2074,7 +2075,7 @@ const int maxfetch; /* maximum number of messages to fetch */
/* tell server we got it OK and resynchronize */
if (protocol->trail)
{
- if (outlevel >= O_VERBOSE)
+ if (outlevel >= O_VERBOSE && isatty(1))
{
fputc('\n', stdout);
fflush(stdout);
diff --git a/fetchmail.c b/fetchmail.c
index c902976b..dbd95ba2 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -676,7 +676,49 @@ int main(int argc, char **argv)
successes++;
else if (!check_only &&
((querystatus!=PS_NOMAIL) || (outlevel==O_DEBUG)))
- report(stdout, _("Query status=%d\n"), querystatus);
+ switch(querystatus)
+ {
+ case PS_SUCCESS:
+ report(stdout, "Query status=SUCCESS\n"); break ;
+ case PS_NOMAIL:
+ report(stdout, "Query status=NOMAIL\n"); break ;
+ case PS_SOCKET:
+ report(stdout, "Query status=SOCKET\n"); break ;
+ case PS_AUTHFAIL:
+ report(stdout, "Query status=AUTHFAIL\n"); break ;
+ case PS_PROTOCOL:
+ report(stdout, "Query status=PROTOCOL\n"); break ;
+ case PS_SYNTAX:
+ report(stdout, "Query status=SYNTAX\n"); break ;
+ case PS_IOERR:
+ report(stdout, "Query status=IOERR\n"); break ;
+ case PS_ERROR:
+ report(stdout, "Query status=ERROR\n"); break ;
+ case PS_EXCLUDE:
+ report(stdout, "Query status=EXCLUDE\n"); break ;
+ case PS_LOCKBUSY:
+ report(stdout, "Query status=LOCKBUSY\n"); break ;
+ case PS_SMTP:
+ report(stdout, "Query status=SMTP\n"); break ;
+ case PS_DNS:
+ report(stdout, "Query status=DNS\n"); break ;
+ case PS_BSMTP:
+ report(stdout, "Query status=BSMTP\n"); break ;
+ case PS_MAXFETCH:
+ report(stdout, "Query status=MAXFETCH\n"); break ;
+ case PS_UNDEFINED:
+ report(stdout, "Query status=UNDEFINED\n"); break ;
+ case PS_TRANSIENT:
+ report(stdout, "Query status=TRANSIENT\n"); break ;
+ case PS_REFUSED:
+ report(stdout, "Query status=REFUSED\n"); break ;
+ case PS_RETAINED:
+ report(stdout, "Query status=RETAINED\n"); break ;
+ case PS_TRUNCATED:
+ report(stdout, "Query status=TRUNCATED\n"); break ;
+ default:
+ report(stdout, _("Query status=%d\n"), querystatus); break;
+ }
#if (defined(linux) && !INET6_ENABLE) || defined (__FreeBSD__)
if (ctl->server.monitor)
diff --git a/fetchmailconf b/fetchmailconf
index 245a6170..4ecac058 100755
--- a/fetchmailconf
+++ b/fetchmailconf
@@ -1129,13 +1129,21 @@ Its response to RETR is normal, so use the `fetchall' option.
if string.find(greetline, "POP-Max") > 0:
warnings = warnings + """
-The Mail Max server screws up on mail with attachments. It reports the
-message size with attachments included, but doesn't downloasd them on a
+The Mail Max POP3 server screws up on mail with attachments. It reports
+the message size with attachments included, but doesn't download them on a
RETR or TOP. You should get rid of it -- and the brain-dead NT server
it rode in on.
"""
+ if string.find(greetline, "InterChange") > 0:
+ warnings = warnings + """
+The InterChange IMAP server screws up on mail with attachments. It reports
+the message size with attachments included, but doesn't download them on a
+RETR or TOP. You should get rid of it.
+
+"""
+
if string.find(greetline, "1.003") > 0 or string.find(greetline, "1.004") > 0:
warnings = warnings + """
This appears to be an old version of the UC Davis POP server. These are
diff --git a/rcfile_y.y b/rcfile_y.y
index cda010c2..2e99e62b 100644
--- a/rcfile_y.y
+++ b/rcfile_y.y
@@ -162,10 +162,15 @@ serv_option : AKA alias_list
#endif /* INET6_ENABLE */
}
| PORT NUMBER {
-#if !INET6_ENABLE
+#if INET6_ENABLE
+ int port = $2;
+ char buf[10];
+ sprintf(buf, "%d", port);
+ current.server.service = xstrdup(buf);
+#else
current.server.port = $2;
-#endif /* !INET6_ENABLE */
- }
+#endif /* INET6_ENABLE */
+ }
| INTERVAL NUMBER {current.server.interval = $2;}
| PREAUTHENTICATE PASSWORD {current.server.preauthenticate = A_PASSWORD;}
| PREAUTHENTICATE KERBEROS4 {current.server.preauthenticate = A_KERBEROS_V4;}
diff --git a/specgen.sh b/specgen.sh
index 34ff7970..08c27b11 100755
--- a/specgen.sh
+++ b/specgen.sh
@@ -1,12 +1,8 @@
cat <<EOF
# Note: Do not hack fetchmail.spec by hand -- it's generated by specgen.sh
-%define name fetchmail
-%define version ${1}
-%define release 1
-%define builddir \$RPM_BUILD_DIR/%{name}-%{version}
-Name: %{name}
-Version: %{version}
-Release: %{release}
+Name: fetchmail
+Version: $1
+Release: 1
Vendor: Eric Conspiracy Secret Labs
Packager: Eric S. Raymond <esr@thyrsus.com>
URL: http://www.tuxedo.org/~esr/fetchmail
@@ -119,23 +115,24 @@ GUI konfigurator do fetchmaila napisany w pythonie.
%setup -q
%build
-CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" # Add --enable-nls --without-included-gettext for internationalization
+CFLAGS="\$RPM_OPT_FLAGS" LDFLAGS="-s"
export CFLAGS LDFLAGS
-./configure -prefix=/usr
+./configure -prefix=/usr # Add --enable-nls --without-included-gettext
+ # for internationalization. Also look below.
make
%install
if [ -d \$RPM_BUILD_ROOT ]; then rm -rf \$RPM_BUILD_ROOT; fi
mkdir -p \$RPM_BUILD_ROOT/{etc/X11/wmconfig,usr/lib/rhs/control-panel}
make install prefix=\$RPM_BUILD_ROOT/usr
-cp %{builddir}/rh-config/*.{xpm,init} \$RPM_BUILD_ROOT/usr/lib/rhs/control-panel
-cp %{builddir}/fetchmail.man \$RPM_BUILD_ROOT/usr/man/man1/fetchmail.1
+cp rh-config/*.{xpm,init} \$RPM_BUILD_ROOT/usr/lib/rhs/control-panel
+cp fetchmail.man \$RPM_BUILD_ROOT/usr/man/man1/fetchmail.1
gzip -9nf \$RPM_BUILD_ROOT/usr/man/man1/fetchmail.1
+rm -rf contrib/RCS
+chmod 644 contrib/*
+cp rh-config/fetchmailconf.wmconfig \$RPM_BUILD_ROOT/etc/X11/wmconfig/fetchmailconf
cd \$RPM_BUILD_ROOT/usr/man/man1
ln -sf fetchmail.1.gz fetchmailconf.1.gz
-rm -rf %{builddir}/contrib/RCS
-chmod 644 %{builddir}/contrib/*
-cp %{builddir}/rh-config/fetchmailconf.wmconfig \$RPM_BUILD_ROOT/etc/X11/wmconfig/fetchmailconf
%clean
rm -rf \$RPM_BUILD_ROOT