You are not logged in.

#26 2014-06-13 23:33:22

WOFall
Member
From: Ireland
Registered: 2012-03-24
Posts: 12

Re: [solved] s-nail 14.7-1 doesn't work

sdaoden wrote:

Well the old syntax is pretty messy and rather arbitrary in my opinion.
For example the syntax and the names of the used variable names are different dependent on the protocol.
When you set v15-compat you can use the standardized URL syntax (also described in the manual section "URL syntax"), all through, and today.

Then I understand the changes only apply when v15-compat is set. My suggestion was based only on the fact that the error matched what I had seen previously, but I guess it was a bad suggestion.

In fact, my own problem (hence confusion) was that I was using the "password-USER@HOST" syntax, when my USER also contains an @. Apparently it must now be encoded as %40, while in 14.6 it was required to be a raw @. This "broke" in 14.7 regardless of v15-compat. Considering how USER works in "folder", etc., I'd guess this could be considered a bug.

Well, I only figured out my exact problem right now. Sorry for wasting time with my suggestion. 0:)
Edit: posted to the ML.

As far as the wiki goes, I wonder if it might be useful to have full examples for Gmail, Hotmail, Yahoo, and Yandex... although they'd likely be very repetitive.



@karol: Dunno dunno, but it would surely be useful if you can post your config.

Last edited by WOFall (2014-06-14 01:08:46)

Offline

#27 2014-06-13 23:34:48

Tarqi
Member
From: Ixtlan
Registered: 2012-11-27
Posts: 179
Website

Re: [solved] s-nail 14.7-1 doesn't work

I'll try to clean this up a little bit..

Variant 1

     set v15-compat ssl-method=auto
     set smtp=smtp.gmail.com
     set smtp-auth=plain
     set user=USER
     set password=PASS
     set smtp-use-starttls

Variant 1 result

  Resolving host smtp.gmail.com:smtp ... done.
  Connecting to 74.125.136.109:smtp ... connected.
   Certificate depth 3
   [.]
   Certificate depth 0
   [.]
    issuer = /C=US/O=Google Inc/CN=Google Internet Authority G2
  Comparing DNS: <smtp.gmail.com>; should <smtp.gmail.com>
  ...

Variant 2

     set ssl-method=auto
     set smtp=smtp.gmail.com
     set smtp-auth=plain
     set smtp-auth-user=USER
     set smtp-auth-password=PASS
     set smtp-use-starttls

Variant 2 result

  Resolving host smtp.gmail.com:smtp ... done.
  Connecting to 74.125.136.109:smtp ... connected.
   Certificate depth 3
   [.]
    issuer = /C=US/O=Google Inc/CN=Google Internet Authority G2
  Comparing DNS: <smtp.gmail.com>; should <smtp.gmail.com>
  ...

Variant 3

     set v15-compat ssl-method=auto
     set smtp=smtp://USER:PASS@smtp.gmail.com:587
     set smtp-auth=plain
     set smtp-use-starttls

Variant 3 result

  Resolving host smtp.gmail.com:587 ... done.
  Connecting to 74.125.136.109:587 ... connected.
   Certificate depth 3
   [.]
    issuer = /C=US/O=Google Inc/CN=Google Internet Authority G2
  Comparing DNS: <smtp.gmail.com>; should <smtp.gmail.com>
  ...

So, each of this three variants Steffen (sdaoden) posted, worked for him (using google mail). Please try again changing your configuration with exactly all statements used in the appropriate variant. Don't forget the v15-compat line if you choose such a variant. If this will not help maybe the packaged version is somehow broken, since Steffen used his git-version for testing. We'll see.

Edit: Typos

Last edited by Tarqi (2014-06-13 23:38:01)


Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse

Offline

#28 2014-06-14 00:08:39

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] s-nail 14.7-1 doesn't work

None of the variants work. Unless I use

set smtp=smtp.gmail.com:587

instead of

set smtp=smtp.gmail.com

I get

could not connect: Network is unreachable.

with both s-nail versions.

Offline

#29 2014-06-14 00:23:41

Tarqi
Member
From: Ixtlan
Registered: 2012-11-27
Posts: 179
Website

Re: [solved] s-nail 14.7-1 doesn't work

karol wrote:

None of the variants work. Unless I use

set smtp=smtp.gmail.com:587

instead of

set smtp=smtp.gmail.com

I get

could not connect: Network is unreachable.

with both s-nail versions.

That's why I wrote exactly. None of the above variants uses this combination of URL/Port. Try again with variant three:

set smtp=smtp://USER:PASS@smtp.gmail.com:587

However, it would be really usefull if you could post your config. You should know how the forum works, shouldn't you (no rudeness intended)?

Edit: Typos

Last edited by Tarqi (2014-06-14 01:56:21)


Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse

Offline

#30 2014-06-14 00:40:26

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] s-nail 14.7-1 doesn't work

s-nail 14.7-1
With

set ssl-method=auto
set smtp=smtp.gmail.com
set smtp-auth=plain
set smtp-auth-user=karol.blazewicz@gmail.com
set smtp-auth-password=<my password goes here>
set smtp-use-starttls

I get

could not connect: Network is unreachable.

With

set v15-compat ssl-method=auto
set smtp=smtp.gmail.com
set smtp-auth=plain
set user=karol.blazewicz@gmail.com
set password=<my password goes here>
set smtp-use-starttls

I get

could not connect: Network is unreachable.

With

set v15-compat ssl-method=auto
set smtp=smtp://karol.blazewicz@gmail.com:<my password goes here>@smtp.gmail.com:587
set smtp-auth=plain
set smtp-use-starttls

I get

smtp-server: 535-5.7.8 Username and Password not accepted.

With

set v15-compat ssl-method=auto
set smtp=smtp://karol.blazewicz%40gmail.com:<my password goes here>@smtp.gmail.com:587
set smtp-auth=plain
set smtp-use-starttls

I get

smtp-server: 535-5.7.8 Username and Password not accepted.


s-nail 14.6.4-1
With

set ssl-method=auto
set smtp=smtp.gmail.com
set smtp-auth=plain
set smtp-auth-user=karol.blazewicz@gmail.com
set smtp-auth-password=<my password goes here>
set smtp-use-starttls

I get

could not connect: Network is unreachable.

With

set ssl-method=auto
set smtp=smtp.gmail.com:587
set smtp-auth=plain
set smtp-auth-user=karol.blazewicz@gmail.com
set smtp-auth-password=<my password goes here>
set smtp-use-starttls

it works fine.

Offline

#31 2014-06-14 00:56:23

Tarqi
Member
From: Ixtlan
Registered: 2012-11-27
Posts: 179
Website

Re: [solved] s-nail 14.7-1 doesn't work

Since you get this

karol wrote:

s-nail 14.7-1

could not connect: Network is unreachable.

on each version if using port 25, I think something (your ISP?) blocks outgoing traffic on this port. For testing, simply do this:

telnet smtp.gmail.com 25

You shouldn't get a connection, otherwise it's s-nails fault.

So let's stay here:

karol wrote:

s-nail 14.7-1

set v15-compat ssl-method=auto
set smtp=smtp://karol.blazewicz@gmail.com:<my password goes here>@smtp.gmail.com:587
set smtp-auth=plain
set smtp-use-starttls

I get

smtp-server: 535-5.7.8 Username and Password not accepted.

Pleasy try again with the above config, but include -v on the command to get some more information. Mabye we can find out what's going on.


Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse

Offline

#32 2014-06-14 01:08:48

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] s-nail 14.7-1 doesn't work

telnet tried 3 addresses and failed with

telnet: Unable to connect to remote host: Network is unreachable
set v15-compat ssl-method=]auto
set smtp=smtp://karol.blazewicz@gmail.com:<password>@smtp.gmail.com:587
set smtp-auth=plain
set smtp-use-starttls
$ echo "test" | mailx -vs test karol.blazewicz@gmail.com
Resolving host smtp.gmail.com:587 ... done.
Connecting to 74.125.136.108:587 ... connected.
 Certificate depth 3 
  subject = /C=US/O=Equifax/OU=Equifax Secure Certificate Authority
  notBefore = 1998-08-22 16:41:51 GMT
  notAfter = 2018-08-22 16:41:51 GMT
  issuer = /C=US/O=Equifax/OU=Equifax Secure Certificate Authority
 Certificate depth 2 
  subject = /C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
  notBefore = 2002-05-21 04:00:00 GMT
  notAfter = 2018-08-21 04:00:00 GMT
  issuer = /C=US/O=Equifax/OU=Equifax Secure Certificate Authority
 Certificate depth 1 
  subject = /C=US/O=Google Inc/CN=Google Internet Authority G2
  notBefore = 2013-04-05 15:15:55 GMT
  notAfter = 2015-04-04 15:15:55 GMT
  issuer = /C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
 Certificate depth 0 
  subject = /C=US/ST=California/L=Mountain View/O=Google Inc/CN=smtp.gmail.com
  notBefore = 2013-09-10 07:54:47 GMT
  notAfter = 2014-09-10 07:54:47 GMT
  issuer = /C=US/O=Google Inc/CN=Google Internet Authority G2
Comparing DNS: <smtp.gmail.com>; should <smtp.gmail.com>
smtp-server: 535-5.7.8 Username and Password not accepted. Learn more at
smtp-server: 535 5.7.8 http://support.google.com/mail/bin/answer.py?answer=14257 l49sm15393035eef.27 - gsmtp
"/home/karol/dead.letter" 11/272
... message not sent

Offline

#33 2014-06-14 01:55:08

Tarqi
Member
From: Ixtlan
Registered: 2012-11-27
Posts: 179
Website

Re: [solved] s-nail 14.7-1 doesn't work

So we have at least a working connection. That authentication failure might have two reasons:

1) https://bbs.archlinux.org/viewtopic.php … 4#p1424454

or/and

2) Problems with encoding/decoding the url. Maybe some chars must be escaped in some way:

WOFall wrote:

In fact, my own problem (hence confusion) was that I was using the "password-USER@HOST" syntax, when my USER also contains an @. Apparently it must now be encoded as %40, while in 14.6 it was required to be a raw @. This "broke" in 14.7 regardless of v15-compat.

I think the second one is the problem, because a new url scheme was implemented in the current version. So that's an exercise for the developer. I don't know how often he will read here, maybe you should call him again on the mailling list.

In the meanwhile you might try to escape your password:

perl -p -e 's/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg'

Paste it in a terminal and enter your password. Use the result for the password part in the url. It's worth a try. (The code is just a quick shot, if it's not working you might need to use a more accurate urlencode utility.)

Edit: Typos

Last edited by Tarqi (2014-06-14 02:29:01)


Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse

Offline

#34 2014-06-14 10:04:34

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] s-nail 14.7-1 doesn't work

Thanks for all the help, but I'm going to use the gmail web interface for now and wait for upstream to step in. I'm not married to s-nail so I can always pick another application.

Offline

#35 2014-06-14 14:09:16

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] s-nail 14.7-1 doesn't work

I somehow missed Tarqi's last post. His perl oneliner works for me. Thanks a lot! :-)


Tarqi, should this info be posted in some bugtracker / mailing list? I see an encoding-related discussion on the s-nail mailing list, but I don't understand what are they talking about.

Offline

#36 2014-06-14 14:16:17

WOFall
Member
From: Ireland
Registered: 2012-03-24
Posts: 12

Re: [solved] s-nail 14.7-1 doesn't work

karol wrote:

I somehow missed Tarqi's last post. His perl oneliner works for me. Thanks a lot! :-)


Tarqi, should this info be posted in some bugtracker / mailing list? I see an encoding-related discussion on the s-nail mailing list, but I don't understand what are they talking about.

Interesting! I think it's a separate issue, although perhaps related. sdaoden will see it here either way, but I would recommend to reply to your original ML post for anyone else that runs into the same bug.

Offline

#37 2014-06-14 14:27:06

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] s-nail 14.7-1 doesn't work

Offline

#38 2014-06-14 15:16:09

sdaoden
Member
Registered: 2014-06-13
Posts: 30

Re: [solved] s-nail 14.7-1 doesn't work

Hello, yes there is a bug in S-nail v14.7 -- Gavin Troy has reported that S-nail v14.7 way too often assumes that USER and PASSWORD are URL percent encoded, whereas it should only do so when those come in from an URL (wether *v15-compat* is set or not (though PASSWORD is only allowed then, and of course URL notation for SMTP as such is, too)).
I'm in the process of fixing that (preliminary patch on [next] branch, not yet giving credit to WOFall).

..Terrible...  My apologies for the inconvenience!

P.S.: S-nail has `urlenc' and `urldec' commands since v14.7, which can also be used to show the conversion (escaping any characters not covered by RFC 3986, "2.3 Unreserved Characters").

P.P.S: i got only one notification for all the messages since yesterday evening: "Arch Linux Forum  16:09 06-14   37/  1785 Reply to topic: 's-nail 14.7-1 doesn't work'"

Offline

#39 2014-06-14 15:22:26

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] s-nail 14.7-1 doesn't work

sdaoden wrote:

P.P.S: i got only one notification for all the messages since yesterday evening: "Arch Linux Forum  16:09 06-14   37/  1785 Reply to topic: 's-nail 14.7-1 doesn't work'"

I'm not sure how it works, but the forum notifications I get say

<forum username> has replied to the topic <topic name> to which you are subscribed. There may be more new replies, but this is the only notification you will receive until you visit the board again.



For me s-nail 14.7 wasn't a huge problem, more of an annoyance - the previous version works just fine and it was trivial to downgrade.

Offline

#40 2014-06-14 15:48:10

WOFall
Member
From: Ireland
Registered: 2012-03-24
Posts: 12

Re: [solved] s-nail 14.7-1 doesn't work

Ah, so it all fits together.

@sdaoden: I know you said "preliminary patch", but I wanted to point out url-syntax is off-by-one. I must use

set folder="imaps://gavtroy@fastmail.fmX@mail.messagingengine.com"

where X is any character that gets ignored.

Offline

#41 2014-06-14 17:02:50

sdaoden
Member
Registered: 2014-06-13
Posts: 30

Re: [solved] s-nail 14.7-1 doesn't work

WOFall wrote:

so it all fits together

oha!  Hello WOFall!

karol wrote:

For me s-nail 14.7 wasn't a huge problem, more of an annoyance - the previous version works just fine and it was trivial to downgrade.

Good to hear.  pacman did it right.  S-nail did not.  :-((

WOFall wrote:
set folder="imaps://gavtroy@fastmail.fmX@mail.messagingengine.com"

Update on [next] (warnings on badly URL-encoded content only with -v or -d), but on monday i'll look again and compare against old behaviour.
A bugfix version needs to be released, then.  :-(

Thanks all, but especially WOFall, who should be promoted to Inspector.

Offline

#42 2014-06-15 00:56:16

Tarqi
Member
From: Ixtlan
Registered: 2012-11-27
Posts: 179
Website

Re: [solved] s-nail 14.7-1 doesn't work

karol wrote:

I somehow missed Tarqi's last post. His perl oneliner works for me. Thanks a lot! :-)

You're welcome smile

sdaoden wrote:

Thanks all, but especially WOFall, who should be promoted to Inspector.

I also wasn't sooo bad too... sniff... wink


Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse

Offline

#43 2014-06-15 01:00:32

WOFall
Member
From: Ireland
Registered: 2012-03-24
Posts: 12

Re: [solved] s-nail 14.7-1 doesn't work

Yes, for sure, I gave up long before. smile

Offline

#44 2014-06-16 08:55:41

sdaoden
Member
Registered: 2014-06-13
Posts: 30

Re: [solved] s-nail 14.7-1 doesn't work

hi, back, again..

Tarqi wrote:

I also wasn't sooo bad too... sniff...

Of course not.

2014-06-17: edited: removed comment that noted addition of Tarqi in S-nail NEWS file for a specific topic upon request (of Tarqi) in private mail.

I'm continuing bugfixing now..

WOFall wrote:

> You are absolutely right, way too often URL percent encoded values
> are assumed when normal strings should be expected instead.
> There is a preliminary patch on [next].

The "password-USER@HOST" still requires %40 in this preliminary patch.

I think the only right way to go is to use what comes in from the user, i.e., if you use the URL-syntax then it must be percent-encoded in there and we use that, if other links of the chain succeed then it's the non-encoded form.  This should be backward compatible, too.

Last edited by sdaoden (2014-06-17 09:34:51)

Offline

#45 2014-06-17 22:22:31

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] s-nail 14.7-1 doesn't work

sdaoden updated the wiki page and my issue has already been solved, so I'm marking this thread as solved.

Thanks again, everyone - especially Tarqi :-)

Offline

#46 2014-06-17 22:39:27

Tarqi
Member
From: Ixtlan
Registered: 2012-11-27
Posts: 179
Website

Re: [solved] s-nail 14.7-1 doesn't work

karol wrote:

Thanks again, everyone - especially Tarqi :-)

Unfortunately my english is not good enough to place a suitable compliment here... so I am simply ashamed.. Thank you wink


Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse

Offline

#47 2014-06-25 10:46:44

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] s-nail 14.7-1 doesn't work

sdaoden wrote:

P.S.: S-nail has `urlenc' and `urldec' commands since v14.7, which can also be used to show the conversion (escaping any characters not covered by RFC 3986, "2.3 Unreserved Characters").

After updating to s-nail 14.7.1 I get ' String is not properly URL percent encoded' error.
I can't find neither 'urlenc' nor `urldec' command, not even 'urlencode' mentioned in the man page. I've tried installing https://aur.archlinux.org/packages/s-nail-git/ but it doesn't provide these commands either.

Does it have something to do with the new /etc/mail.rc?

Offline

#48 2014-06-25 12:54:58

WOFall
Member
From: Ireland
Registered: 2012-03-24
Posts: 12

Re: [solved] s-nail 14.7-1 doesn't work

As I understand, `urlenc' works similarly to the previously mentioned perl script: ie. you copy-paste the result manually. The "not properly URL percent encoded" error should tell you which string it doesn't like.

If you don't have `urlenc', perhaps check you didn't install an old binary to ~/bin. At least, it exists here.

$ mail                                                                                              
String is not properly URL percent encoded: `pa$s w@rd'

$ echo 'urlenc "pa$s w@rd"' | s-nail -#                                                             
 in: <pa$s w@rd> (9 bytes)
out: <pa%24s%20w%40rd> (15 bytes)

Offline

#49 2014-06-25 13:43:46

WOFall
Member
From: Ireland
Registered: 2012-03-24
Posts: 12

Re: [solved] s-nail 14.7-1 doesn't work

WOFall wrote:

perhaps check you didn't install an old binary to ~/bin

Actually, this was a braindead thought, considering you're getting the "URL percent encoded" error.

Offline

#50 2014-06-25 14:32:52

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] s-nail 14.7-1 doesn't work

I thought a 'command' should work like this:

$ urlenc
-bash: urlenc: command not found

but

$ echo 'urlenc "pa$s w@rd"' | s-nail -#
 in: <pa$s w@rd> (9 bytes)
out: <pa%24s%20w%40rd> (15 bytes)

worked, thank you :-)

I had to urlencode both the password and the login, which is different from version 14.7, where urlencoding the '@' in the e-mail address returned an error.

Offline

Board footer

Powered by FluxBB