You are not logged in.

#1 2014-06-10 12:47:02

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

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

I'm using setup outlined in the wiki: https://wiki.archlinux.org/index.php/S-nail and it works just fine with older versions of s-nail (downgraded to test). I use s-nail to send e-mail to my gmail account, usually with an attachment.

$ echo "Done" | mailx -vs <subject> <address>@gmail.com
Resolving host smtp.gmail.com:587 ... done.
Connecting to 173.194.66.108:587 ... connected.
smtp-server: 530-5.5.1 Authentication Required. Learn more at
smtp-server: 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 <some letters and numbers> - gsmtp
"/home/karol/dead.letter" 11/274
... message not sent.

Can anyone translate the recent changes into plain English?
http://sourceforge.net/p/s-nail/s-nail/s-nail-users/
http://sdaoden.users.sourceforge.net/code.html#s-nail

I can post the output of a working s-nail 14.6.4-1, but I don't know which parts (if any) should I redact.

Last edited by karol (2014-06-17 22:22:53)

Offline

#2 2014-06-10 14:25:28

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

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

Changelog wrote:

- Support for GSS-API authentification has been added (request and
  testing by Tarqi Kazan).

  Note that the following implicit relation is gone:
    *smtp-auth*
      If set to `login', or if unset and smtp-auth-user is set, `AUTH
      LOGIN' is used

  This topic branch also added support for the SUBMISSION protocol of
  RFC 6409, so re-reading the *smtp* manual may bring benefits.
  [topic/smtp]

Try setup the smtp-auth option explicitly.


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

Offline

#3 2014-06-10 14:36:04

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

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

How exactly do I do that?

Offline

#4 2014-06-10 15:00:51

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

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

I am a bit surprised about this question, as you are known as an Archivist smile

See man mail and look for the several smtp-auth options there. Unfortunaly I can't tell you how to use them with google-mail, since i'm not familiar with this.


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

Offline

#5 2014-06-10 16:24:18

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

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

I'm using

set smtp=smtp(s)://server:port
set smtp-use-starttls
set smtp-auth-user=mailuser
set smtp-auth-password=password

This used to work, but with the new s-nail it doesn't :-(
Adding

set ssl-verify=ignore
set ssl-auth=login

doesn't help.

Offline

#6 2014-06-10 16:41:31

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

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

It's a bit tricky...

set smtp=smtp(s):// # is wrong
set ssl-auth= # is an unkown option

Use

set smtp=smtp://server  # uses port 25

or

set smtp=smtps://server:465  # uses port 465 (ssl)

or

set smtp=submission://server  # uses port 587 (tls)

and

set smtp-auth=plain

or

set smtp-auth=login

or

set smtp-auth=cram-md5

Edit: You may need to combine the smtp= option with a port.
Edit2: Typos
Edit3 (sorry): I think you just need to add the smtp-auth option to get it back to work.

Last edited by Tarqi (2014-06-10 16:46:06)


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

Offline

#7 2014-06-10 17:04:19

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

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

set smtp=smtp.gmail.com:587

and e.g.

set smpt-auth=login

used to work.

Offline

#8 2014-06-10 17:09:05

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

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

So it is sovled? (Btw: you made the same typos like me: smpt wink)

Last edited by Tarqi (2014-06-10 17:09:45)


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

Offline

#9 2014-06-10 17:32:33

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

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

Sorry, the typo is not present in the config. Instead of copy-pasting, I (mis)typed it here.
I meant: this works with version 14.6.4-1, doesn't work with version 14.7-1.

Offline

#10 2014-06-10 18:11:22

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

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

karol wrote:
set smtp=smtp.gmail.com:587

MIsses the smtp:// part.

That's what I use, and it is working for me (just tested right now, but I can't say anything about google-mail):

set smtp=smtp://server:587
set smtp-use-starttls
set smtp-auth=login
set smtp-auth-user=username
set smtp-auth-password=password

If this doesn't help, I am out of Ideas, sorry.


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

Offline

#11 2014-06-10 18:24:46

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

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

Sorry

set smtp=smtp://smtp.gmail.com:587

works with the previous version, but not with the current one.

With

set smtp-auth=login

I get a different error message:

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


I can always ask upstream, but maybe somebody can help me here.

Offline

#12 2014-06-10 20:16:51

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

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

As stated above, please try set smtp-auth=plain.


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

Offline

#13 2014-06-10 21:27:03

stevenhoneyman
Member
From: England
Registered: 2014-05-25
Posts: 241

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

I have no idea if this is the cause of your issue... but it has caught me out several times when I've been trying to get things to work with gmail (i.e. if you've tried the wrong auth settings, wrong password, that sort of thing - it locks you out until you unlock with Captcha):

https://support.google.com/mail/answer/78754?hl=en
https://www.google.com/accounts/DisplayUnlockCaptcha

...of course if you can downgrade the package and it works again straight away, then the problem is not related to what I just posted smile

Offline

#14 2014-06-10 22:39:42

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

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

stevenhoneyman wrote:

if you can downgrade the package and it works again straight away, then the problem is not related to what I just posted smile

I downgrade, the config file is not being overwritten or changed in any way and it jsut works.

I did check those links before opening this thread when I followed http://support.google.com/mail/bin/answ … swer=14257 entioned in the error message - it didn't work.


Edit:

Tarqi wrote:

As stated above, please try set smtp-auth=plain.

I've already tried and it didn't work, sorry for not stating it explicitly. I said 'and e.g. set smpt-auth=login' in https://bbs.archlinux.org/viewtopic.php … 7#p1424347 by which I meant I've tried all the options you mentioned.
I got beaten by a snail :-(

Last edited by karol (2014-06-10 22:46:28)

Offline

#15 2014-06-13 05:54:13

madscience
Member
From: Ontario, Canada
Registered: 2014-02-11
Posts: 82
Website

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

Bumping this, as I have a ton of build scripts that are supposed to mail me when completed.

I've tried

 set smtp-auth=login 

and

 set smtp-auth=plain 

and I'm still getting "authentication required"

my mail.rc is

 set sendmail="/usr/bin/mailx"
set smtp=smtp.gmail.com:587
set smtp-use-starttls
set ssl-verify=ignore
set ssl-auth=plain
set smtp-auth-user=myusername
set smtp-auth-password=mypassword

Offline

#16 2014-06-13 12:01:44

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

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

I've sent an e-mail to the s-nail-users ML.
I'll post a link to it once it's viewable in the archives: http://sourceforge.net/p/s-nail/s-nail/ … e=threaded

Offline

#17 2014-06-13 12:21:22

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

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

I thought these changes only applied when "v15-compat" was set, however by my experience...

Please try with "user=x" instead of "smtp-auth-user=x".
And maybe also "password=x" instead of "smtp-auth-password=x" if the above isn't enough.


I don't really understand the [upcoming] changes, so I'm not sure if this was intended to break [yet] or if this is accidental. Steffen, the developer, will surely have light to shed.

Offline

#18 2014-06-13 13:24:47

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

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

Hello, this is my first post here, so sorry for the format..

Karol wrote to the s-nail-users@ list, find below my answer:

  |set sendmail="/usr/bin/mailx"
  |set smtp=smtp.gmail.com:587
  |set smtp-use-starttls
  |set ssl-verify=ignore
  |set smtp-auth=login
  |set smtp-auth-user=myusername
  |set smtp-auth-password=mypassword

  |but I can't get it to work with s-nail 14.7

  |I don't understand what changes do I have to make in order to be able
  |to send messages to my gmail account, which is what I use s-nail for.

Hmmm, well, so i've tried again like so:

  # ~/.s-nailrc:
  set folder=arena/data/mail record=+sent nostealthmua
  account a1 {
     set v15-compat ssl-method=auto
     set smtp=smtp.gmail.com \
        smtp-auth=plain \
        user=USER \
        password=PASS \
        smtp-use-starttls
  }
  account a2 {
     set ssl-method=auto
     set smtp=smtp.gmail.com \
        smtp-auth=plain \
        smtp-auth-user=USER \
        smtp-auth-password=PASS \
        smtp-use-starttls
  }
  account a3 {
     set v15-compat ssl-method=auto
     set smtp=smtp://USER:PASS@smtp.gmail.com:587 \
        smtp-auth=plain \
        smtp-use-starttls
  }

and got

  ?0[steffen@sherwood nail.git]$ echo "Done" |
  ./s-nail -Aa1 -vs test2-1 sdaoden@yandex.com
  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>
  ?0[steffen@sherwood nail.git]$ echo "Done" |
  ./s-nail -Aa2 -vs test2-2 sdaoden@yandex.com
  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>
  ?0[steffen@sherwood nail.git]$

  ?0[steffen@sherwood nail.git]$ echo "Done" |
  ./s-nail -Aa3 -vs test2-3 sdaoden@yandex.com
  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>
  ?0[steffen@sherwood nail.git]$

So i'm a bit out of ideas at the moment.
However, Tarqi said something wise and Wzyboy edited the Wiki
accordingly: the implicit relation of

    *smtp-auth*
      If set to `login', or if unset and smtp-auth-user is set, `AUTH
      LOGIN' is used

has actually been dropped.  I didn't realize that this could
really make some configurations unusable...
Maybe the Wiki should only show the new configuration anyway.
EOQ

So yes, i looked at the ArchLinux Wiki a while back but didn't realize that the example config made use of that implicit relation.
Sorry for the inconvenience!
Confirmation that it works for you would be nice.

Offline

#19 2014-06-13 13:26:23

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

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

@WOFall
It doesn't work. Also, I get

Unknown command: `user=karol'
karol wrote:

I've sent an e-mail to the s-nail-users ML.
I'll post a link to it once it's viewable in the archives: http://sourceforge.net/p/s-nail/s-nail/ … e=threaded

For some reason the threaded view doesn't let me show the messages, the flat view works: http://sourceforge.net/p/s-nail/s-nail/ … style=flat
Edit: This link shows just the conversation we're interested in: http://sourceforge.net/p/s-nail/s-nail/ … /32457070/


sdaoden, when posting configs, code or command output, please use [ code ] tags https://bbs.archlinux.org/help.php#bbcode

like this

It makes the code more readable and - in case of longer listings - more convenient to scroll through.

Last edited by karol (2014-06-13 13:29:42)

Offline

#20 2014-06-13 13:29:17

dif
Member
From: Stalowa Wola, Poland
Registered: 2009-12-22
Posts: 137

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

I use s-nail plus msmtp. Here is a working solution. Just tested a minute ago.

My .msmtprc settings:

defaults
auth             on
tls              on

account        gmail
host           smtp.gmail.com
port           587
user           myname@gmail.com
passwordeval   "gpg -d /home/myusername/.credentials/passwd_for_gmail"
from           myname@gmail.com
tls_trust_file /usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crt

account default : gmail

My .mailrc settings:

account gmail {
set from="myname@gmail.com"
set message-sendmail-extra-arguments="-a gmail"
}

My /usr/bin/sendmail is (not directly but effectively) a symlink to msmtp.
I tried the same command as that in your original post, and it worked.

Offline

#21 2014-06-13 13:39:50

dif
Member
From: Stalowa Wola, Poland
Registered: 2009-12-22
Posts: 137

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

As a digression, another account in my .msmstp works with

tls_trust_file /etc/ssl/certs/ca-certificates.crt

Unfortunately yet another one with

tls_fingerprint xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx

has been stopped by gmail server. The reason:

Our system has detected that this message is not RFC 2822 compliant. 
To reduce the amount of spam sent to Gmail, this message has been blocked. 
Please review RFC 2822 specifications for more information.

Nonetheless, the message was sent OK/left the sending server.

Offline

#22 2014-06-13 13:47:39

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

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

karol wrote:

sdaoden, when posting configs, code or command output, please use [ code ] tags https://bbs.archlinux.org/help.php#bbcode

like this

It makes the code more readable and - in case of longer listings - more convenient to scroll through.

Cool, ok - next time (as necessary).

karol wrote:
Unknown command: `user=karol'

`user' is a variable, so that suggestion should have been `set user=karol'.

WOFall wrote:

I don't really understand the [upcoming] changes, so I'm not sure if this was intended to break [yet] or if this is accidental. Steffen, the developer, will surely have light to shed.

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.

Offline

#23 2014-06-13 13:55:07

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

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

'set user' doesn't work either.

Offline

#24 2014-06-13 22:05:02

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

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

Works great, huh???
I've also registered to the Wiki and edited the S-nail entry, though that is the first real Wiki edit i've ever done...  I think the most noticeable addition is the ArchLinux-specific *ssl-ca-dir* variable.

I'm about to add a TODO entry for dif's "message-sendmail-extra-arguments" (yet only possible via command line: -O) etc.
Let me know if anything else is troubling. wink

Offline

#25 2014-06-13 22:14:04

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

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

sdaoden wrote:

Works great, huh???

I don't understand what you mean. It still doesn't work for me.

Offline

Board footer

Powered by FluxBB