Re: [S-mailx] Duplicate request for password, never succeeds

2017-07-26 Thread Steffen Nurpmeso
Hello Paul.

Paul Vojta  wrote:
 |On Tue, Jul 25, 2017 at 02:55:51PM +0200, Steffen Nurpmeso wrote:
 |> Paul Vojta  wrote:
 |>|On Mon, Jul 24, 2017 at 02:30:44PM +0200, Steffen Nurpmeso wrote:
 |>|> Paul Vojta  wrote:
 ..
 |> So you were in the queue once again. ^.^
 |> I hope it is fine from now on.
 |
 |Yes, I'm getting mail from the list now, and my earlier post made it through
 |OK.

Good.

 |>|>|I have the following problem with the current s-nail
 |>|>|(commit 670aabb6804d94e0fe386c99e2b9ab382a2bb86c):
 |>|>|
 |>|>|% ~/s-nail-git/s-nail -f %:+texlive
 |>|>|vo...@berkeley.edu@imap.gmail.com requires a password: 
 |>|>  ...
 |>|>|s-nail: Could not connect: Network is unreachable
 |>  ..
 |>|> Would you be so kind and verify that the issue goes away if you
 |>|> apply the diff or update to any of
 |>|> [master,stable/{stable,latest,v14.9}]?
 |>|
 |>|Sorry, the problem remains (on origin/master).
 |> 
 |> Ok, i thought you were really talking about the crash that was
 |> caused by this very mysterious (could not have been a) copy+paste
 |> error, but trying once again without an "automatic" password i see
 |> that, whereas folder changes etc. do not require re-entering the
 |> password, performing actions like copying do.  I suspect it is
 |> because we get a mismatch when testing for "same mailbox".  ...
 ...
 |> This should now really be fixed, i have used your .rc template and
 ...
 |
 |Yes, it works now.  Thanks!

Very good.
Ciao!

--steffen
|
|Der Kragenbaer,The moon bear,
|der holt sich munter   he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
__
S-nail-users@lists.sourceforge.net


Re: [S-mailx] Duplicate request for password, never succeeds

2017-07-26 Thread Paul Vojta
On Tue, Jul 25, 2017 at 02:55:51PM +0200, Steffen Nurpmeso wrote:
> Hello Paul.
> 
> Paul Vojta  wrote:
>  |On Mon, Jul 24, 2017 at 02:30:44PM +0200, Steffen Nurpmeso wrote:
>  |> Paul Vojta  wrote:
>  |> 
>  |> First of all i am sorry that you were in the queue, your address
>  |> was (and is still) listed in "List of non-member addresses whose
>  |> postings should be automatically accepted" as well as "List of
>  |> addresses (or regexps) whose subscriptions do not require
>  |> approval", so this i do not understand.  (Except that the
>  |> "moderated" bit for new members is by default on.  Well.)
>  |
>  |Probably it's because v*@math.b*.edu is an alias for v*@b*.edu, and emails
>  |go out with both addresses in various parts of the mail header.  I've had
>  |this problem with other mailing lists too, but I forgot about it when
>  |subscribing to this one.  You may have noticed I unsubscribed and subscribed
>  |again just now using the "real" address.  That should fix it.
> 
> So you were in the queue once again. ^.^
> I hope it is fine from now on.

Yes, I'm getting mail from the list now, and my earlier post made it through
OK.

>  |>|I have the following problem with the current s-nail
>  |>|(commit 670aabb6804d94e0fe386c99e2b9ab382a2bb86c):
>  |>|
>  |>|% ~/s-nail-git/s-nail -f %:+texlive
>  |>|vo...@berkeley.edu@imap.gmail.com requires a password: 
>  |>  ...
>  |>|s-nail: Could not connect: Network is unreachable
>  ..
>  |> Would you be so kind and verify that the issue goes away if you
>  |> apply the diff or update to any of
>  |> [master,stable/{stable,latest,v14.9}]?
>  |
>  |Sorry, the problem remains (on origin/master).
> 
> Ok, i thought you were really talking about the crash that was
> caused by this very mysterious (could not have been a) copy+paste
> error, but trying once again without an "automatic" password i see
> that, whereas folder changes etc. do not require re-entering the
> password, performing actions like copying do.  I suspect it is
> because we get a mismatch when testing for "same mailbox".  ...
> 
> Oh yes.  That is an IMAP fallout of the new possibility to specify
> and fixate a mailbox type by using a proto:// prefix.  I see now,
> we replaced any (the imaps://) prefix with imap://, so that the
> mentioned mismatch occurred.  I have tested the reinstantiation
> locally with dovecot and only without SSL.  I am sorry for that.
> 
> This should now really be fixed, i have used your .rc template and
> copied around a bit on my Google test account.  On [master] etc.
> Thanks for reporting and insisting, Paul.

Yes, it works now.  Thanks!

Paul

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
__
S-nail-users@lists.sourceforge.net


Re: [S-mailx] Duplicate request for password, never succeeds

2017-07-25 Thread Steffen Nurpmeso
i wrote:
 |Paul Vojta  wrote:
 ||On Mon, Jul 24, 2017 at 02:30:44PM +0200, Steffen Nurpmeso wrote:
 ||> Paul Vojta  wrote:
 ...
 ||>|I have the following problem with the current s-nail
 ...
 ||>|% ~/s-nail-git/s-nail -f %:+texlive
 ||>|vo...@berkeley.edu@imap.gmail.com requires a password: 
 ||>  ...
 ||>|s-nail: Could not connect: Network is unreachable
 ...
 ||Sorry, the problem remains (on origin/master).
 ...
 |Oh yes.  That is an IMAP fallout of the new possibility to specify
 ...

Now i have again forgotten the patch!  It on [master] etc.  Sorry.

--steffen
|
|Der Kragenbaer,The moon bear,
|der holt sich munter   he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)
commit 33b2834f
Author: Steffen (Daode) Nurpmeso 
AuthorDate: 2017-07-25 14:32:03 +0200
Commit: Steffen (Daode) Nurpmeso 
CommitDate: 2017-07-25 14:42:34 +0200

FIX [81d7f4d8] (IMAP: try (hard) to reinstantiate..) (Paul Vojta)..

Another fallout of IMAP reinstantiation.
We have extended support for proto:// prefixes so that users can
now say, e.g., "? copy 1 maildir:///tmp/nonexistent.mdir" and that
thing will be newly created as necessary, and also the operation
will fail shall it exist but not be something that looks like
a valid Maildir.

Of course all this is a hack, because i refrained from doing it
right from the start and add global bypasses and carriers, but
continued to use the brain-damaged "pass strings all through, tear
them apart and join them as necessary" even though i knew from the
start that this looses information.  We should: parse user input,
create objects, and keep their instances as long as the operation
they are involved in lingers around.  Here: URL.  Anyway.

This error now was that we splitted off the protocol (Paul's
example was imaps://) first, followed by simply reassigning
imap:// because we did not know any better afterwards, and that in
turn results in a "is-same-host" mismatch because of the protocol
prefix (which is also wrong, but especially so if we would degrade
an already secure channel, but that is a different story).
---
 cmd-write.c | 1 +
 folder.c| 4 +++-
 popen.c | 4 ++--
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/cmd-write.c b/cmd-write.c
index 2139e131..bf0ee695 100644
--- a/cmd-write.c
+++ b/cmd-write.c
@@ -146,6 +146,7 @@ save1(char *str, int domark, char const *cmd, struct n_ignore const *itp,
   n_perr(file, 0);
   goto jleave;
}
+
 #if defined HAVE_POP3 && defined HAVE_IMAP
if(mb.mb_type == MB_POP3 && (fs & n_PROTO_MASK) == n_PROTO_IMAP){
   Fclose(obuf);
diff --git a/folder.c b/folder.c
index f78dbba4..03b448e0 100644
--- a/folder.c
+++ b/folder.c
@@ -64,7 +64,9 @@ _update_mailname(char const *name) /* TODO 2MUCH work, cache, prop of Object! */
if(name != NULL){
 #ifdef HAVE_REALPATH
   char const *adjname;
-  enum protocol p = which_protocol(name, TRU1, TRU1, );
+  enum protocol p;
+
+  p = which_protocol(name, TRU1, TRU1, );
 
   if(p == PROTO_FILE || p == PROTO_MAILDIR){
  name = adjname;
diff --git a/popen.c b/popen.c
index c71db6c9..d51c9a5e 100644
--- a/popen.c
+++ b/popen.c
@@ -563,14 +563,14 @@ n_fopen_any(char const *file, char const *oflags, /* TODO should take flags */
 
/* We don't want to find mbox.bz2 when doing "copy * mbox", but only for
 * "file mbox", so don't try hooks when writing */
-   p = which_protocol(file, TRU1, ((omode & W_OK) == 0), );
+   p = which_protocol(csave = file, TRU1, ((omode & W_OK) == 0), );
fs = (enum n_fopen_state)p;
switch(p){
default:
   goto jleave;
case n_PROTO_IMAP:
 #ifdef HAVE_IMAP
-  file = savecat("imap://", file);
+  file = csave;
   flags |= FP_IMAP;
   osflags = O_RDWR | O_APPEND | O_CREAT | n_O_NOFOLLOW;
   infd = -1;
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot__
S-nail-users@lists.sourceforge.net

Re: [S-mailx] Duplicate request for password, never succeeds

2017-07-25 Thread Paul Vojta
On Mon, Jul 24, 2017 at 02:30:44PM +0200, Steffen Nurpmeso wrote:
> Hello Paul.
> 
> Paul Vojta  wrote:
> 
> First of all i am sorry that you were in the queue, your address
> was (and is still) listed in "List of non-member addresses whose
> postings should be automatically accepted" as well as "List of
> addresses (or regexps) whose subscriptions do not require
> approval", so this i do not understand.  (Except that the
> "moderated" bit for new members is by default on.  Well.)

Probably it's because v*@math.b*.edu is an alias for v*@b*.edu, and emails
go out with both addresses in various parts of the mail header.  I've had
this problem with other mailing lists too, but I forgot about it when
subscribing to this one.  You may have noticed I unsubscribed and subscribed
again just now using the "real" address.  That should fix it.

>  |I have the following problem with the current s-nail
>  |(commit 670aabb6804d94e0fe386c99e2b9ab382a2bb86c):
>  |
>  |% ~/s-nail-git/s-nail -f %:+texlive
>  |vo...@berkeley.edu@imap.gmail.com requires a password: 
>  ...
>  |s-nail: Could not connect: Network is unreachable
> 
> Thanks to Google for my test account!
> Dear Paul, thanks for reporting this, the IMAP reinstantiation
> introduced a brain-damage (which it is, given the diff below).
> 
> Would you be so kind and verify that the issue goes away if you
> apply the diff or update to any of
> [master,stable/{stable,latest,v14.9}]?

Sorry, the problem remains (on origin/master).

>  |Each "Network is unreachable" message is preceded by an 
> approximately-60-sec\
>  |ond
>  |delay.  (But, it shouldn't be asking for a password again at all, should \
>  |it?)
> 
> This problem could be a different issue, but i cannot reproduce at
> the moment.
> 
>   ...
>  |set NAIL_EXTRA_RC=~/.nailrc
> 
> This will be mail-extra-rc exclusively in v15.
> Ciao!

Fixed (changed to mailx-extra-rc), thanks.

Paul

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
__
S-nail-users@lists.sourceforge.net


Re: [S-mailx] Duplicate request for password, never succeeds

2017-07-24 Thread Paul Vojta
On Mon, Jul 24, 2017 at 02:30:44PM +0200, Steffen Nurpmeso wrote:
> Hello Paul.
> 
> Paul Vojta  wrote:
> 
> First of all i am sorry that you were in the queue, your address
> was (and is still) listed in "List of non-member addresses whose
> postings should be automatically accepted" as well as "List of
> addresses (or regexps) whose subscriptions do not require
> approval", so this i do not understand.  (Except that the
> "moderated" bit for new members is by default on.  Well.)

Probably it's because v*@math.b*.edu is an alias for v*@b*.edu, and emails
go out with both addresses in various parts of the mail header.  I've had
this problem with other mailing lists too, but I forgot about it when
subscribing to this one.  You may have noticed I unsubscribed and subscribed
again just now using the "real" address.  That should fix it.

>  |I have the following problem with the current s-nail
>  |(commit 670aabb6804d94e0fe386c99e2b9ab382a2bb86c):
>  |
>  |% ~/s-nail-git/s-nail -f %:+texlive
>  |vo...@berkeley.edu@imap.gmail.com requires a password: 
>  ...
>  |s-nail: Could not connect: Network is unreachable
> 
> Thanks to Google for my test account!
> Dear Paul, thanks for reporting this, the IMAP reinstantiation
> introduced a brain-damage (which it is, given the diff below).
> 
> Would you be so kind and verify that the issue goes away if you
> apply the diff or update to any of
> [master,stable/{stable,latest,v14.9}]?

Sorry, the problem remains (on origin/master).

>  |Each "Network is unreachable" message is preceded by an 
> approximately-60-sec\
>  |ond
>  |delay.  (But, it shouldn't be asking for a password again at all, should \
>  |it?)
> 
> This problem could be a different issue, but i cannot reproduce at
> the moment.
> 
>   ...
>  |set NAIL_EXTRA_RC=~/.nailrc
> 
> This will be mail-extra-rc exclusively in v15.
> Ciao!

Fixed (changed to mailx-extra-rc), thanks.

Paul


Re: [S-mailx] Duplicate request for password, never succeeds

2017-07-24 Thread Steffen Nurpmeso
Ralph Corderoy  wrote:
 |> -   memcpy(>url_path.s, "/INBOX", sizeof("/INBOX"));
 |> +   memcpy(>url_path.s[i], "/INBOX", sizeof("/INBOX"));
 |
 |That looks like it could just be strcpy(3) to save the reader checking
 |both string literals are the same.

That would not have changed the issue, right?  No, URL will become
an object instead of a dumb carrier in v15, just like Mailbox.  It
will have n_string member objects, then.
Copying the NUL is conscious, otherwise i would have used
n_strscpy() (a better variant of strlcpy() in my opinion).

--steffen
|
|Der Kragenbaer,The moon bear,
|der holt sich munter   he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
__
S-nail-users@lists.sourceforge.net


Re: [S-mailx] Duplicate request for password, never succeeds

2017-07-24 Thread Ralph Corderoy
Hi Steffen,

> -   memcpy(>url_path.s, "/INBOX", sizeof("/INBOX"));
> +   memcpy(>url_path.s[i], "/INBOX", sizeof("/INBOX"));

That looks like it could just be strcpy(3) to save the reader checking
both string literals are the same.

-- 
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
__
S-nail-users@lists.sourceforge.net


Re: [S-mailx] Duplicate request for password, never succeeds

2017-07-24 Thread Steffen Nurpmeso
Now forgot the attachment, sorry!

--steffen
|
|Der Kragenbaer,The moon bear,
|der holt sich munter   he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)
commit 28274f29
Author: Steffen (Daode) Nurpmeso 
AuthorDate: 2017-07-24 14:21:07 +0200
Commit: Steffen (Daode) Nurpmeso 
CommitDate: 2017-07-24 14:21:08 +0200

FIX [81d7f4d8] (IMAP: try (hard) to reinstantiate..) (Paul Vojta)
---
 urlcrecry.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/urlcrecry.c b/urlcrecry.c
index d6fb7270..541f80a4 100644
--- a/urlcrecry.c
+++ b/urlcrecry.c
@@ -1034,7 +1034,7 @@ jurlp_err:
  if(trailsol){
 urlp->url_path.s = n_autorec_alloc(i + sizeof("/INBOX"));
 memcpy(urlp->url_path.s, x, i);
-memcpy(>url_path.s, "/INBOX", sizeof("/INBOX"));
+memcpy(>url_path.s[i], "/INBOX", sizeof("/INBOX"));
 urlp->url_path.l = (i += sizeof("/INBOX") -1);
  }else
 #endif
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot__
S-nail-users@lists.sourceforge.net