fetchmail/fetchmail-6.3.8-smtp_errors.patch
Angel Yankov 9f1d1d27ed Accepting request 1227336 from home:ayankov:branches:server:mail
- Upgrade to 6.5.1 
  * Drop two wolfSSL compile-time checks that were for older 6.4 or for future
    7.0 releases and broke compilation with wolfSSL 5.7.4. 
    Fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282413#c4
  * Use %p instead of non-portable %#p for one wolfSSL-related diagnostic message
    (FreeBSD defines %#p to be %p, on many other platforms it's undefined 
    behavior).
  * Add regex_helper.c to list of files that contain translatable strings,
    which contains two strings we missed to translate.
  * Simplify EVP_MD_fetch API detection ("like OpenSSL 3" vs. "like OpenSSL 1") 
    for version switch and base it on the claimed OpenSSL version of the crypto 
    SSL, which works for LibreSSL (claims OpenSSL 2) and wolfSSL alike.
  * Several translations added
  - Rebased fetchmail-6.3.8-smtp_errors.patch
  - Rebased fetchmail-FAQ-list-gmail-options-including-oauthbearer-and-app.patch
  - Rebased fetchmail-add-contrib-fetchnmail-oauth2.py-token-acquisition-u.patch
  - Rebased fetchmail-add-imap-oauthbearer-support.patch
  - Rebased fetchmail-add-passwordfile-and-passwordfd-options.patch
  - Rebased fetchmail-add-query_to64_outsize-utility-function.patch
  - Rebased fetchmail-bump-max-passwordlen-to-1bytes.patch
  - Rebased fetchmail-give-each-ctl-it-s-own-copy-of-password.patch
  - Rebased fetchmail-increase-max-password-length-to-handle-oauth-tokens.patch
  - Rebased fetchmail-re-read-passwordfile-on-every-poll.patch
  - Rebased fetchmail-support-oauthbearer-xoauth2-with-pop3.patch
  - Rebased fetchmailconf-no-more-future.patch

OBS-URL: https://build.opensuse.org/request/show/1227336
OBS-URL: https://build.opensuse.org/package/show/server:mail/fetchmail?expand=0&rev=159
2024-11-29 14:58:57 +00:00

42 lines
1.6 KiB
Diff

# Patches fetchmail's behaviour for SMTP servers which:
# 1) insist on using TLS - we do not want messages which cannot
# be sent due to server negotiation problems lost - rather we
# keep them on the mailserver. As users should realize rather
# quickly that something went wrong, the overhead shouldn't
# be considered that important.
# 2) use the 501 error code to mark spam - in such a case
# the 'antispam' option should be used
Index: fetchmail-6.5.1/sink.c
===================================================================
--- fetchmail-6.5.1.orig/sink.c
+++ fetchmail-6.5.1/sink.c
@@ -526,6 +526,19 @@ static int handle_smtp_report(struct que
free(responses[0]);
return(PS_TRANSIENT);
+ case 501: /* Syntax error in parameters or arguments */
+ /*
+ * Some SMTP servers use this error code to refuse spam, however
+ * as we don't want to delete message if e.g. the address is (possibly
+ * by mistake) malformed, user has to use the 'antispam' option to
+ * treat this as spam symptom
+ */
+ free(responses[0]);
+ if (outlevel > O_SILENT)
+ report_complete(stdout,
+ GT_(" SMTP 501 error - if the server uses this code to report spam, include '501' in the 'antispam' option .\n"));
+ return(PS_TRANSIENT);
+
default:
/* bounce non-transient errors back to the sender */
if (smtperr >= 500 && smtperr <= 599)
@@ -591,7 +604,7 @@ static int handle_smtp_report_without_bo
case 553: /* invalid sending domain */
return(PS_REFUSED);
- default:
+ default:
/* bounce non-transient errors back to the sender */
if (smtperr >= 500 && smtperr <= 599)
return(PS_SUCCESS);