MANIFEST
Makefile.PL
My-Audit.pm
-lacemail-accept
-lacemail-submit
+perlmail-accept
+perlmail-submit
+perlmail-sendmail
WriteMakefile(
- "NAME"=>"LaceMail",
- "AUTHOR"=>"Jan Kratochvil <project-LaceMail\@jankratochvil.net>",
+ "NAME"=>"PerlMail",
+ "AUTHOR"=>"Jan Kratochvil <project-PerlMail\@jankratochvil.net>",
"VERSION_FROM"=>"Makefile.PL",
"depend"=>{"Makefile"=>'$(VERSION_FROM)'},
"PREREQ_PM"=>{
"User::Utmp"=>0,
"WWW::SMS::TMobileCZ"=>0,
},
- "EXE_FILES"=>["lacemail-accept","lacemail-submit","lacemail-sendmail","contacts-n9k2mutt"],
+ "EXE_FILES"=>["perlmail-accept","perlmail-submit","perlmail-sendmail","contacts-n9k2mutt"],
);
"iscompany"=>($record{"Name"} && $record{"Company"} && $record{"Name"} eq $record{"Company"}),
}));
} @record);
- } PrecislovaniLace::Contacts->import($_));
+ } Contacts->import($_));
my @nicked=map({
my $data=$_;
my($name,$mail,$attr,$iscompany)=map(($data->{$_}),qw(name mail attr iscompany));
INIT {
require Sys::Syslog;
- Sys::Syslog::openlog("lacemail","pid","mail");
+ Sys::Syslog::openlog("perlmail","pid","mail");
my @syslogging_stack;
sub syslogging_on_save
{
exit 0;
}
-# FIXME: separate 'lacemail'-transfer together with lacemail-submit away
+# FIXME: separate 'perlmail'-transfer together with perlmail-submit away
sub inetd
{
die "Excessive arguments" if @ARGV;
local $Audit=Mail::Audit->new(
"emergency"=>"$Mail/emergency",
"data"=>[map("$_\n",split("\n",$message))],
- "log"=>"$HOME/.lacemail.log",
+ "log"=>"$HOME/.perlmail.log",
"loglevel"=>99,
);
local @AuditStored=();
open CHILD,'|'
.'('.'(razor-check 2>&1;echo >&3 $?)'
.'|sed "s/^/razor-check: /"'
- .'|logger -t "lacemail['.$$.']" -p mail.crit'
+ .'|logger -t "perlmail['.$$.']" -p mail.crit'
.') 3>&1'
.'|exit `cat`'
or return 0;
}
# FIXME: Unify
-# BEGIN lacemail-sendmail
+# BEGIN perlmail-sendmail
# return: Mail::Address instance or undef()
sub parseone
{
warn "Got ".scalar(@r)." addresses while wanting just one; when parsing: $line" if 1!=@r;
return $r[0];
}
-# END lacemail-sendmail
+# END perlmail-sendmail
# FIXME: host may get multiple recipients and thus not showing "for <...>"
# FIXME: muttrc_get("from") is too strict
$text=~s/\b\Q$from\E\b/$to/gsi;
}
return if $text eq $orig;
- $Audit->put_header("X-LaceMail-header_remap-$header",$orig);
+ $Audit->put_header("X-PerlMail-header_remap-$header",$orig);
$Audit->replace_header($header,$text);
}
);
-# FIXME: modularized unification with 'lacemail-accept'
-# BEGIN lacemail-accept
+# FIXME: modularized unification with 'perlmail-accept'
+# BEGIN perlmail-accept
our %muttrc_pending=();
sub muttrc
{
}
return wantarray() ? %r : $r{$r[0]};
}
-# END lacemail-accept
+# END perlmail-accept
sub sendmail_show { return "\"$sendmail_orig\" ".join(",",map("\"$_\"",@ARGV)); }
my $opt_t;
our $opt_f;
#my $opt_F; # declared before &FromAddress already
-my $opt_lacemail_dry_run;
+my $opt_perlmail_dry_run;
my @ARGV_save=@ARGV; # for non-bm mode
die if !Getopt::Long::GetOptions(
"b=s" ,\$opt_b,
"t" ,\$opt_t,
"f=s" ,\$opt_f,
"F=s" ,\$opt_F,
- "lacemail-dry-run+",\$opt_lacemail_dry_run,
+ "perlmail-dry-run+",\$opt_perlmail_dry_run,
);
if (0
# RedHat sendmail-8.12.5-7/sendmail/main.c/\QDo a quick prescan of the argument list.\E
local $SIG{"PIPE"}=sub { die "Got SIGPIPE from ".sendmail_show(); };
local *SENDMAIL;
- if ($opt_lacemail_dry_run) {
+ if ($opt_perlmail_dry_run) {
print sendmail_show()."\n";
*SENDMAIL=\*STDOUT;
}
}
}
- next if $opt_lacemail_dry_run; # don't close our STDOUT as it is aliased to *SENDMAIL
+ next if $opt_perlmail_dry_run; # don't close our STDOUT as it is aliased to *SENDMAIL
close SENDMAIL or warn "close(".sendmail_show()."): $?=".join(",",
(!WIFEXITED($?) ? () : ("EXITSTATUS(".WEXITSTATUS($?).")")),
(!WIFSIGNALED($?) ? () : ("TERMSIG(" .WTERMSIG($?) .")")),
use Fcntl qw(:flock);
-my $Lock_pathname="/tmp/LaceMail.lock";
+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="LaceMail_folder";
+my $DB_table="PerlMail_folder";
my $DBI_database="short";
my $DBI_user="short";
my $DBI_pwd=$ENV{"HOME"}."/priv/mysql.".$DBI_user.".pwd";
"submit" ,\&submit,
"pending",\&pending,
"clean:s",\&clean,
- "V|version",sub { print "lacemail-submit: $VERSION\n"; exit 0; },
+ "V|version",sub { print "perlmail-submit: $VERSION\n"; exit 0; },
);
exit 0;