Chris Winters wrote:
Matt's brief talk + a few nudges from other YAPC::NA folk got me
looking at qpsmtpd again. I'm interested in hooking it up to cyrus
and to that end I saw a May 25 message regarding LMTP. Is there a
working plugin available for this? I grabbed the trunk from svn and
didn't see one in plugins/.
Thanks,
Chris
--
Chris Winters ([EMAIL PROTECTED])
Building enterprise-capable snack solutions since 1988.
Mine is so site-specialized, and it relies on about a
dozen scripts on the dspam/mysql/cyrus server.
Also this srs conversation is about to cause more
changes.
Maybe I'll just show you some snips out of a 10k plugin.
It's too site-specialized, untested, and changing all the
time.
foreach $r ( @received ) {
$auth = $r =~ s/.*(smtp-auth).*($from_esc_at).*($mta).*/$1/s
unless $auth ;
}
do srs stuff if sender $auth and recipient not local
foreach $to ( &to_list ( $self , $transaction ) , @bcc_sent ) {
if ( $to ) {
$to_user = lc substr ( $to , 0 , index ( $to , '@' ) ) ;
$msg_id = &_msg_id ( $self , $transaction , $from_host , $MSG_N++ ) ;
$to_host = lc substr ( $to , ( index ( $to , '@' ) + 1 ) ) ;
$transaction->header->delete( 'Delivered-To' ) ;
$transaction->header->add( 'Delivered-To' , $to , 0 ) ;
my $lmtp = Net::LMTP->new( '192.168.1.3' , 24 ,
Timeout=>60 ,
Hello => 'here:perlq' );
if ( $lmtp and $transaction->body_size ) {
if ( index ( $from , '@' ) + 1 ) {
$lmtp->mail ( $from_user . '@' . $from_host ) ;
}
else {
$lmtp->mail ( $from ) ;
}
$lmtp->to( $to_user . '@' . $to_host ) ;
$lmtp->data ;
$lmtp->datasend( $transaction->header->as_string ) ;
$transaction->body_resetpos ;
$lmtp->datasend( $line )
while $line = $transaction->body_getline ;
$lmtp->dataend ;
$lmtp->quit ;
undef $lmtp ;
}
# if not local then--
my $qm_msg_id = &qmail_relay ( $self , $transaction )
if ( $#Q + 1 ) and $Q[0] ;
-Bob