X-Git-Url: http://git.jankratochvil.net/?p=PerlMail.git;a=blobdiff_plain;f=perlmail-submit;h=b367979f2612c9e4bb0a1bebf1e5b6de2c19ac3a;hp=8a452adda8b01dd4197092987acbae9b2056b88b;hb=be8e1bc69e15a29e52d8bbcde5971214a5b8340b;hpb=ba95562b1683631fd058e10bb8205dfecd3e3fe8 diff --git a/perlmail-submit b/perlmail-submit index 8a452ad..b367979 100755 --- a/perlmail-submit +++ b/perlmail-submit @@ -1,12 +1,34 @@ #! /usr/bin/perl -# +# # $Id$ +# Copyright (C) 2002-2003 Jan Kratochvil +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + use vars qw($VERSION); $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; 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); @@ -16,14 +38,6 @@ use POSIX qw(mktime); 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=; close DBI_PWD or warn "close DBI_pwd: $!";