You are not logged in.

#1 2013-03-13 13:47:08

GloW_on_dub
Member
Registered: 2013-03-13
Posts: 389

[SOLVED]mutt configuration with starttls stmp server

Hello

At work we got a secured smtp server.

I can use it with thunderbird with the folowing configuration :
servername : smtps.mywork.fr
port: 587
security: STARTTLS
login and pass = normal identification

so here is my muttrc :

  1 set imap_user     = user
  2 set imap_pass     = pass
  3 set folder        = imaps://user@imap.mywork.fr:993/
  4 set spoolfile     = +INBOX
  5 mailboxes         = +INBOX
  6 set ssl_starttls=yes
  7 # Store message headers locally to speed things up.
  8 # If hcache is a folder, Mutt will create sub cache folders for each account which may speeds things even more up.
  9 set header_cache = ~/.cache/mutt
 10 
 11 # Store messages locally to speed things up, like searching message bodies.
 12 # Can be the same folder as header_cache.
 13 # This will cost important disk usage according to your e-mail amount.
 14 set message_cachedir = "~/.cache/mutt"
 15 
 16
 17 
 18 
 19 # Allow Mutt to open new imap connection automatically.
 20 unset imap_passive
 21 
 22 # Keep IMAP connection alive by polling intermittently (time in seconds).
 23 set imap_keepalive = 300
 24 
 25 # How often to check for new mail (time in seconds).
 26 set mail_check = 120
 27 
 28
 29 
 30 set my_smtp_user=smtpuser
 31 set smtp_url=smtp://$my_smtp_user@smtps.mywork.fr:587
 32 
 33 set editor=vim

Imap works great, but when i tried to send an email, it ask for my password, and after i entered it i got :

SMTP session failed: 501 5.1.7 Acces refuse - Veuillez consulter http://documentation.ujf-grenoble.fr/spip.php?article80

Wich means "Access refused - Please read : http://documentation.ujf-grenoble.fr/spip.php?article80"

That's obviously a message from my smtp server, but it dit not explain why it refused the connection.
If  I enter an incorect password i get another error message , so i think authentification is correct.

So it must be linked to the security protocol STARTTLS, but i think i've already specified that i want to use it with  set ssl_starttls=yes .

Any guess here?

Last edited by GloW_on_dub (2013-03-13 15:06:11)

Offline

#2 2013-03-13 14:04:14

dag
Member
From: US
Registered: 2013-01-20
Posts: 216

Re: [SOLVED]mutt configuration with starttls stmp server

try

set ssl_force_tls = yes

Last edited by dag (2013-03-13 14:18:10)


--------------------------------------
alcoves wonder creates the wonder unto the ages; never lose that.

Offline

#3 2013-03-13 14:38:18

GloW_on_dub
Member
Registered: 2013-03-13
Posts: 389

Re: [SOLVED]mutt configuration with starttls stmp server

thx, but It does not change anything.

i've seen here somebody said it may be related to anti-viral mesure : http://does-not-exist.org/mail-archives … 18677.html, not very helping.

I wondering the meaning of the error code "501 5.1.7", is it from server , from mutt, or it is a standard error smtp code...

Offline

#4 2013-03-13 14:47:43

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: [SOLVED]mutt configuration with starttls stmp server

Try changing the url to:

set smtp_url=smtps://$my_smtp_user@smtps.mywork.fr:587

See http://dev.mutt.org/doc/manual.html#ssl and http://dev.mutt.org/doc/manual.html#smtp


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#5 2013-03-13 15:02:12

GloW_on_dub
Member
Registered: 2013-03-13
Posts: 389

Re: [SOLVED]mutt configuration with starttls stmp server

From here :  http://www.greenend.org.uk/rjk/tech/smtpreplies.html

i see that 501 mean :      Syntax error in parameters or arguments

and from here : http://www.ietf.org/rfc/rfc1893.txt

i see that 5.1.7 means :

5.X.X   Permanent Failure

       A permanent failure is one which is not likely to be resolved by
       resending the message in the current form.  Some change to the
       message or the destination must be made for successful delivery.

X.1.X   Addressing Status

          The address status reports on the originator or destination
          address.  It may include address syntax or validity.  These
          errors can generally be corrected by the sender and retried.

X.1.7   Bad sender's mailbox address syntax

          The sender's address was syntactically invalid.  This can
          apply to any field in the address.

So now it is pretty straightforward !!
The thing is imap_user and smtp_user are not the same (the two server are not administrated by same people), so mutt try to send my email from an incorect adress, using my smtp_user to create it.

i've just add these lines in my .muttrc :

 set from="imap_user@mywork.fr"
 set use_from=yes

work like a charm !!

Thx to smtp doc !

[Edit]
@ skansky : well, that was how i've formatted it first, but my smtp server at work did not handle smtps, even if  it's name begin with smtps !!!

Last edited by GloW_on_dub (2013-03-13 15:05:24)

Offline

Board footer

Powered by FluxBB