/[smeserver]/rpms/e-smith-email/sme8/e-smith-email-5.2.0-AuthOrder.patch
ViewVC logotype

Contents of /rpms/e-smith-email/sme8/e-smith-email-5.2.0-AuthOrder.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Mon Jan 13 15:47:07 2014 UTC (10 years, 9 months ago) by wellsi
Branch: MAIN
CVS Tags: e-smith-email-5_2_0-24_el5_sme, e-smith-email-5_2_0-27_el5_sme, e-smith-email-5_2_0-23_el5_sme, e-smith-email-5_2_0-25_el5_sme, e-smith-email-5_2_0-26_el5_sme, e-smith-email-5_2_0-28_el5_sme, HEAD
* Mon Jan 13 2014 Ian Wells <esmith@wellsi.com> 5.2.0-23.sme
- Only present one auth method at a time, in order, to NET::SMTP,
  by Charlie Brady [SME: 6993]
  Second hunk in patch converts tabs to spaces, no code change.

* Sat Jun 29 2013 Ian Wells <esmith@wellsi.com> 5.2.0-22.sme
- Fetchmail multidrop mode follows TCPPort setting, by Hans Riethmann [SME: 7045]

1 diff -ruN e-smith-email-5.4.0.old/root/usr/local/sbin/smtp-auth-proxy.pl e-smith-email-5.4.0/root/usr/local/sbin/smtp-auth-proxy.pl
2 --- e-smith-email-5.4.0.old/root/usr/local/sbin/smtp-auth-proxy.pl 2013-02-06 13:56:01.000000000 -0800
3 +++ e-smith-email-5.4.0/root/usr/local/sbin/smtp-auth-proxy.pl 2013-12-14 12:27:33.000000000 -0800
4 @@ -114,13 +114,29 @@
5
6 if ($smtp->supports("AUTH"))
7 {
8 - foreach (split (/ /, $self->get_property('Blacklist')))
9 - {${*$smtp}{'net_smtp_esmtp'}->{"AUTH"} =~ s/$_//;}
10 -
11 - unless ($smtp->auth($name, $pass))
12 + my $authenticated = 0;
13 + my $blacklist = $self->get_property('Blacklist') || "";;
14 + foreach my $method (split (/ /, ${*$smtp}{'net_smtp_esmtp'}->{"AUTH"}))
15 + {
16 + # Skip $method if in the blacklist
17 + next unless ($blacklist !~ /$method/);
18 + # Only present one auth method at a time to NET::SMTP
19 + {${*$smtp}{'net_smtp_esmtp'}->{"AUTH"} = $method;}
20 +
21 + if ($smtp->auth($name, $pass))
22 + {
23 + $authenticated++;
24 + last;
25 + }
26 + else
27 + {
28 + warn "SMTP authentication (with $method) with ISP server failed\n";
29 + }
30 + }
31 + unless ($authenticated)
32 {
33 print "451 Could not auth to mail server\n";
34 - warn "SMTP authentication with ISP server failed\n";
35 + warn "all SMTP authentication methods failed\n";
36 $smtp->quit;
37 exit;
38 }
39 @@ -133,19 +149,19 @@
40
41 my $discard = <STDIN>; # Swallow EHLO
42 while (my $msg = shift @ehlo) {
43 - my $sep = (@ehlo ? "-" : " ");
44 - print "250$sep$msg";
45 + my $sep = (@ehlo ? "-" : " ");
46 + print "250$sep$msg";
47 }
48
49 die "can't fork: $!" unless defined ($kidpid = fork());
50 if ($kidpid)
51 {
52 - print $smtp $_ while <STDIN>;
53 + print $smtp $_ while <STDIN>;
54 kill ("TERM" => $kidpid);
55 }
56 else
57 {
58 - print while <$smtp>;
59 + print while <$smtp>;
60 kill ("TERM" => getppid());
61 }
62 }

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed