Accepting request 991826 from home:mcepl:branches:server:mail

- Update to 6.4.32:
  * Use configure to find rst2html, some systems install it only
    with .py suffix, others only without, and some install both.
  * Update README.maintainer
  * Translations updated.
- Reapplied patches
- Add 44-uncorrupt_runfetchmail.patch to clean up some contrib/
  scripts (gl#fetchmail/fetchmail#44).

OBS-URL: https://build.opensuse.org/request/show/991826
OBS-URL: https://build.opensuse.org/package/show/server:mail/fetchmail?expand=0&rev=137
This commit is contained in:
David Anes 2022-08-01 07:35:53 +00:00 committed by Git OBS Bridge
parent da873517b9
commit d3007028df
20 changed files with 270 additions and 206 deletions

View File

@ -0,0 +1,126 @@
From 74d986faab60fd1fa202ee973cc345ec7b2639ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= <mcepl@cepl.eu>
Date: Sat, 30 Jul 2022 21:36:43 +0200
Subject: [PATCH] Run contrib/runfetchmail through shellcheck and remove
obvious corruption.
---
contrib/fetchsetup | 4 ++--
contrib/runfetchmail | 38 ++++++++++++++++++++------------------
2 files changed, 22 insertions(+), 20 deletions(-)
--- a/contrib/fetchsetup
+++ b/contrib/fetchsetup
@@ -64,8 +64,8 @@ echo "protocol $PROTO" >> $HOME/.fetchma
echo 'username "'$USR'"' >> $HOME/.fetchmailrc
echo 'password "'$PASS'"' >> $HOME/.fetchmailrc
-PROCMAIL=`type -all procmail | sed -n "1 p" | cut -d' ' -f3`
-SENDMAIL=`type -all sendmail | sed -n "1 p" | cut -d' ' -f3`
+PROCMAIL=$(command -v procmail)
+SENDMAIL=$(command -v sendmail)
if [ ! "$PROCMAIL" = "" ]; then
echo 'mda "'$PROCMAIL -d %s'"' >> $HOME/.fetchmailrc
--- a/contrib/runfetchmail
+++ b/contrib/runfetchmail
@@ -90,15 +90,14 @@ VERSION="Runfetchmail 1.1"
# Trap errors
trap "rm -f $TMP; echo ""Exiting at user request"" ; \
-test $TIMER -eq 1 &amp;&amp; timer -stop -id $$ &gt;/dev/null; exit 1" \
-2 3 4 15
+test $TIMER -eq 1 && timer -stop -id $$ >/dev/null; exit 1" ING QUIT ILL TERM
# Source the user's rc file if it exists
-test -e $HOME/.runfetchmailrc &amp;&amp; . $HOME/.runfetchmailrc
+test -e $HOME/.runfetchmailrc && . $HOME/.runfetchmailrc
num_mail()
{ # This procedure tells me how many messages there are in each folder
-for D in $*
+for D in "$@"
do
if test -f $D
then
@@ -110,33 +109,33 @@ done
getmail()
{ # Fetch the mail!
-test $TIMER -eq 1 &amp;&amp; timer -start -id $$ -quiet
+test $TIMER -eq 1 && timer -start -id $$ -quiet
-$FETCHMAIL $@
+$FETCHMAIL "$@"
# pause for a short while
echo "Now sleeping for $LATENT seconds..."
echo -n "Zzz...Zzz...Zzz..."
sleep $LATENT
-echo "wakeup time! &lt;yawn&gt;"
+echo "wakeup time! <yawn<"
}
stats()
{ # Prepare the statistics
# Ensure we have a log file
-test ! -e $LOG &amp;&amp; touch $LOG
+test ! -e $LOG && touch $LOG
-echo -e "\n\t\t\t $VERSION Statistics"
-test $MAILSTAT -eq 1 &amp;&amp; mailstat -k &lt;$LOG
+printf "\n\t\t\t $VERSION Statistics"
+test $MAILSTAT -eq 1 && mailstat -k <$LOG
echo ""
num_mail $FOLDERS
-test $TIMER -eq 1 &amp;&amp; echo -e "\n`timer -stop -id $$ -quiet` have elapsed."
+test $TIMER -eq 1 && printf "\n`timer -stop -id $$ -quiet` have elapsed."
}
prepmail()
{ # Let's prepare our e-mail
-cat &lt;&lt;EOF &gt;$TMP
+cat <<EOF >$TMP
From: $LOGNAME ($VERSION)
To: $LOGNAME
X-Loop: $SELF
@@ -152,10 +151,12 @@ rm -f $LOG
clear
# Create and secure the temporary file
-test $E_MAIL -eq 1 &amp;&amp; { cat /dev/null &gt;$TMP; chmod 600 $TMP }
+test $E_MAIL -eq 1 && {
+ cat /dev/null <$TMP; chmod 600 $TMP
+}
# Prepare the e-mail before the logs are added to it
-test $E_MAIL -eq 1 &amp;&amp; prepmail
+test $E_MAIL -eq 1 && prepmail
# See if we are downloading every message or not
if test "$1" = "-every"
@@ -165,18 +166,19 @@ then
fi
# Fetch the mail and have the output written to stdout and (optionally) $TMP
-test $E_MAIL -eq 1 &amp;&amp; getmail $@ 2&gt;&amp;1 |tee -a $TMP || getmail $@
+test $E_MAIL -eq 1 && getmail "$@" 2<&1 |tee -a $TMP || getmail "$@"
clear
# Do the same thing with the statistics
-test $E_MAIL -eq 1 &amp;&amp; stats $@ 2&gt;&amp;1 |tee -a $TMP || stats $@
+test $E_MAIL -eq 1 && stats "$@" 2<&1 |tee -a $TMP || stats "$@"
# Now send $TMP to myself and clean up the mess
-test $E_MAIL -eq 1 &amp;&amp; { cat $TMP |$SENDMAIL; rm -f $TMP }
+test $E_MAIL -eq 1 && {
+ cat "$TMP|$SENDMAIL"; rm -f "$TMP"
+}
# cleanup the log file for next time
rm -f $LOG
# The End
-

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:904bf9247054df8e91b47b1a9fe15a31dda8478c25b5291da0424653744a28f7
size 1332264

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE3EplW9mTzUhx+oIQ5BKxVu/zhVoFAmLSqQMACgkQ5BKxVu/z
hVrjsA/+I8V87c81U2FUpfD08h0SQFJVyTC7+kNt6kHt8T5rh0Nvh9F3mhyLefkJ
aPVwVECFRAJxxiPyOFhYWVU8lpvOD0tKFFZ91h3IVEAQDWqynlVozQ8T6UWw0T1u
UUkrb3vVgBDvi3x06cVFthJ+rxbxDy+hPIt+rYX96HSeVSWQGy0jEmBHofAWwYMH
//dHySnKlvb53sUb8YtI43b+w+3uLgCual7UdovtSydSM1c3RhKjeqjgLgk1ncx6
S8am+1zLBIU4AKIl9SHsuD6kBszOEJBvVVmcn+C+vBIut6MLaHFvghROsdpyoHll
NzoyyTmOkqbF1ElUvkgqL27uOzhvdKk7SWSH4UIvshfk4I6mXybazplvV7fRM9cb
JYHp4CGQGJw32yg2FgPbGOgBhb0UvDljtdI39QeC6r8f8XY2WAFchfH+ovv6kcro
7HGEt4JE4QApdeoysthapGvRIZNQlsZ8vykCzoHDgJnJrMyaiLJEhD+gFywLeICn
YO4fHoZyFL8uBvG5JU3qn6HuIryu90Celhf0d4myMGHtHmDx/tDfbKdVlxrJv7Ox
h47TIrOnjz94bOnydvLhtx5avnuJuUTDBzgftXaovBXhIRP3UAmOKFWMw+/jKgER
lcnfVfKIAPkvXPT27khXu2oU/QUU3dsdz3NfzoUfupZLNi3vfOU=
=79QY
-----END PGP SIGNATURE-----

3
fetchmail-6.4.32.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3ee7444665606ad06fb5f7b15f91e3173b845bc98b646b1a4514a46aa48b7228
size 1427072

View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE3EplW9mTzUhx+oIQ5BKxVu/zhVoFAmLlCKMACgkQ5BKxVu/z
hVoDvw//R55gzSl+eHP34KkVs+W47VQdjZDvVWuk4WfXEFoTzu/F/dX1z/mxYV96
5nfo233Dly11bbaIFGD5fOB3fiffhr0xz0e6qaCEHZ+jjDCDtnJ8hAPL2gi90piu
FhMKvr4/tKglPVHp0FoiLS2eEc8XEceGKE3QYzuLbKyRfZxt/xwSEdzzvBjM+GoH
bF2qMCTmtUb9GxmDE2KzdrndCrwOK9tlT4GFpqjqsjvGwUmtlzMTFrYMtyaQaPX5
5IqMMaazzeSDjgjgbpQD7Sj4ZPAUZjSMry4UJn2m2ImqqGSM1pTAb4fyIJMIHtU1
I0JsyapEcE6o+FmEjNB18DHVlW+DeEUc3NcS9UBlXc9QuQbTqJeztDMsIqN9a9HU
kIYoZACpwYzB0ynpOsNqkxn7ObCzEzm5Kr1Cq2ULFG5zAdv4bojvbMPECUKk6XYb
uIOSat1MuZWVbMMSrumAHi/SgmdfwNKdbDmqUKIcB4WiKFC54ABGGt5eZw4ZFIPl
JQe8pLhKcQ418ks4AHA+gz68Ki8B2zw2Zv/7x6Ngw9Yo6TSrkvFzDHDVG0XhReI7
Vt6kgLrLXKQhjUYcsqwdGTnSUO5zuqQKfu1dwC2eEQD7XfCDAQC1Q1jQWWfMsO1J
oNfEDR+ZpFSCWpoRBKhF/aHqvC2bi+rClw2yMJ8z+3yOYGh0AXo=
=xnsL
-----END PGP SIGNATURE-----

View File

@ -5,14 +5,12 @@ Git-repo: https://gitlab.com/fetchmail/fetchmail.git
Git-commit: dbeee6a0c0fc5392953f38d6f0dcffdeeb8ae141
---
fetchmail-FAQ.html | 24 +++++++++++++++++++++---
fetchmail-FAQ.html | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/fetchmail-FAQ.html b/fetchmail-FAQ.html
index 82dd92df..027dc9da 100644
--- a/fetchmail-FAQ.html
+++ b/fetchmail-FAQ.html
@@ -2004,9 +2004,27 @@ sites.)</p>
@@ -1949,9 +1949,27 @@ sites.)</p>
<p>Google has started pushing towards more complex authentication
schemes based on OAuth 2.0 that require clients and users
to jump through quite a few hoops, and use web browsers for signing in.
@ -43,6 +41,3 @@ index 82dd92df..027dc9da 100644
browsing capabilities or heavy-weight libraries is "less secure" as
Google claims.</p>
--
2.31.1

View File

@ -598,7 +598,7 @@ Git-commit: c82625858682eb2396b6a49da79e403c6f2b018b
+ main(sys.argv)
--- a/fetchmail.man
+++ b/fetchmail.man
@@ -1062,7 +1062,8 @@ External tools are necessary to obtain
@@ -1073,7 +1073,8 @@ External tools are necessary to obtain
such tokens. Access tokens often expire fairly quickly (e.g. 1 hour),
and new ones need to be generated from renewal tokens, so the
"passwordfile", "passwordfd", or "pwmd_*" options may be useful. See the

View File

@ -10,17 +10,15 @@ When configured, it will also fall back on trying xoauth2.
conf.c | 2 +
fetchmail.c | 3 +
fetchmail.h | 2 +
fetchmail.man | 23 +++++++++++-
fetchmail.man | 26 +++++++++++--
fetchmailconf.py | 2 -
imap.c | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
options.c | 2 +
rcfile_l.l | 1
8 files changed, 136 insertions(+), 3 deletions(-)
8 files changed, 137 insertions(+), 5 deletions(-)
Index: fetchmail-6.4.31/conf.c
===================================================================
--- fetchmail-6.4.31.orig/conf.c
+++ fetchmail-6.4.31/conf.c
--- a/conf.c
+++ b/conf.c
@@ -288,6 +288,8 @@ void dump_config(struct runctl *runp, st
stringdump("auth", "otp");
else if (ctl->server.authenticate == A_MSN)
@ -30,10 +28,8 @@ Index: fetchmail-6.4.31/conf.c
#ifdef HAVE_RES_SEARCH
booldump("dns", ctl->server.dns);
Index: fetchmail-6.4.31/fetchmail.c
===================================================================
--- fetchmail-6.4.31.orig/fetchmail.c
+++ fetchmail-6.4.31/fetchmail.c
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -1783,6 +1783,9 @@ static void dump_params (struct runctl *
case A_SSH:
printf(GT_(" End-to-end encryption assumed.\n"));
@ -44,10 +40,8 @@ Index: fetchmail-6.4.31/fetchmail.c
}
if (ctl->server.principal != (char *) NULL)
printf(GT_(" Mail service principal is: %s\n"), ctl->server.principal);
Index: fetchmail-6.4.31/fetchmail.h
===================================================================
--- fetchmail-6.4.31.orig/fetchmail.h
+++ fetchmail-6.4.31/fetchmail.h
--- a/fetchmail.h
+++ b/fetchmail.h
@@ -79,6 +79,7 @@ struct addrinfo;
#define A_SSH 8 /* authentication at session level */
#define A_MSN 9 /* same as NTLM with keyword MSN */
@ -64,11 +58,9 @@ Index: fetchmail-6.4.31/fetchmail.h
#define PASSWORDLEN 256 /* max password length */
#define DIGESTLEN 33 /* length of MD5 digest */
Index: fetchmail-6.4.31/fetchmail.man
===================================================================
--- fetchmail-6.4.31.orig/fetchmail.man
+++ fetchmail-6.4.31/fetchmail.man
@@ -1004,7 +1004,7 @@ AUTHENTICATION below for details). The
--- a/fetchmail.man
+++ b/fetchmail.man
@@ -1006,7 +1006,7 @@ AUTHENTICATION below for details). The
\&\fBpassword\fP, \fBkerberos_v5\fP, \fBkerberos\fP (or, for
excruciating exactness, \fBkerberos_v4\fP), \fBgssapi\fP,
\fBcram\-md5\fP, \fBotp\fP, \fBntlm\fP, \fBmsn\fP (only for POP3),
@ -77,7 +69,7 @@ Index: fetchmail-6.4.31/fetchmail.man
When \fBany\fP (the default) is specified, fetchmail tries
first methods that do not require a password (EXTERNAL, GSSAPI, KERBEROS\ IV,
KERBEROS\ 5); then it looks for methods that mask your password
@@ -1029,8 +1029,24 @@ authentication. This option does not wo
@@ -1031,8 +1031,24 @@ authentication. This option does not wo
in line with RFC-2743 and IANA registrations, see
.UR https://www.iana.org/assignments/gssapi-service-names/
Generic Security Service Application Program Interface (GSSAPI)/Kerberos/Simple
@ -104,7 +96,7 @@ Index: fetchmail-6.4.31/fetchmail.man
.SS Miscellaneous Options
.TP
.B \-f <pathname> | \-\-fetchmailrc <pathname>
@@ -2323,7 +2339,9 @@ Legal protocol identifiers for use with
@@ -2325,7 +2341,9 @@ Legal protocol identifiers for use with
.PP
Legal authentication types are 'any', 'password', 'kerberos',
\&'kerberos_v4', 'kerberos_v5' and 'gssapi', 'cram\-md5', 'otp', 'msn'
@ -115,10 +107,8 @@ Index: fetchmail-6.4.31/fetchmail.man
The 'password' type specifies
authentication by normal transmission of a password (the password may be
plain text or subject to protocol-specific encryption as in CRAM-MD5);
Index: fetchmail-6.4.31/fetchmailconf.py
===================================================================
--- fetchmail-6.4.31.orig/fetchmailconf.py
+++ fetchmail-6.4.31/fetchmailconf.py
--- a/fetchmailconf.py
+++ b/fetchmailconf.py
@@ -500,7 +500,7 @@ defaultports = {"auto":None,
"ODMR":"odmr"}
@ -128,10 +118,8 @@ Index: fetchmail-6.4.31/fetchmailconf.py
listboxhelp = {
'title' : 'List Selection Help',
Index: fetchmail-6.4.31/imap.c
===================================================================
--- fetchmail-6.4.31.orig/imap.c
+++ fetchmail-6.4.31/imap.c
--- a/imap.c
+++ b/imap.c
@@ -26,6 +26,10 @@
#define IMAP4 0 /* IMAP4 rev 0, RFC1730 */
#define IMAP4rev1 1 /* IMAP4 rev 1, RFC2060 */
@ -271,10 +259,8 @@ Index: fetchmail-6.4.31/imap.c
/* Yahoo hack - we'll just try ID if it was offered by the server,
* and IGNORE errors. */
{
Index: fetchmail-6.4.31/options.c
===================================================================
--- fetchmail-6.4.31.orig/options.c
+++ fetchmail-6.4.31/options.c
--- a/options.c
+++ b/options.c
@@ -421,6 +421,8 @@ int parsecmdline (int argc /** argument
ctl->server.authenticate = A_ANY;
else if (strcmp(optarg, "msn") == 0)
@ -284,10 +270,8 @@ Index: fetchmail-6.4.31/options.c
else {
fprintf(stderr,GT_("Invalid authentication `%s' specified.\n"), optarg);
errflag++;
Index: fetchmail-6.4.31/rcfile_l.l
===================================================================
--- fetchmail-6.4.31.orig/rcfile_l.l
+++ fetchmail-6.4.31/rcfile_l.l
--- a/rcfile_l.l
+++ b/rcfile_l.l
@@ -106,6 +106,7 @@ cram(-md5)? { SETSTATE(0); yylval.proto
msn { SETSTATE(0); yylval.proto = A_MSN; return AUTHTYPE;}
ntlm { SETSTATE(0); yylval.proto = A_NTLM; return AUTHTYPE;}

View File

@ -5,19 +5,17 @@ Git-repo: https://gitlab.com/fetchmail/fetchmail.git
Git-commit: cdd7182f65734c97723ba5f282040e08d830e650
---
fetchmail.c | 82 +++++++++++++++++++++++++++++++++++++++++++++++++--
fetchmail.h | 2 ++
fetchmail.man | 40 ++++++++++++++++++++++++-
options.c | 16 ++++++++++
rcfile_l.l | 2 ++
rcfile_y.y | 6 ++++
fetchmail.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
fetchmail.h | 2 +
fetchmail.man | 40 +++++++++++++++++++++++++++-
options.c | 16 +++++++++++
rcfile_l.l | 2 +
rcfile_y.y | 6 ++++
6 files changed, 145 insertions(+), 3 deletions(-)
diff --git a/fetchmail.c b/fetchmail.c
index ead6d1f2..0292d42a 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -387,7 +387,7 @@ int main(int argc, char **argv)
@@ -451,7 +451,7 @@ int main(int argc, char **argv)
/* Server won't care what the password is, but there
must be some non-null string here. */
ctl->password = ctl->remotename;
@ -26,7 +24,7 @@ index ead6d1f2..0292d42a 100644
{
netrc_entry *p;
@@ -554,8 +554,81 @@ int main(int argc, char **argv)
@@ -618,8 +618,81 @@ int main(int argc, char **argv)
if (ctl->active && !(implicitmode && ctl->server.skip)
&& !NO_PASSWORD(ctl) && !ctl->password)
{
@ -109,7 +107,7 @@ index ead6d1f2..0292d42a 100644
fprintf(stderr,
GT_("fetchmail: can't find a password for %s@%s.\n"),
ctl->remotename, ctl->server.pollname);
@@ -1000,6 +1073,10 @@ static void optmerge(struct query *h2, struct query *h1, int force)
@@ -1035,6 +1108,10 @@ static void optmerge(struct query *h2, s
FLAG_MERGE(wildcard);
STRING_MERGE(remotename);
STRING_MERGE(password);
@ -120,7 +118,7 @@ index ead6d1f2..0292d42a 100644
STRING_MERGE(mda);
STRING_MERGE(bsmtp);
FLAG_MERGE(listener);
@@ -1064,6 +1141,7 @@ static int load_params(int argc, char **argv, int optind)
@@ -1099,6 +1176,7 @@ static int load_params(int argc, char **
def_opts.smtp_socket = -1;
def_opts.smtpaddress = (char *)0;
def_opts.smtpname = (char *)0;
@ -128,11 +126,9 @@ index ead6d1f2..0292d42a 100644
def_opts.server.protocol = P_AUTO;
def_opts.server.timeout = CLIENT_TIMEOUT;
def_opts.server.esmtp_name = user;
diff --git a/fetchmail.h b/fetchmail.h
index 22b72827..715cc2d0 100644
--- a/fetchmail.h
+++ b/fetchmail.h
@@ -336,6 +336,8 @@ struct query
@@ -326,6 +326,8 @@ struct query
int wildcard; /* should unmatched names be passed through */
char *remotename; /* remote login name to use */
char *password; /* remote password to use */
@ -141,11 +137,9 @@ index 22b72827..715cc2d0 100644
struct idlist *mailboxes; /* list of mailboxes to check */
/* per-forwarding-target data */
diff --git a/fetchmail.man b/fetchmail.man
index aece716e..9c6ed4ad 100644
--- a/fetchmail.man
+++ b/fetchmail.man
@@ -872,6 +872,37 @@ The default is your login name on the client machine that is running
@@ -949,6 +949,37 @@ The default is your login name on the cl
\fBfetchmail\fP.
See USER AUTHENTICATION below for a complete description.
.TP
@ -183,7 +177,7 @@ index aece716e..9c6ed4ad 100644
.B \-I <specification> | \-\-interface <specification>
(Keyword: interface)
.br
@@ -955,7 +986,8 @@ setting also allows the non-standard "xoauth2" SASL scheme (using
@@ -1040,7 +1071,8 @@ setting also allows the non-standard "xo
the same token) if the server only claims to support "xoauth2".
External tools are necessary to obtain
such tokens. Access tokens often expire fairly quickly (e.g. 1 hour),
@ -193,7 +187,7 @@ index aece716e..9c6ed4ad 100644
oauth2.py script from
.URL https://github.com/google/gmail-oauth2-tools/wiki/OAuth2DotPyRunThrough "Google's Oauth2 Run Through" ,
and other oauth2 documentation. For services like gmail, an "App Password"
@@ -1844,6 +1876,12 @@ T}
@@ -1953,6 +1985,12 @@ T}
pass[word] \& \& T{
Specify remote account password
T}
@ -206,11 +200,9 @@ index aece716e..9c6ed4ad 100644
ssl \& \& T{
Connect to server over the specified base protocol using SSL encryption
T}
diff --git a/options.c b/options.c
index a181c6d9..99b8e020 100644
--- a/options.c
+++ b/options.c
@@ -26,6 +26,8 @@ enum {
@@ -31,6 +31,8 @@ enum {
LA_POSTMASTER,
LA_NOBOUNCE,
LA_AUTH,
@ -219,7 +211,7 @@ index a181c6d9..99b8e020 100644
LA_FETCHDOMAINS,
LA_BSMTP,
LA_LMTP,
@@ -103,6 +105,8 @@ static const struct option longoptions[] = {
@@ -94,6 +96,8 @@ static const struct option longoptions[]
{"port", required_argument, (int *) 0, 'P' },
{"service", required_argument, (int *) 0, 'P' },
{"auth", required_argument, (int *) 0, LA_AUTH},
@ -228,7 +220,7 @@ index a181c6d9..99b8e020 100644
{"timeout", required_argument, (int *) 0, 't' },
{"envelope", required_argument, (int *) 0, 'E' },
{"qvirtual", required_argument, (int *) 0, 'Q' },
@@ -236,6 +240,7 @@ int parsecmdline (int argc /** argument count */,
@@ -261,6 +265,7 @@ int parsecmdline (int argc /** argument
memset(ctl, '\0', sizeof(struct query)); /* start clean */
ctl->smtp_socket = -1;
@ -236,7 +228,7 @@ index a181c6d9..99b8e020 100644
while (!errflag &&
(c = getopt_long(argc,argv,shortoptions,
@@ -407,6 +412,17 @@ int parsecmdline (int argc /** argument count */,
@@ -428,6 +433,17 @@ int parsecmdline (int argc /** argument
errflag++;
}
break;
@ -254,11 +246,9 @@ index a181c6d9..99b8e020 100644
case 't':
ctl->server.timeout = xatoi(optarg, &errflag);
if (ctl->server.timeout == 0)
diff --git a/rcfile_l.l b/rcfile_l.l
index 824845b3..47a37d0f 100644
--- a/rcfile_l.l
+++ b/rcfile_l.l
@@ -115,6 +115,8 @@ pwmd_socket { return PWMD_SOCKET; }
@@ -118,6 +118,8 @@ accept { return ACCEPT; }
reject { return REJECT_; }
user(name)? {SETSTATE(NAME); return USERNAME; }
@ -267,11 +257,9 @@ index 824845b3..47a37d0f 100644
<INITIAL,NAME>pass(word)? {SETSTATE(NAME); return PASSWORD; }
folder(s)? { return FOLDER; }
smtp(host)? { return SMTPHOST; }
diff --git a/rcfile_y.y b/rcfile_y.y
index 815fbd74..3967adb3 100644
--- a/rcfile_y.y
+++ b/rcfile_y.y
@@ -61,6 +61,7 @@ extern char * yytext;
@@ -63,6 +63,7 @@ extern char * yytext;
%token DEFAULTS POLL SKIP VIA AKA LOCALDOMAINS PROTOCOL
%token AUTHENTICATE TIMEOUT KPOP SDPS ENVELOPE QVIRTUAL
%token USERNAME PASSWORD FOLDER SMTPHOST FETCHDOMAINS MDA BSMTP LMTP
@ -279,7 +267,7 @@ index 815fbd74..3967adb3 100644
%token SMTPADDRESS SMTPNAME SPAMRESPONSE PRECONNECT POSTCONNECT LIMIT WARNINGS
%token INTERFACE MONITOR PLUGIN PLUGOUT
%token IS HERE THERE TO MAP
@@ -315,6 +316,8 @@ user_option : TO mapping_list HERE
@@ -307,6 +308,8 @@ user_option : TO mapping_list HERE
| IS STRING THERE {current.remotename = $2;}
| PASSWORD STRING {current.password = $2;}
@ -288,7 +276,7 @@ index 815fbd74..3967adb3 100644
| FOLDER folder_list
| SMTPHOST smtp_list
| FETCHDOMAINS fetch_list
@@ -539,6 +542,7 @@ static void reset_server(const char *name, int skip)
@@ -505,6 +508,7 @@ static void reset_server(const char *nam
trailer = FALSE;
memset(&current,'\0',sizeof(current));
current.smtp_socket = -1;
@ -296,7 +284,7 @@ index 815fbd74..3967adb3 100644
current.server.pollname = xstrdup(name);
current.server.skip = skip;
current.server.principal = (char *)NULL;
@@ -560,6 +564,7 @@ static void user_reset(void)
@@ -526,6 +530,7 @@ static void user_reset(void)
memset(&current, '\0', sizeof(current));
current.smtp_socket = -1;
@ -304,7 +292,7 @@ index 815fbd74..3967adb3 100644
current.server = save;
}
@@ -580,6 +585,7 @@ struct query *hostalloc(struct query *init /** pointer to block containing
@@ -546,6 +551,7 @@ struct query *hostalloc(struct query *in
{
memset(node, '\0', sizeof(struct query));
node->smtp_socket = -1;
@ -312,6 +300,3 @@ index 815fbd74..3967adb3 100644
}
/* append to end of list */
--
2.31.1

View File

@ -5,14 +5,12 @@ Git-repo: https://gitlab.com/fetchmail/fetchmail.git
Git-commit: cc6e146d516140df800da68976eb7c0aa1cef7c0
---
base64.c | 7 +++++++
fetchmail.h | 1 +
base64.c | 7 +++++++
fetchmail.h | 1 +
2 files changed, 8 insertions(+)
Index: fetchmail-6.4.22/base64.c
===================================================================
--- fetchmail-6.4.22.orig/base64.c
+++ fetchmail-6.4.22/base64.c
--- a/base64.c
+++ b/base64.c
@@ -66,6 +66,13 @@ fail:
return rc;
}
@ -27,10 +25,8 @@ Index: fetchmail-6.4.22/base64.c
int from64tobits(void *out_, const char *in, int maxlen)
/* base 64 to raw bytes in quasi-big-endian order, returning count of bytes */
/* maxlen limits output buffer size, set to zero to ignore */
Index: fetchmail-6.4.22/fetchmail.h
===================================================================
--- fetchmail-6.4.22.orig/fetchmail.h
+++ fetchmail-6.4.22/fetchmail.h
--- a/fetchmail.h
+++ b/fetchmail.h
@@ -642,6 +642,7 @@ int prc_filecheck(const char *, const fl
/* base64.c */
unsigned len64frombits(unsigned inlen); /** calculate length needed to encode inlen octets. warnings: 1. caller needs to add 1 for a trailing \0 byte himself. 2. returns 0 for inlen 0! */

View File

@ -5,12 +5,9 @@ Git-repo: https://gitlab.com/fetchmail/fetchmail.git
Git-commit: d52ba9652c9207358e0b9acc11403688f6f16b9e
---
README.OAUTH2 | 147 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
README.OAUTH2 | 147 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 147 insertions(+)
diff --git a/README.OAUTH2 b/README.OAUTH2
new file mode 100644
index 00000000..e861c812
--- /dev/null
+++ b/README.OAUTH2
@@ -0,0 +1,147 @@
@ -161,4 +158,3 @@ index 00000000..e861c812
+* Google links
+ + Google API Dashboard: https://console.developers.google.com/apis/dashboard
+ + Google Cloud Resource Manager: https://console.developers.google.com/cloud-resource-manager

View File

@ -5,14 +5,12 @@ Git-repo: https://gitlab.com/fetchmail/fetchmail.git
Git-commit: 919fd787540c4a3fa4694566edce406df1e42001
---
fetchmail.h | 2 +-
fetchmail.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fetchmail.h b/fetchmail.h
index af4d0dd2..ac248805 100644
--- a/fetchmail.h
+++ b/fetchmail.h
@@ -104,7 +104,7 @@ enum authenticators {
@@ -116,7 +116,7 @@ struct addrinfo;
#define NAMELEN 64 /* max username length */
/* oauth2 access tokens seem to be about 130 characters; make this longer: */
@ -21,4 +19,3 @@ index af4d0dd2..ac248805 100644
#define DIGESTLEN 33 /* length of MD5 digest */
/* exit code values */

View File

@ -5,11 +5,9 @@ Git-repo: https://gitlab.com/fetchmail/fetchmail.git
Git-commit: d52b7b6859d46134b46e6de9b408739b18745d47
---
oauth2.c | 3 ++-
oauth2.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/oauth2.c b/oauth2.c
index a8a324b8..4f7a072a 100644
--- a/oauth2.c
+++ b/oauth2.c
@@ -10,6 +10,7 @@
@ -20,7 +18,7 @@ index a8a324b8..4f7a072a 100644
#include <string.h>
char *get_oauth2_string(struct query *ctl,flag xoauth2)
@@ -52,7 +53,7 @@ char *get_oauth2_string(struct query *ctl,flag xoauth2)
@@ -52,7 +53,7 @@ char *get_oauth2_string(struct query *ct
}
oauth2b64 = (char *)xmalloc(2*strlen(oauth2str)+8);
@ -29,4 +27,3 @@ index a8a324b8..4f7a072a 100644
memset(oauth2str, 0x55, strlen(oauth2str));
free(oauth2str);

View File

@ -10,14 +10,12 @@ the password should prevent accessing freed memory in another copy.
I haven't tested pwmd, but these seem like obvious fixes.
---
fetchmail.c | 12 ++++++++++--
fetchmail.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/fetchmail.c b/fetchmail.c
index 0292d42a..e2828a4f 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -386,7 +386,7 @@ int main(int argc, char **argv)
@@ -450,7 +450,7 @@ int main(int argc, char **argv)
if (NO_PASSWORD(ctl))
/* Server won't care what the password is, but there
must be some non-null string here. */
@ -26,7 +24,7 @@ index 0292d42a..e2828a4f 100644
else if (!ctl->passwordfile && ctl->passwordfd==-1)
{
netrc_entry *p;
@@ -1072,7 +1072,15 @@ static void optmerge(struct query *h2, struct query *h1, int force)
@@ -1107,7 +1107,15 @@ static void optmerge(struct query *h2, s
FLAG_MERGE(wildcard);
STRING_MERGE(remotename);
@ -43,6 +41,3 @@ index 0292d42a..e2828a4f 100644
FLAG_MERGE(passwordfile);
if (force ? h1->passwordfd!=-1 : h2->passwordfd==-1) {
h2->passwordfd = h1->passwordfd;
--
2.31.1

View File

@ -14,14 +14,12 @@ The maximum length of oauth2 access tokens is unbounded.
This simply patches the hard-coded limit to 4096 bytes, but it might
not be sufficient.
---
fetchmail.h | 2 +-
fetchmail.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fetchmail.h b/fetchmail.h
index bebb094d..6ff23919 100644
--- a/fetchmail.h
+++ b/fetchmail.h
@@ -104,7 +104,7 @@ enum authenticators {
@@ -116,7 +116,7 @@ struct addrinfo;
#define NAMELEN 64 /* max username length */
/* oauth2 access tokens seem to be about 130 characters; make this longer: */
@ -30,4 +28,3 @@ index bebb094d..6ff23919 100644
#define DIGESTLEN 33 /* length of MD5 digest */
/* exit code values */

View File

@ -8,14 +8,12 @@ Also allocate the actual needed size instead of an excessively large
approximate size.
---
oauth2.c | 6 ++++--
oauth2.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/oauth2.c b/oauth2.c
index 4f7a072a..addc91aa 100644
--- a/oauth2.c
+++ b/oauth2.c
@@ -34,6 +34,7 @@ char *get_oauth2_string(struct query *ctl,flag xoauth2)
@@ -34,6 +34,7 @@ char *get_oauth2_string(struct query *ct
int oauth2len;
char *oauth2b64;
@ -23,7 +21,7 @@ index 4f7a072a..addc91aa 100644
oauth2len = strlen(ctl->remotename) + strlen(ctl->password) + 32;
oauth2str = (char *)xmalloc(oauth2len);
@@ -52,8 +53,9 @@ char *get_oauth2_string(struct query *ctl,flag xoauth2)
@@ -52,8 +53,9 @@ char *get_oauth2_string(struct query *ct
ctl->password);
}
@ -35,4 +33,3 @@ index 4f7a072a..addc91aa 100644
memset(oauth2str, 0x55, strlen(oauth2str));
free(oauth2str);

View File

@ -5,15 +5,13 @@ Git-repo: https://gitlab.com/fetchmail/fetchmail.git
Git-commit: c2b96715bb39b9cfd1c751eae6b0111bed9c8581
---
fetchmail.c | 101 +++++++++++++++++++++++++++++++++-----------------
fetchmail.man | 9 ++---
2 files changed, 70 insertions(+), 40 deletions(-)
fetchmail.c | 100 ++++++++++++++++++++++++++++++++++++++--------------------
fetchmail.man | 9 +----
2 files changed, 69 insertions(+), 40 deletions(-)
diff --git a/fetchmail.c b/fetchmail.c
index e2828a4f..eb277c28 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -586,48 +586,19 @@ int main(int argc, char **argv)
@@ -650,48 +650,19 @@ int main(int argc, char **argv)
}
ctl->password = xstrdup(msg);
@ -26,25 +24,25 @@ index e2828a4f..eb277c28 100644
- int res;
-
- if (fd == -1) {
- int saveErrno = errno;
- fprintf(stderr,
- GT_("fetchmail: unable to open %s: %s\n"),
- ctl->passwordfile,
- strerror(saveErrno));
- return PS_AUTHFAIL;
- }
-
- res = read(fd, msg, sizeof(msg)-1);
- if (res == -1 || close(fd) == -1) {
+ if (access(ctl->passwordfile, R_OK) != 0) {
int saveErrno = errno;
fprintf(stderr,
- GT_("fetchmail: error reading %s: %s\n"),
- GT_("fetchmail: unable to open %s: %s\n"),
+ GT_("fetchmail: unable to access %s: %s\n"),
ctl->passwordfile,
strerror(saveErrno));
return PS_AUTHFAIL;
}
-
- res = read(fd, msg, sizeof(msg)-1);
- if (res == -1 || close(fd) == -1) {
- int saveErrno = errno;
- fprintf(stderr,
- GT_("fetchmail: error reading %s: %s\n"),
- ctl->passwordfile,
- strerror(saveErrno));
- return PS_AUTHFAIL;
- }
- msg[res] = '\0';
-
- newline = memchr(msg, '\n', res);
@ -67,7 +65,7 @@ index e2828a4f..eb277c28 100644
} else if (!isatty(0)) {
fprintf(stderr,
GT_("fetchmail: can't find a password for %s@%s.\n"),
@@ -643,6 +614,8 @@ int main(int argc, char **argv)
@@ -707,6 +678,8 @@ int main(int argc, char **argv)
ctl->password = xstrdup((char *)fm_getpassword(tmpbuf));
free(tmpbuf);
}
@ -76,7 +74,7 @@ index e2828a4f..eb277c28 100644
}
}
@@ -843,6 +816,65 @@ int main(int argc, char **argv)
@@ -897,6 +870,65 @@ int main(int argc, char **argv)
dofastuidl = 0; /* this is reset in the driver if required */
@ -142,11 +140,9 @@ index e2828a4f..eb277c28 100644
querystatus = query_host(ctl);
if (NUM_NONZERO(ctl->fastuidl))
diff --git a/fetchmail.man b/fetchmail.man
index b6309d40..6b375d89 100644
--- a/fetchmail.man
+++ b/fetchmail.man
@@ -877,12 +877,9 @@ See USER AUTHENTICATION below for a complete description.
@@ -954,12 +954,9 @@ See USER AUTHENTICATION below for a comp
.br
Specifies a file name from which to read the first line to use as the password.
Useful if something changes the password/token often without regenerating a
@ -161,7 +157,7 @@ index b6309d40..6b375d89 100644
.TP
.B \-\-passwordfd <integer>
(Keyword: passwordfd)
@@ -895,7 +892,7 @@ although it could also be a redirected input file
@@ -972,7 +969,7 @@ although it could also be a redirected i
(equivalent to "fetchmail \-\-passwordfd 5 5</path/to/file").
Useful if something wants to manage password ownership more securely
than files, or if the password/token changes often,
@ -170,6 +166,3 @@ index b6309d40..6b375d89 100644
mode passwords requires that standard input is a terminal and disables
echo, but passwordfd does not care. Do not do something
like "echo 'password' | fetchmail ...", since echo's arguments are
--
2.31.1

View File

@ -6,21 +6,19 @@ Git-commit: 7b5c56f0fa3acb4c5589a4747c1921a311d8a464
(Also factor out some common imap/pop3 oauth2 code.)
---
Makefile.am | 2 +-
fetchmail.man | 5 +--
imap.c | 53 +++-------------------
oauth2.c | 61 +++++++++++++++++++++++++
oauth2.h | 6 +++
pop3.c | 122 ++++++++++++++++++++++++++++++++++++++++++++++++--
6 files changed, 196 insertions(+), 53 deletions(-)
Makefile.am | 2
fetchmail.man | 5 --
imap.c | 53 +++--------------------
oauth2.c | 61 +++++++++++++++++++++++++++
oauth2.h | 6 ++
pop3.c | 130 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---
6 files changed, 202 insertions(+), 55 deletions(-)
create mode 100644 oauth2.c
create mode 100644 oauth2.h
Index: fetchmail-6.4.25/Makefile.am
===================================================================
--- fetchmail-6.4.25.orig/Makefile.am
+++ fetchmail-6.4.25/Makefile.am
@@ -68,7 +68,7 @@ fetchmail_SOURCES= fetchmail.h getopt.h
--- a/Makefile.am
+++ b/Makefile.am
@@ -74,7 +74,7 @@ fetchmail_SOURCES= fetchmail.h getopt.h
fetchmail.c env.c idle.c options.c daemon.c \
driver.c transact.c sink.c smtp.c \
idlist.c uid.c mxget.c md5ify.c cram.c gssapi.c \
@ -29,11 +27,9 @@ Index: fetchmail-6.4.25/Makefile.am
unmime.c conf.c checkalias.c uid_db.h uid_db.c\
lock.h lock.c \
rcfile_l.l rcfile_y.y \
Index: fetchmail-6.4.25/fetchmail.man
===================================================================
--- fetchmail-6.4.25.orig/fetchmail.man
+++ fetchmail-6.4.25/fetchmail.man
@@ -1001,7 +1001,7 @@ AUTHENTICATION below for details). The
--- a/fetchmail.man
+++ b/fetchmail.man
@@ -1006,7 +1006,7 @@ AUTHENTICATION below for details). The
\&\fBpassword\fP, \fBkerberos_v5\fP, \fBkerberos\fP (or, for
excruciating exactness, \fBkerberos_v4\fP), \fBgssapi\fP,
\fBcram\-md5\fP, \fBotp\fP, \fBntlm\fP, \fBmsn\fP (only for POP3),
@ -42,7 +38,7 @@ Index: fetchmail-6.4.25/fetchmail.man
When \fBany\fP (the default) is specified, fetchmail tries
first methods that do not require a password (EXTERNAL, GSSAPI, KERBEROS\ IV,
KERBEROS\ 5); then it looks for methods that mask your password
@@ -2340,8 +2340,7 @@ Legal protocol identifiers for use with
@@ -2342,8 +2342,7 @@ Legal protocol identifiers for use with
Legal authentication types are 'any', 'password', 'kerberos',
\&'kerberos_v4', 'kerberos_v5' and 'gssapi', 'cram\-md5', 'otp', 'msn'
(only for POP3), 'ntlm', 'ssh', 'external' (only IMAP),
@ -52,10 +48,8 @@ Index: fetchmail-6.4.25/fetchmail.man
The 'password' type specifies
authentication by normal transmission of a password (the password may be
plain text or subject to protocol-specific encryption as in CRAM-MD5);
Index: fetchmail-6.4.25/imap.c
===================================================================
--- fetchmail-6.4.25.orig/imap.c
+++ fetchmail-6.4.25/imap.c
--- a/imap.c
+++ b/imap.c
@@ -17,6 +17,7 @@
#include <limits.h>
#include <errno.h>
@ -134,10 +128,8 @@ Index: fetchmail-6.4.25/imap.c
return ok;
}
Index: fetchmail-6.4.25/oauth2.c
===================================================================
--- /dev/null
+++ fetchmail-6.4.25/oauth2.c
+++ b/oauth2.c
@@ -0,0 +1,61 @@
+/*
+ * oauth2.c -- oauthbearer and xoauth2 support
@ -200,10 +192,8 @@ Index: fetchmail-6.4.25/oauth2.c
+
+ return oauth2b64;
+}
Index: fetchmail-6.4.25/oauth2.h
===================================================================
--- /dev/null
+++ fetchmail-6.4.25/oauth2.h
+++ b/oauth2.h
@@ -0,0 +1,6 @@
+#ifndef OAUTH2_H
+#define OAUTH2_H
@ -211,10 +201,8 @@ Index: fetchmail-6.4.25/oauth2.h
+char *get_oauth2_string(struct query *ctl,flag xoauth2);
+
+#endif /*OAUTH2_H*/
Index: fetchmail-6.4.25/pop3.c
===================================================================
--- fetchmail-6.4.25.orig/pop3.c
+++ fetchmail-6.4.25/pop3.c
--- a/pop3.c
+++ b/pop3.c
@@ -20,6 +20,7 @@
#include <errno.h>

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Sat Jul 30 19:10:08 UTC 2022 - Matej Cepl <mcepl@suse.com>
- Update to 6.4.32:
* Use configure to find rst2html, some systems install it only
with .py suffix, others only without, and some install both.
* Update README.maintainer
* Translations updated.
- Reapplied patches
- Add 44-uncorrupt_runfetchmail.patch to clean up some contrib/
scripts (gl#fetchmail/fetchmail#44).
-------------------------------------------------------------------
Mon Jul 18 08:26:23 UTC 2022 - David Anes <david.anes@suse.com>

View File

@ -21,7 +21,7 @@
%define _fillupdir %{_localstatedir}/adm/fillup-templates
%endif
Name: fetchmail
Version: 6.4.31
Version: 6.4.32
Release: 0
Summary: Full-Featured POP and IMAP Mail Retrieval Daemon
License: GPL-2.0-or-later
@ -49,8 +49,12 @@ Patch10: fetchmail-oauth2-c-calculate-and-pass-in-correct-buffer-size-to-
Patch11: fetchmail-increase-max-password-length-to-handle-oauth-tokens.patch
Patch12: fetchmail-bump-max-passwordlen-to-1bytes.patch
Patch13: fetchmail-add-readme-oauth2-issue-27.patch
# PATCH-FIX-UPSTREAM 44-uncorrupt_runfetchmail.patch gl#fetchmail/fetchmail#44 mcepl@suse.com
# it seems like the script went through some kind of HTML conversion or something
Patch14: 44-uncorrupt_runfetchmail.patch
BuildRequires: automake
BuildRequires: bison
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: krb5-devel
BuildRequires: openssl-devel
@ -139,6 +143,8 @@ cp sysconfig.%{name} %{buildroot}%{_fillupdir}
mkdir -p %{buildroot}%{_localstatedir}/log
touch %{buildroot}%{_localstatedir}/log/fetchmail
mkdir -p %{buildroot}%{_localstatedir}/lib/fetchmail
# Deduplicate Python files
%fdupes %{buildroot}%{python3_sitelib}
# we don't need this, it's aimed at fetchmail developers
# and rpmlint is complaining that we have a binary in /usr/share
rm -r contrib/gai*