Log message: No worthy mechs found
Scott Bronson
bronson at rinspin.com
Thu Jul 10 13:51:30 EDT 2003
On Thu, 2003-07-10 at 05:19, Ken Murchison wrote:
> What is this perl script trying to do? Can you get a protocol dump?
The script:
I require a server-side sent directory. That way, I don't have to try
to synchronize the sent directory on the three clients that I use, and
we have a copy of every outgoing mail sent
So, in Postfix, I say: always_bcc = storesent
and in /etc/aliases: storesent: |/usr/sbin/storesent
That way, Postfix invokes this script on every message that passes
through the mail server. The script throws out the messages with
non-local origin and then saves the rest in the appropriate user's
mailbox. I've been doing this for years on Courier -- it takes
about a 10-line script.
Here's where the authentication happens:
my $userid = shift;
my $cl = Cyrus::IMAP::Admin->new('localhost');
die "Could not connect to Cyrus server" .
($! ? ": $!\n" : "\n") unless $cl;
my $rc = $cl->authenticate('-user' => $user, '-password' => $pass);
die "Could not log in: " . $cl->error . "\n" unless $rc;
# check for the existence of the Sent folder
unless( $cl->list("user.$userid.$sent") ) {
# doesn't exist, so create it.
$cl->create("user.$userid.$sent");
die "Could not create user.$userid.$sent: " .
$cl->error . "\n" if $cl->error;
}
...
I've included the entire script as an attachment.
It must be possible to get a protocol dump, but I'm not sure how.
Is there a flag I can turn on in Perl to get the Cyrus::IMAP::Admin
module to log all LMTP traffic? Feel free to comment, no matter how
harshly. :)
Thanks,
- Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ss.bak
Type: text/x-perl
Size: 4662 bytes
Desc: not available
Url : https://lists.andrew.cmu.edu/mailman/private/info-cyrus/attachments/20030710/fd2e1dca/ss.bin
More information about the Info-cyrus
mailing list