summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Command
diff options
context:
space:
mode:
authorfukachan <fukachan>2003-03-14 03:44:14 +0000
committerfukachan <fukachan>2003-03-14 03:44:14 +0000
commit8a6721908daa3154cbe9c4bc95a7fd158eb36810 (patch)
tree860473f0d8cca2a7c11440f32da0e6b95ca0abe0 /fml/lib/FML/Command
parent0f6cc50e32bfcf4bd0d1d9dc29bf4d34e129a497 (diff)
downloadfml8-8a6721908daa3154cbe9c4bc95a7fd158eb36810.tar.gz
fml8-8a6721908daa3154cbe9c4bc95a7fd158eb36810.tar.bz2
fml8-8a6721908daa3154cbe9c4bc95a7fd158eb36810.zip
fmlsuper is obsolete.
use "makefml mailq $ml" instead of fmlsuper to show outgoing mail queue.
Diffstat (limited to 'fml/lib/FML/Command')
-rw-r--r--fml/lib/FML/Command/Admin/MANIFEST.euc-jp4
-rw-r--r--fml/lib/FML/Command/Admin/mailq.pm115
2 files changed, 118 insertions, 1 deletions
diff --git a/fml/lib/FML/Command/Admin/MANIFEST.euc-jp b/fml/lib/FML/Command/Admin/MANIFEST.euc-jp
index b117c56a..ecebbbf9 100644
--- a/fml/lib/FML/Command/Admin/MANIFEST.euc-jp
+++ b/fml/lib/FML/Command/Admin/MANIFEST.euc-jp
@@ -58,6 +58,8 @@ changepassword パスワードの変更
addmoderator モデレータの追加
delmoderator モデレータの削除
+mailq 配送予定のメールキュー
+
○ 未実装
@@ -72,4 +74,4 @@ moderatormod 属性を変更するコマンドは必要だろうか?
help admin のヘルプファイルを取り寄せる
-$FML: MANIFEST.euc-jp,v 1.10 2003/02/01 13:53:55 fukachan Exp $
+$FML: MANIFEST.euc-jp,v 1.11 2003/03/11 14:44:49 fukachan Exp $
diff --git a/fml/lib/FML/Command/Admin/mailq.pm b/fml/lib/FML/Command/Admin/mailq.pm
new file mode 100644
index 00000000..8d30c018
--- /dev/null
+++ b/fml/lib/FML/Command/Admin/mailq.pm
@@ -0,0 +1,115 @@
+#-*- perl -*-
+#
+# Copyright (C) 2003 MURASHITA Takuya
+# All rights reserved. This program is free software; you can
+# redistribute it and/or modify it under the same terms as Perl itself.
+#
+# $FML: mailq.pm,v 1.8 2003/02/13 14:06:13 fukachan Exp $
+#
+
+package FML::Command::Admin::mailq;
+use strict;
+use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
+use Carp;
+
+
+=head1 NAME
+
+FML::Command::Admin::mailq - show outgoing mail queue.
+
+=head1 SYNOPSIS
+
+See C<FML::Command> for more details.
+
+=head1 DESCRIPTION
+
+change delivery mode from real time to digest.
+
+=head1 METHODS
+
+=head2 C<process($curproc, $command_args)>
+
+=cut
+
+
+# Descriptions: constructor.
+# Arguments: OBJ($self)
+# Side Effects: none
+# Return Value: OBJ
+sub new
+{
+ my ($self) = @_;
+ my ($type) = ref($self) || $self;
+ my $me = {};
+ return bless $me, $type;
+}
+
+
+# Descriptions: need lock or not
+# Arguments: none
+# Side Effects: none
+# Return Value: NUM( 1 or 0)
+sub need_lock { 1;}
+
+
+# Descriptions: change delivery mode from real time to digest.
+# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args)
+# Side Effects: update $recipient_map
+# Return Value: none
+sub process
+{
+ my ($self, $curproc, $command_args) = @_;
+
+ $self->_queue($curproc);
+}
+
+
+# Descriptions: open mail queue and list up.
+# Arguments: OBJ($self) OBJ($curproc)
+# Side Effects: none
+# Return Value: none
+sub _queue
+{
+ my ($self, $curproc) = @_;
+ my $config = $curproc->config();
+ my $queue_dir = $config->{ mail_queue_dir };
+ my $count = 0;
+
+ use Mail::Delivery::Queue;
+ my $queue = new Mail::Delivery::Queue { directory => $queue_dir };
+ my $ra = $queue->list();
+
+ for my $qid (@$ra) {
+ print $qid, "\n";
+ $count++;
+ }
+
+ unless ($count) {
+ print STDERR "Mail queue is empty\n";
+ }
+}
+
+
+=head1 CODING STYLE
+
+See C<http://www.fml.org/software/FNF/> on fml coding style guide.
+
+=head1 AUTHOR
+
+MURASHITA Takuya
+
+=head1 COPYRIGHT
+
+Copyright (C) 2002,2003 MURASHITA Takuya
+
+All rights reserved. This program is free software; you can
+redistribute it and/or modify it under the same terms as Perl itself.
+
+=head1 HISTORY
+
+FML::Command::Admin::mailq first appeared in fml8 mailing list driver package.
+See C<http://www.fml.org/> for more details.
+
+=cut
+
+1;