diff options
| author | fukachan <fukachan> | 2001-02-12 15:50:40 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-02-12 15:50:40 +0000 |
| commit | 28cf7e030d92fda176fc7a03d420d2336a478932 (patch) | |
| tree | 483ef417c0380c515eb0107c7649f42836267c46 /fml/lib/FML/Process | |
| parent | dafc401fb52418e6584beb2f366f01fb74d29526 (diff) | |
| download | fml8-28cf7e030d92fda176fc7a03d420d2336a478932.tar.gz fml8-28cf7e030d92fda176fc7a03d420d2336a478932.tar.bz2 fml8-28cf7e030d92fda176fc7a03d420d2336a478932.zip | |
log smtp transaction at _smtplogterm-smtp-servers-0-0
Diffstat (limited to 'fml/lib/FML/Process')
| -rw-r--r-- | fml/lib/FML/Process/Distribute.pm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fml/lib/FML/Process/Distribute.pm b/fml/lib/FML/Process/Distribute.pm index 848fe577..5b06b50e 100644 --- a/fml/lib/FML/Process/Distribute.pm +++ b/fml/lib/FML/Process/Distribute.pm @@ -202,6 +202,24 @@ sub _deliver_article my $fp = sub { Log(@_);}; # pointer to the log function my $sfp = sub { my ($s) = @_; print $s; print "\n" if $s !~ /\n$/o;}; + + { # debug + my $dir = $config->{ smtp_log_dir }; + use FML::Utils qw(mkdirhier); + mkdirhier($dir) unless -d $dir; + + my $f = $config->{ smtp_log_file }; + unlink $f if -f $f; + if ($f) { + use FileHandle; + my $fh = new FileHandle "> $f"; + if (defined $fh) { + $fh->autoflush(1); + $sfp = sub { print $fh @_;}; + } + } + } + my $service = new MailingList::Delivery { log_function => $fp, smtp_log_function => $sfp, |
