Re: [exim] Exim Webmin Module.

Page principale
Supprimer ce message
Répondre à ce message
Auteur: gpeel
Date:  
À: Caines, Max, Todd Lyons
CC: exim-users
Sujet: Re: [exim] Exim Webmin Module.
Nice Job Max, thanks a million!

I will submit to Jamie (hint,hint) and perhaps he will repackage the version
on the webmin site with your new (and improved) Message.pl

Dare I ask what part of the code was broken?

-G

On Tue, 17 Jan 2012 13:54:04 -0000, Caines, Max wrote
> Hi
>
> I put Webmin on our Exim servers recently, and did a fix myself. I
> enclose the fixed module, which is Message.pm, which on a default
> install is in /opt/webmin/exim/Exim
>
> Regards
>
> Max Caines
> University of Wolverhampton
>
> > -----Original Message-----
> > From: exim-users-bounces+max.caines=wlv.ac.uk@??? [mailto:exim-
> > users-bounces+max.caines=wlv.ac.uk@???] On Behalf Of gpeel
> > Sent: 17 January 2012 00:05
> > To: Todd Lyons
> > Cc: exim-users@???
> > Subject: Re: [exim] Exim Webmin Module.
> >
> > Hi Todd, thanks for the reply...please see below.
> >
> > On Mon, 16 Jan 2012 11:28:08 -0800, Todd Lyons wrote
> > > On Mon, Jan 16, 2012 at 6:15 AM, Grant Peel <gpeel@???>
> > wrote:
> > > > Hi all,
> > > >
> > > > The perl code below has is a file from a Webmin module used to
> > interface
> > with Exim, show stats manage queue etc. The issue is that the date does
> > not
> > decode properly. The code is quite old, and I have been hacking at it
> > for
> > weeks trying to get it to work correctly. I have attempted to contact
> > the
> > original developer, but suspect his email is not been checked.
> > >
> > > The code works fine in my limited testing.
> >
> > Actually, if you were to look at the result(s) in the webmin module, it
> > does
> > not work even closely. The Times and date are completely whacked...
> >
> > >
> > > > I am posting to this list thinking perhaps some of you may have some
> > expierence with the base62 encoding, and hopefully perl!
> > > >
> > > > If anyone would like to take a shot at it ....
> > > >
> > > > Example
> > > > 1RkkUB-000CAI-Ce        is being decoded a s:         Sat Apr 23
> > 16:10:52 2005
> > > > which is not correct.
> > >
> > > Probably because you're passing the whole message id string to the
> > > function instead of just the portion which is the datetime. Observe,
> > > using your data:
> >
> > Sorry Todd, I am not passing anything, I did not write the code, a
> > fellow
> > named Alexander did. I tried to understand it but I think it is way
> > above my
> > head. I suspect I should take a sceen shot of the results, post that
> > along
> > with the whole module and see if anyone wants to take a shot at it...
> >
> > >
> > > $ perl test.pl 1RkkUB-000CAI-Ce
> > > Starting with 1RkkUB-000CAI-Ce
> > > Reduced to 1RkkUB
> > > Seconds since Jan 1 1970: 1326235687
> > > Tue Jan 10 14:48:07 2012
> > > Tue Jan 10 22:48:07 2012
> > >
> > > You have to strip all the extra cruft after and including the first
> > > dash. Only the first 6 characters are significant for time
> > > calculation.
> > >
> > > Experiment with this:
> > >
> > > #!/usr/bin/perl
> > > use strict;
> > > use warnings;
> > >
> > > my $id = shift() || '1Rmrv2-0001v1-T6';
> > > print "Starting with $id\n";
> > > my $tm;
> > >
> > > ($tm = $id) =~ s/^([0-9a-zA-Z]{6})-[0-9a-zA-Z]{6}-[0-9a-zA-
> > > Z]{2}$/$1/ ? print "Reduced to $tm\n" : die ("Not proper format
> > > of message ID"); print "Extracted time portion: $id\n";
> > >
> > > my $seconds = base62_to_decimal($id);
> > > print "Seconds since Jan 1 1970: $seconds\n";
> > > print scalar localtime($seconds),"\n";
> > > print scalar gmtime($seconds),"\n";
> > >
> > > ...Todd
> > > --
> > > SOPA: Any attempt to [use legal means to] reverse technological
> > > advances is doomed.  --Leo Leporte
> > >
> > > --
> > > ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> > > ## Exim details at http://www.exim.org/
> > > ## Please use the Wiki with this list - http://wiki.exim.org/
> >
> >
> > --
> > ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> > ## Exim details at http://www.exim.org/
> > ## Please use the Wiki with this list - http://wiki.exim.org/
>
> --
> Scanned by iCritical.