summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process/Distribute.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2006-03-25 04:07:26 +0000
committerfukachan <fukachan>2006-03-25 04:07:26 +0000
commitdc3acdadcfb6ebc58df6ca4531f2db1ced25dfa6 (patch)
treeeb97810dd5d2960a7ded11cfebef6545b9c39772 /fml/lib/FML/Process/Distribute.pm
parenta54a4d0893c4f64fab7c38747b2237ed722c9779 (diff)
downloadfml8-dc3acdadcfb6ebc58df6ca4531f2db1ced25dfa6.tar.gz
fml8-dc3acdadcfb6ebc58df6ca4531f2db1ced25dfa6.tar.bz2
fml8-dc3acdadcfb6ebc58df6ca4531f2db1ced25dfa6.zip
rewritten to use access methods to sync w/ Mail::Delivery overhaul.
Diffstat (limited to 'fml/lib/FML/Process/Distribute.pm')
-rw-r--r--fml/lib/FML/Process/Distribute.pm24
1 files changed, 14 insertions, 10 deletions
diff --git a/fml/lib/FML/Process/Distribute.pm b/fml/lib/FML/Process/Distribute.pm
index 082748da..87c7362e 100644
--- a/fml/lib/FML/Process/Distribute.pm
+++ b/fml/lib/FML/Process/Distribute.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001,2002,2003,2004,2005,2006 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Distribute.pm,v 1.170 2006/03/19 08:06:05 fukachan Exp $
+# $FML: Distribute.pm,v 1.171 2006/03/21 07:04:07 fukachan Exp $
#
package FML::Process::Distribute;
@@ -360,7 +360,7 @@ sub finish
$curproc->queue_flush();
}
else {
- $curproc->logwarn("not queue flush due to MTA fatal error.");
+ $curproc->logwarn("queue remains due to MTA fatal error.");
}
$eval = $config->get_hook( 'distribute_finish_end_hook' );
@@ -598,15 +598,18 @@ sub _deliver_article
}
# 2. distribute article
- my $fp = sub { $curproc->logdebug(@_);}; # pointer to the log function
- my $sfp = sub { my ($s) = @_; print $s; print "\n" if $s !~ /\n$/o;};
+ my $fp_log_info = sub { $curproc->logdebug(@_);};
+ my $fp_log_error = sub { $curproc->logerror(@_);};
+ my $fp_smtplog = sub {
+ my ($s) = @_; print $s; print "\n" if $s !~ /\n$/o;
+ };
my $handle = undef;
- # overload $sfp log function pointer.
+ # overload $fp_smtplog log function pointer.
if ($config->yes('use_smtp_log')) {
my $wh = $curproc->outgoing_message_cache_open();
if (defined $wh) {
- $sfp = sub { print $wh @_;};
+ $fp_smtplog = sub { print $wh @_;};
$handle = undef; # $wh;
}
else {
@@ -614,7 +617,7 @@ sub _deliver_article
}
}
else {
- $sfp = sub {};
+ $fp_smtplog = sub {};
}
# address validater
@@ -630,9 +633,10 @@ sub _deliver_article
eval q{
use Mail::Delivery;
$service = new Mail::Delivery {
- log_function => $fp,
- smtp_log_function => $sfp,
- smtp_log_handle => $handle,
+ log_info_function => $fp_log_info,
+ log_error_function => $fp_log_error,
+ smtp_log_function => $fp_smtplog,
+ smtp_log_handle => $handle,
address_validate_function => $validater,
};
};