1 |
diff -ruN e-smith-email-5.0.0.old/root/usr/local/sbin/smtp-auth-proxy.pl e-smith-email-5.0.0/root/usr/local/sbin/smtp-auth-proxy.pl |
2 |
--- e-smith-email-5.0.0.old/root/usr/local/sbin/smtp-auth-proxy.pl 2012-06-30 23:22:56.000000000 +0100 |
3 |
+++ e-smith-email-5.0.0/root/usr/local/sbin/smtp-auth-proxy.pl 2012-06-30 23:36:02.000000000 +0100 |
4 |
@@ -23,6 +23,7 @@ |
5 |
my $smtp_proxy_rec = $config->get('smtp-auth-proxy'); |
6 |
|
7 |
$prop->{SMTPSmartHost} = $config->get_value('SMTPSmartHost'); |
8 |
+ $prop->{Blacklist} = $smtp_proxy_rec->prop('Blacklist') || " "; |
9 |
$prop->{Userid} = $smtp_proxy_rec->prop('Userid'); |
10 |
$prop->{Passwd} = $smtp_proxy_rec->prop('Passwd'); |
11 |
$prop->{Debug} = $smtp_proxy_rec->prop('Debug'); |
12 |
@@ -92,7 +93,10 @@ |
13 |
|
14 |
if ($smtp->supports("AUTH")) |
15 |
{ |
16 |
- unless ($smtp->auth($name, $pass)) |
17 |
+ foreach (split (/ /, $self->get_property('Blacklist'))) |
18 |
+ {${*$smtp}{'net_smtp_esmtp'}->{"AUTH"} =~ s/$_//;} |
19 |
+ |
20 |
+ unless ($smtp->auth($name, $pass)) |
21 |
{ |
22 |
print "451 Could not auth to mail server\n"; |
23 |
warn "SMTP authentication with ISP server failed\n"; |