use strict;
use warnings;
+use File::Basename;
+BEGIN {
+ use lib $ENV{"PERLMAIL_BASEDIR"} || File::Basename::dirname($0);
+ use PerlMail::Config;
+ }
+
use Getopt::Long;
use DBI;
use Carp qw(cluck confess);
use Fcntl qw(:flock);
-my $Lock_pathname="/tmp/PerlMail.lock";
-#my $PeerAddr="dejhome.dyn.jankratochvil.net.:852";
-my $PeerAddr="127.0.0.1:2852";
-my $Socket_timeout=7600; # 15sec is NOT enough!
-my $DB_table="PerlMail_folder";
-my $DBI_database="short";
-my $DBI_user="short";
-my $DBI_pwd=$ENV{"HOME"}."/priv/mysql.".$DBI_user.".pwd";
open DBI_PWD,$DBI_pwd or die "open \"$DBI_pwd\": $!";
$DBI_pwd=<DBI_PWD>;
close DBI_PWD or warn "close DBI_pwd: $!";