1 |
diff -ruN e-smith-email-5.2.0.old/root/etc/e-smith/db/configuration/migrate/20smtp-auth-proxy-Blacklist e-smith-email-5.2.0/root/etc/e-smith/db/configuration/migrate/20smtp-auth-proxy-Blacklist |
2 |
--- e-smith-email-5.2.0.old/root/etc/e-smith/db/configuration/migrate/20smtp-auth-proxy-Blacklist 1970-01-01 01:00:00.000000000 +0100 |
3 |
+++ e-smith-email-5.2.0/root/etc/e-smith/db/configuration/migrate/20smtp-auth-proxy-Blacklist 2012-07-03 04:52:35.000000000 +0100 |
4 |
@@ -0,0 +1,8 @@ |
5 |
+{ |
6 |
+ my $MD5Patch = $DB->get_prop_and_delete('smtp-auth-proxy','MD5Patch') or return; |
7 |
+ |
8 |
+ if ($MD5Patch eq 'enabled') |
9 |
+ { |
10 |
+ $DB->set_prop('smtp-auth-proxy','Blacklist', 'CRAM-MD5 DIGEST-MD5'); |
11 |
+ } |
12 |
+} |
13 |
diff -ruN e-smith-email-5.2.0.old/root/usr/local/sbin/smtp-auth-proxy.pl e-smith-email-5.2.0/root/usr/local/sbin/smtp-auth-proxy.pl |
14 |
--- e-smith-email-5.2.0.old/root/usr/local/sbin/smtp-auth-proxy.pl 2012-07-03 04:49:06.000000000 +0100 |
15 |
+++ e-smith-email-5.2.0/root/usr/local/sbin/smtp-auth-proxy.pl 2012-07-03 04:49:33.000000000 +0100 |
16 |
@@ -23,6 +23,7 @@ |
17 |
my $smtp_proxy_rec = $config->get('smtp-auth-proxy'); |
18 |
|
19 |
$prop->{SMTPSmartHost} = $config->get_value('SMTPSmartHost'); |
20 |
+ $prop->{Blacklist} = $smtp_proxy_rec->prop('Blacklist') || " "; |
21 |
$prop->{Userid} = $smtp_proxy_rec->prop('Userid'); |
22 |
$prop->{Passwd} = $smtp_proxy_rec->prop('Passwd'); |
23 |
$prop->{Debug} = $smtp_proxy_rec->prop('Debug'); |
24 |
@@ -92,7 +93,10 @@ |
25 |
|
26 |
if ($smtp->supports("AUTH")) |
27 |
{ |
28 |
- unless ($smtp->auth($name, $pass)) |
29 |
+ foreach (split (/ /, $self->get_property('Blacklist'))) |
30 |
+ {${*$smtp}{'net_smtp_esmtp'}->{"AUTH"} =~ s/$_//;} |
31 |
+ |
32 |
+ unless ($smtp->auth($name, $pass)) |
33 |
{ |
34 |
print "451 Could not auth to mail server\n"; |
35 |
warn "SMTP authentication with ISP server failed\n"; |