SMTP authentication by username/password (Feature #496)


Added by Hiroto Kagotani almost 7 years ago. Updated over 6 years ago.


Status:Closed Start date:09/20/2017
Priority:Normal Due date:
Assignee:- % Done:

100%

Category:Graphical Interface
Target version:1.4.0

Description

I want to use a SMTP server that requires authentication and SSL connection.

When I add a few lines into AMC-mailing.pl like following as a test, I can successfully send email via the SMTP server.

  load Email::Sender::Transport::SMTP;
  $t=Email::Sender::Transport::SMTP
    ->new({'host'=>$smtp_host,
           'port'=>$smtp_port,
           'ssl'=>1,
           'sasl_username'=>'MyUsername',
           'sasl_password'=>'MyPassword',
           });

We can simply add some GUI in the preferences dialog. (It can have some trick to help typing port number by selecting SSL mode)

But the biggest issue is how passwords should be stored. Currently, user preferences are stored in ~/.AMC.d/cf.default.xml in plain text with read permission to any user. I'm afraid it is not safe to store passwords.


History

Updated by Alexis Bienvenüe almost 7 years ago

From hg:a13ba91257a9, authenticated SMTP can be used: please test! The password is stored in a separate file that can be opened by the user only.

  • Status changed from New to Feedback
  • Target version set to 1.4.0

Updated by Hiroto Kagotani almost 7 years ago

Thank you very much.
Unfortunately, in my environment (Email::Sender 1.300011), I get

isa check for "ssl" failed: ssl is not a Boolean! at (eval 72) line 250.
        eval {...} called at (eval 72) line 249
        Email::Sender::Transport::SMTP::new("Email::Sender::Transport::SMTP", HASH(0x809bc9ee8)) called at /usr/local/lib/AMC/perl/AMC-mailing.pl line 175

in debug mode, and sending fails. If I modify

  <email_smtp_ssl>ssl</email_smtp_ssl>

to

  <email_smtp_ssl>1</email_smtp_ssl>

in cf.default.xml, AMC can successfully send email.

Thanks.

Updated by Alexis Bienvenüe almost 7 years ago

Oh yes, I was not aware of this version problem. It seems that STARTTLS/SSL appeared only with 1.300027… I'm going to adapt AMC accordingly.

  • Status changed from Feedback to In Progress

Updated by Alexis Bienvenüe almost 7 years ago

This should be better with hg:36a9d0f6f29b.

Updated by Hiroto Kagotani over 6 years ago

Alexis Bienvenüe wrote:

This should be better with hg:36a9d0f6f29b.

Thank you.
It works successfully.
Also I can get the warning message when I send with STARTTLS mode.

Thanks again.

Updated by Alexis Bienvenüe over 6 years ago

Good. Thanks for your suggestion and testing.

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF