Re: [Exim] Forwarding SMTP AUTH (RFC 2554)

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: John Jetmore
Ημερομηνία:  
Προς: Mike Richardson
Υ/ο: Everton da Silva Marques, exim-users
Αντικείμενο: Re: [Exim] Forwarding SMTP AUTH (RFC 2554)
On Mon, 5 May 2003, Mike Richardson wrote:

> The exim authenticator's server condition should be able to check the output
> of an external command (I'm sure someone will correct me if it can't) so
> write a perl script which runs against the SMTP AUTH system sending commands
> (based on input from the exim process) and parsing the output. Shouldn't be
> too difficult :-)


I'm sure anyone on this list could have written this script, but I love
abusing technology so the idea of using an SMTP server as some sort of
radius-replacement amused me enough that I had to play w/ it. Since I
wrote it might as well share it:

<script>
#!/usr/bin/perl

use strict;
use Net::SMTP;

my $server = shift || exit 1;
my $user = shift || exit 2;
my $pass = shift || exit 3;

my $smtp = Net::SMTP->new($server, Timeout => 5) || exit 4;
$smtp->auth($user, $pass) || exit 5;
$smtp->quit();

exit 0;
</script>

I didn't get to actually implement this as an authenticator because of
time constraints, but this should work:

auth_plain:
driver = plaintext
public_name = PLAIN
server_condition = ${run{COMMAND SERVER $2 $3}{Yes}{No}}
server_set_id = $2

Login is similar, but note there's no way to get this to work for CARM-MD5

--John