Re: [PATCH] send-email: Net::SMTP::SSL is obsolete, use only when necessary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2017-03-18 at 23:47 +0100, Ævar Arnfjörð Bjarmason wrote:

> On Sat, Mar 18, 2017 at 11:23 PM, Dennis Kaarsemaker
> <dennis@xxxxxxxxxxxxxxx> wrote:
>
> > +               require Net::SMTP;
> > +               my $use_net_smtp_ssl = $Net::SMTP::VERSION lt "1.28";
> > +               $smtp_domain ||= maildomain();
> > +
> 
> While Net::SMTP is unlikely to change its versioning scheme, let's use
> comparisons via the version module here in case they do change it to
> something silly, and this ends up introducing a bug.

ok.

> > [...]
> > +                                       if ($smtp->code != 220) {
> > +                                               die sprintf(__("Server does not support STARTTLS! %s"), $smtp->message);
> 
> Here a new message you're adding gets __(), makes sense.

Didn't add it, it just moved from a bit further below :)

> > +                               else {
> > +                                       $smtp->starttls(ssl_verify_params())
> > +                                               or die "STARTTLS failed! ".IO::Socket::SSL::errstr();
> > +                               }
> 
> I see you just copied that from above but I wonder if it makes sense
> to just mark both occurrences with __() too while we're at it.

ok.

D.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]