aboutsummaryrefslogtreecommitdiff
path: root/mail/asmail
diff options
context:
space:
mode:
authorRene Ladan <rene@FreeBSD.org>2012-04-29 19:14:22 +0000
committerRene Ladan <rene@FreeBSD.org>2012-04-29 19:14:22 +0000
commitee1b3a5824dd0a41d45befaeb5889a79c2a0edbc (patch)
treec416fed1b5d5d017bf25094bc18d7eef719900e4 /mail/asmail
parent55bd5d7605091e25831dc61986cd11b3543567c7 (diff)
downloadports-ee1b3a5824dd0a41d45befaeb5889a79c2a0edbc.tar.gz
ports-ee1b3a5824dd0a41d45befaeb5889a79c2a0edbc.zip
- Fix fetching mail via IMAP from Gmail and other providers.
- Bump PORTREVISION PR: ports/154254 Submitted by: G. Paul Ziemba [p-fbsd-bugs ziemba!us]
Notes
Notes: svn path=/head/; revision=295687
Diffstat (limited to 'mail/asmail')
-rw-r--r--mail/asmail/Makefile2
-rw-r--r--mail/asmail/files/patch-globals.h14
-rw-r--r--mail/asmail/files/patch-imap.c32
3 files changed, 47 insertions, 1 deletions
diff --git a/mail/asmail/Makefile b/mail/asmail/Makefile
index 4c34e25a57d3..17c60ddfa407 100644
--- a/mail/asmail/Makefile
+++ b/mail/asmail/Makefile
@@ -7,7 +7,7 @@
PORTNAME= asmail
PORTVERSION= 2.1
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= mail afterstep
MASTER_SITES= http://www.tigr.net/afterstep/download/asmail/
diff --git a/mail/asmail/files/patch-globals.h b/mail/asmail/files/patch-globals.h
new file mode 100644
index 000000000000..da5be836b047
--- /dev/null
+++ b/mail/asmail/files/patch-globals.h
@@ -0,0 +1,14 @@
+--- globals.h.orig 2007-04-09 00:51:09.000000000 -0700
++++ globals.h 2011-01-06 22:55:10.000000000 -0800
+@@ -15,7 +15,9 @@
+ #define VERSION "2.1"
+ #define RCFILE ".asmailrc"
+ /* Watch out! The MAX_INPUT_LENGTH must be a multiple of 64! */
+-#define MAX_INPUT_LENGTH 255
++/* Why?? 255 (the original value) is not a multiple of 64. 255 is too small */
++/* for IMAP responses */
++#define MAX_INPUT_LENGTH 4096
+
+ #define pthread_attr_default NULL
+
+--- patch-globals.h ends here --- \ No newline at end of file
diff --git a/mail/asmail/files/patch-imap.c b/mail/asmail/files/patch-imap.c
new file mode 100644
index 000000000000..1afae09b06d4
--- /dev/null
+++ b/mail/asmail/files/patch-imap.c
@@ -0,0 +1,32 @@
+--- imap.c.orig 2007-02-27 10:19:38.000000000 -0800
++++ imap.c 2011-01-06 23:12:58.000000000 -0800
+@@ -138,13 +138,18 @@
+
+ /* connection is open, let's log in */
+
+- sprintf(output, "A000 LOGIN %s %s\r\n", mb->user, mb->pass);
+- WRITE_OUTPUT;
++ sprintf(output, "A000 LOGIN %s %s\r\n", mb->user, mb->pass);
++ WRITE_OUTPUT;
++ while (1) {
+ WAITOK;
++ if (strncmp(input, "A000 ", 5)) /* allow for other tags/untagged */
++ continue;
++
+ if ( strncmp(input, "A000 OK", 7) ) {
+- BYE(STAT_LOGIN);
++ BYE(STAT_LOGIN);
+ }
+ return(STAT_IDLE);
++ }
+ }
+
+
+@@ -287,6 +292,7 @@
+ imap_checkmbox(mb, &s);
+ }
+ } else {
++ mb->status = STAT_RUN;
+ mb->status |= imap_login(mb, &s);
+ mb->status |= imap_checkmbox(mb, &s);
+ mb->status |= imap_goodbye(mb, &s); \ No newline at end of file