projects
/
clearscm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Hopefully final adjustments to certbot
[clearscm.git]
/
maps
/
bin
/
MAPSDeliver
diff --git
a/maps/bin/MAPSDeliver
b/maps/bin/MAPSDeliver
index
05ceafd
..
38596c0
100755
(executable)
--- a/
maps/bin/MAPSDeliver
+++ b/
maps/bin/MAPSDeliver
@@
-20,13
+20,14
@@
use warnings;
use FindBin;
use FindBin;
-use lib $FindBin::Bin;
+use lib "$FindBin::Bin/../lib";
+use lib "$FindBin::Bin/../../lib";
use MAPSFile;
use MAPSFile;
-use MAPS
DB
;
+use MAPS;
use MAPSLog;
use MAPSLog;
-sub DeliverMail
($$) {
+sub DeliverMail($$) {
my ($userid, $msgfileName) = @_;
# Open maildrop file
my ($userid, $msgfileName) = @_;
# Open maildrop file
@@
-42,8
+43,7
@@
sub DeliverMail ($$) {
# Write msgfile -> $maildrop
print $maildrop "\n\n";
# Write msgfile -> $maildrop
print $maildrop "\n\n";
- print $maildrop $_
- while (<$msgfile>);
+ print $maildrop $_ while (<$msgfile>);
# Unlock the file
Unlock $maildrop;
# Unlock the file
Unlock $maildrop;
@@
-61,14
+61,19
@@
my ($userid, $msgfile) = @ARGV;
die 'User id not specified' unless $userid;
die 'Msgfile not specified' unless $msgfile;
die 'User id not specified' unless $userid;
die 'Msgfile not specified' unless $msgfile;
-my $err
= DeliverMail $userid, $msgfile
;
+my $err
msg = DeliverMail($userid, $msgfile)
;
-if ($err) {
-
OpenDB 'mapsadmin', 'mapsadmin'
;
+if ($err
msg
) {
+
#OpenDB('maps', 'spam')
;
-
MAPSDB::SetContext $userid
;
+
SetContext($userid)
;
- Error $err;
+ Error(
+ userid => $userid,
+ message => $errmsg,
+ );
+
+ exit 1;
} # if
} # if
-exit
$err ? 1 :
0;
+exit 0;