From f287ff471c7e08c3e94ad915540468f1b480c55d Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Tue, 20 May 2014 22:01:15 +0200 Subject: Do not translate header tags such as "Subject:". MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported by Gonzalo Pérez de Olaguer Córdoba, Debian Bug#744907. --- NEWS | 40 +++++++++++++++++++++------------------- driver.c | 52 ++++++++++++++++++++++++++-------------------------- fetchmail.h | 7 +++++-- po/de.po | 34 +++++++++++++++------------------- sink.c | 23 +++++++++++++---------- 5 files changed, 80 insertions(+), 76 deletions(-) diff --git a/NEWS b/NEWS index 24011bf0..3248059b 100644 --- a/NEWS +++ b/NEWS @@ -58,28 +58,13 @@ removed from a 6.4.0 or newer release.) fetchmail-6.3.27 (not yet released, if ever): -# FIXES -* Fix a typo in the FAQ. Submitted by David Lawyer, Debian Bug#706776. - - -fetchmail-6.3.26 (released 2013-04-23, 26180 LoC): - # NOTE THAT FETCHMAIL IS NO LONGER PUBLISHED THROUGH IBIBLIO. * They have stopped accepting submissions and consider themselves an archive. -# CRITICAL BUG FIX for setups using "mimedecode": -* The mimedecode feature failed to ship the last line of the body if it was - encoded as quoted-printable and had a MIME soft line break in the very last - line. Reported by Lars Hecking in June 2011. - - Bug introduced on 1998-03-20 when the mimedecode support was added by ESR - before release 4.4.1 through code contributed by Henrik Storner. - Workaround for older releases: do not use mimedecode feature. - - Earlier versions of this NEWS file claimed this bug fixed in fetchmail-6.3.23, - but it was not. - - Fixes Launchpad Bug#1171818. +## FIXES +* Fix a typo in the FAQ. Submitted by David Lawyer, Debian Bug#706776. +* Do not translate header tags such as "Subject:". Reported by Gonzalo Pérez de + Olaguer Córdoba, Debian Bug#744907. # KNOWN BUGS AND WORKAROUNDS (This section floats upwards through the NEWS file so it stays with the @@ -102,6 +87,23 @@ fetchmail-6.3.26 (released 2013-04-23, 26180 LoC): server to test against. Use GSSAPI. +fetchmail-6.3.26 (released 2013-04-23, 26180 LoC): + + CRITICAL BUG FIX for setups using "mimedecode": +* The mimedecode feature failed to ship the last line of the body if it was + encoded as quoted-printable and had a MIME soft line break in the very last + line. Reported by Lars Hecking in June 2011. + + Bug introduced on 1998-03-20 when the mimedecode support was added by ESR + before release 4.4.1 through code contributed by Henrik Storner. + Workaround for older releases: do not use mimedecode feature. + + Earlier versions of this NEWS file claimed this bug fixed in fetchmail-6.3.23, + but it was not. + + Fixes Launchpad Bug#1171818. + + fetchmail-6.3.25 (released 2013-03-18, 26149 LoC): # BUG FIXES diff --git a/driver.c b/driver.c index c2917268..6176bcb9 100644 --- a/driver.c +++ b/driver.c @@ -341,19 +341,19 @@ static void send_size_warnings(struct query *ctl) */ if (open_warning_by_mail(ctl)) return; - stuff_warning(iana_charset, ctl, - GT_("Subject: Fetchmail oversized-messages warning")); - stuff_warning(NULL, ctl, "%s", ""); + stuff_warning(iana_charset, ctl, "Subject: ", + GT_("Fetchmail oversized-messages warning")); + stuff_warning(NULL, ctl, "", "%s", ""); if (ctl->limitflush) - stuff_warning(NULL, ctl, + stuff_warning(NULL, ctl, "", GT_("The following oversized messages were deleted on server %s account %s:"), ctl->server.pollname, ctl->remotename); else - stuff_warning(NULL, ctl, + stuff_warning(NULL, ctl, "", GT_("The following oversized messages remain on server %s account %s:"), ctl->server.pollname, ctl->remotename); - stuff_warning(NULL, ctl, "%s", ""); + stuff_warning(NULL, ctl, "", "%s", ""); if (run.poll_interval == 0) max_warning_poll_count = 0; @@ -368,12 +368,12 @@ static void send_size_warnings(struct query *ctl) nbr = current->val.status.mark; size = atoi(current->id); if (ctl->limitflush) - stuff_warning(NULL, ctl, + stuff_warning(NULL, ctl, "", ngettext(" %d message %d octets long deleted by fetchmail.", " %d messages %d octets long deleted by fetchmail.", nbr), nbr, size); else - stuff_warning(NULL, ctl, + stuff_warning(NULL, ctl, "", ngettext(" %d message %d octets long skipped by fetchmail.", " %d messages %d octets long skipped by fetchmail.", nbr), nbr, size); @@ -385,7 +385,7 @@ static void send_size_warnings(struct query *ctl) current->val.status.num = 0; } - stuff_warning(NULL, ctl, "%s", ""); + stuff_warning(NULL, ctl, "", "%s", ""); close_warning_by_mail(ctl, (struct msgblk *)NULL); } @@ -922,14 +922,14 @@ static int do_session( if (timeoutcount > MAX_TIMEOUTS && !open_warning_by_mail(ctl)) { - stuff_warning(iana_charset, ctl, - GT_("Subject: fetchmail sees repeated timeouts")); - stuff_warning(NULL, ctl, "%s", ""); - stuff_warning(NULL, ctl, + stuff_warning(iana_charset, ctl, "Subject: ", + GT_("fetchmail sees repeated timeouts")); + stuff_warning(NULL, ctl, "", "%s", ""); + stuff_warning(NULL, ctl, "", GT_("Fetchmail saw more than %d timeouts while attempting to get mail from %s@%s.\n"), MAX_TIMEOUTS, ctl->remotename, ctl->server.truename); - stuff_warning(NULL, ctl, + stuff_warning(NULL, ctl, "", GT_("This could mean that your mailserver is stuck, or that your SMTP\n" \ "server is wedged, or that your mailbox file on the server has been\n" \ "corrupted by a server error. You can run `fetchmail -v -v' to\n" \ @@ -1197,22 +1197,22 @@ static int do_session( && !open_warning_by_mail(ctl)) { ctl->wehavesentauthnote = 1; - stuff_warning(iana_charset, ctl, - GT_("Subject: fetchmail authentication failed on %s@%s"), + stuff_warning(iana_charset, ctl, "Subject: ", + GT_("fetchmail authentication failed on %s@%s"), ctl->remotename, ctl->server.truename); - stuff_warning(NULL, ctl, "%s", ""); - stuff_warning(NULL, ctl, + stuff_warning(NULL, ctl, "", "%s", ""); + stuff_warning(NULL, ctl, "", GT_("Fetchmail could not get mail from %s@%s.\n"), ctl->remotename, ctl->server.truename); if (ctl->wehaveauthed) { - stuff_warning(NULL, ctl, GT_("\ + stuff_warning(NULL, ctl, "", GT_("\ The attempt to get authorization failed.\n\ Since we have already succeeded in getting authorization for this\n\ connection, this is probably another failure mode (such as busy server)\n\ that fetchmail cannot distinguish because the server didn't send a useful\n\ error message.")); - stuff_warning(NULL, ctl, GT_("\ + stuff_warning(NULL, ctl, "", GT_("\ \n\ However, if you HAVE changed your account details since starting the\n\ fetchmail daemon, you need to stop the daemon, change your configuration\n\ @@ -1222,7 +1222,7 @@ The fetchmail daemon will continue running and attempt to connect\n\ at each cycle. No future notifications will be sent until service\n\ is restored.")); } else { - stuff_warning(NULL, ctl, GT_("\ + stuff_warning(NULL, ctl, "", GT_("\ The attempt to get authorization failed.\n\ This probably means your password is invalid, but some servers have\n\ other failure modes that fetchmail cannot distinguish from this\n\ @@ -1272,15 +1272,15 @@ is restored.")); ctl->server.truename); if (!open_warning_by_mail(ctl)) { - stuff_warning(iana_charset, ctl, - GT_("Subject: fetchmail authentication OK on %s@%s"), + stuff_warning(iana_charset, ctl, "Subject: ", + GT_("fetchmail authentication OK on %s@%s"), ctl->remotename, ctl->server.truename); - stuff_warning(NULL, ctl, "%s", ""); - stuff_warning(NULL, ctl, + stuff_warning(NULL, ctl, "", "%s", ""); + stuff_warning(NULL, ctl, "", GT_("Fetchmail was able to log into %s@%s.\n"), ctl->remotename, ctl->server.truename); - stuff_warning(NULL, ctl, + stuff_warning(NULL, ctl, "", GT_("Service has been restored.\n")); close_warning_by_mail(ctl, (struct msgblk *)NULL); diff --git a/fetchmail.h b/fetchmail.h index 466ed86b..f3e45144 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -593,8 +593,11 @@ void release_sink(struct query *); int close_sink(struct query *, struct msgblk *, flag); int open_warning_by_mail(struct query *); #if defined(HAVE_STDARG_H) -void stuff_warning(const char *, struct query *, const char *, ... ) - __attribute__ ((format (printf, 3, 4))) +void stuff_warning(const char *, + struct query *, + const char *pfx, + const char *fmt, ...) + __attribute__ ((format (printf, 4, 5))) ; #else void stuff_warning(); diff --git a/po/de.po b/po/de.po index 02d36929..2b9ff148 100644 --- a/po/de.po +++ b/po/de.po @@ -2,17 +2,17 @@ # German Messages for fetchmail. # Copyright (C) 2001, 2005, 2006 Free Software Foundation, Inc. # Michael Piefel , 2001, 2002, 2003. -# Matthias Andree , 2004 - 2013 +# Matthias Andree , 2004 - 2014 # msgid "" msgstr "" "Project-Id-Version: fetchmail 6.3.26\n" "Report-Msgid-Bugs-To: fetchmail-devel@lists.berlios.de\n" -"POT-Creation-Date: 2013-04-23 23:24+0200\n" -"PO-Revision-Date: 2013-04-23 23:33+0200\n" +"POT-Creation-Date: 2014-05-20 21:56+0200\n" +"PO-Revision-Date: 2014-05-20 21:58+0200\n" "Last-Translator: Matthias Andree \n" "Language-Team: Deutsch \n" -"Language: \n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -64,8 +64,8 @@ msgid "krb5_sendauth: %s [server says '%s']\n" msgstr "krb5_sendauth: %s [Server sagt „%s“]\n" #: driver.c:345 -msgid "Subject: Fetchmail oversized-messages warning" -msgstr "Subject: Fetchmail-Warnung: übergroße Nachrichten" +msgid "Fetchmail oversized-messages warning" +msgstr "Fetchmail-Warnung: übergroße Nachrichten" #: driver.c:349 #, c-format @@ -199,8 +199,8 @@ msgid "timeout after %d seconds.\n" msgstr "Zeitüberschreitung nach %d Sekunden.\n" #: driver.c:926 -msgid "Subject: fetchmail sees repeated timeouts" -msgstr "Subject: fetchmail erlebt wiederholte Zeitüberschreitungen" +msgid "fetchmail sees repeated timeouts" +msgstr "fetchmail erlebt wiederholte Zeitüberschreitungen" #: driver.c:929 #, c-format @@ -288,8 +288,8 @@ msgstr "" #: driver.c:1201 #, c-format -msgid "Subject: fetchmail authentication failed on %s@%s" -msgstr "Subject: Fetchmail: Authentifikation fehlgeschlagen bei %s@%s" +msgid "fetchmail authentication failed on %s@%s" +msgstr "Fetchmail: Authentifikation fehlgeschlagen bei %s@%s" #: driver.c:1205 #, c-format @@ -373,8 +373,8 @@ msgstr "Authentifikation OK bei %s@%s\n" #: driver.c:1276 #, c-format -msgid "Subject: fetchmail authentication OK on %s@%s" -msgstr "Subject: Fetchmail: Authentifikation OK bei %s@%s" +msgid "fetchmail authentication OK on %s@%s" +msgstr "Fetchmail: Authentifikation OK bei %s@%s" #: driver.c:1280 #, c-format @@ -2920,13 +2920,9 @@ msgstr "LMTP-Auslieferungsfehler bei EOM\n" msgid "Unexpected non-503 response to LMTP EOM: %s\n" msgstr "Unerwartete Nicht-503-Erwiderung auf LMTP EOM: %s\n" -#: sink.c:1620 -msgid "" -"-- \n" -"The Fetchmail Daemon" -msgstr "" -"-- \n" -"Der Fetchmail-Dämon" +#: sink.c:1623 +msgid "The Fetchmail Daemon" +msgstr "Der Fetchmail-Dämon" #: smtp.c:81 msgid "ESMTP CRAM-MD5 Authentication...\n" diff --git a/sink.c b/sink.c index 5d92556f..7b1226f3 100644 --- a/sink.c +++ b/sink.c @@ -1562,12 +1562,12 @@ int open_warning_by_mail(struct query *ctl) else /* send to postmaster */ status = open_sink(ctl, &reply, &good, &bad); if (status == 0) { - stuff_warning(NULL, ctl, "From: FETCHMAIL-DAEMON@%s", + stuff_warning(NULL, ctl, "From: ", "FETCHMAIL-DAEMON@%s", ctl->smtpaddress ? ctl->smtpaddress : fetchmailhost); - stuff_warning(NULL, ctl, "Date: %s", rfc822timestamp()); - stuff_warning(NULL, ctl, "MIME-Version: 1.0"); - stuff_warning(NULL, ctl, "Content-Transfer-Encoding: 8bit"); - stuff_warning(NULL, ctl, "Content-Type: text/plain; charset=\"%s\"", iana_charset); + stuff_warning(NULL, ctl, "Date: ", "%s", rfc822timestamp()); + stuff_warning(NULL, ctl, "MIME-Version: ", "1.0"); + stuff_warning(NULL, ctl, "Content-Transfer-Encoding: ", "8bit"); + stuff_warning(NULL, ctl, "Content-Type: ", "text/plain; charset=\"%s\"", iana_charset); } return(status); } @@ -1577,19 +1577,22 @@ int open_warning_by_mail(struct query *ctl) * a header line) as per RFC-2047 using rfc2047charset as the character * set field */ #if defined(HAVE_STDARG_H) -void stuff_warning(const char *rfc2047charset, struct query *ctl, const char *fmt, ... ) +void stuff_warning(const char *rfc2047charset, struct query *ctl, const char *pfx, const char *fmt, ... ) #else -void stuff_warning(rfc2047charset, ctl, fmt, va_alist) +void stuff_warning(rfc2047charset, ctl, pfx, fmt, va_alist) const char *charset; +const char *pfx; /* constant, non-translated prefix (such as "Subject: ") */ struct query *ctl; const char *fmt; /* printf-style format */ va_dcl #endif { /* make huge -- i18n can bulk up error messages a lot */ - char buf[2*MSGBUFSIZE+4]; + char buf[3*MSGBUFSIZE+4]; va_list ap; + snprintf(buf, sizeof(buf), "%s", pfx); + /* * stuffline() requires its input to be writeable (for CR stripping), * so we needed to copy the message to a writeable buffer anyway in @@ -1601,7 +1604,7 @@ va_dcl #else va_start(ap); #endif - vsnprintf(buf, sizeof(buf) - 2, fmt, ap); + vsnprintf(buf+strlen(buf), sizeof(buf)-strlen(buf)-2, fmt, ap); va_end(ap); snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "\r\n"); @@ -1617,7 +1620,7 @@ va_dcl void close_warning_by_mail(struct query *ctl, struct msgblk *msg) /* sign and send mailed warnings */ { - stuff_warning(NULL, ctl, GT_("-- \nThe Fetchmail Daemon")); + stuff_warning(NULL, ctl, "-- \n", GT_("The Fetchmail Daemon")); close_sink(ctl, msg, TRUE); } -- cgit v1.2.3