option to show mailq dir
authorJamie Cameron <jcameron@webmin.com>
Fri, 18 Jan 2008 05:26:56 +0000 (05:26 +0000)
committerJamie Cameron <jcameron@webmin.com>
Fri, 18 Jan 2008 05:26:56 +0000 (05:26 +0000)
sendmail/CHANGELOG
sendmail/config.info
sendmail/lang/en
sendmail/sendmail-lib.pl

index 9024d8b..13e8db3 100644 (file)
@@ -31,3 +31,4 @@ The count of messages in the mail queue on the module's main page no longer incl
 Added access control for the Spam Control page.
 ---- Changes since 1.390 ----
 Added a Module Config option to support ~/Maildir mailboxes (even though Sendmail doesn't support this natively).
+Added an option to show the directory queued messages are in, which is useful on systems with several queues.
index b6caf9b..699c50b 100644 (file)
@@ -8,7 +8,7 @@ show_cmts=Show descriptions in tables?,1,1-Yes,0-No
 prefix_cmts=Prefix all description comments with <tt>Webmin</tt>?,1,1-Yes,0-No
 send_mode=Send mail via connection to,3,Sendmail executable
 max_records=Maximum number of records to show in tables,0,6
-mailq_show=Headers to show in mail queue,2,Date-Date,From-From,To-To,Subject-Subject,Cc-Cc,Size-Size,Status-Status
+mailq_show=Headers to show in mail queue,2,Date-Date,From-From,To-To,Subject-Subject,Cc-Cc,Size-Size,Status-Status,Dir-Directory
 mailq_sort=Sort mail queue by,1,0-Queue ID,1-From address,2-To address,3-Subject,4-Status,5-Size
 mailq_count=Show size of mail queue on main page?,1,0-Yes,1-No
 mailq_order=Ordering when flushing mail queue,1,-Default,priority-Priority,host-Hostname,time-Date received
index 6be6e62..c190469 100644 (file)
@@ -416,6 +416,7 @@ mailq_size=Size
 mailq_status=Status
 mailq_cc=Cc
 mailq_subject=Subject
+mailq_dir=Directory
 mailq_unknown=Unknown
 mailq_sending=Sending
 mailq_dmsg=To view a message from the mail queue, click on its ID in the list above.
index 29abebb..ab53600 100644 (file)
@@ -551,6 +551,7 @@ push(@hcols, $text{'mailq_cc'}) if ($show{'Cc'});
 push(@hcols, $text{'mailq_subject'}) if ($show{'Subject'});
 push(@hcols, $text{'mailq_size'}) if ($show{'Size'});
 push(@hcols, $text{'mailq_status'}) if ($show{'Status'});
+push(@hcols, $text{'mailq_dir'}) if ($show{'Dir'});
 print &ui_columns_start(\@hcols, 100, 0, \@tds);
 
 # Show table rows for emails
@@ -559,6 +560,8 @@ foreach my $f (@$qfiles) {
        ($n = $f) =~ s/^.*\///;
        local $mail = $qmails->{$f} || &mail_from_queue($f);
        next if (!$mail);
+       local $dir = $f;
+       $dir =~ s/\/[^\/]+$//;
 
        $mail->{'header'}->{'from'} ||= $text{'mailq_unknown'};
        $mail->{'header'}->{'to'} ||= $text{'mailq_unknown'};
@@ -593,6 +596,7 @@ foreach my $f (@$qfiles) {
        push(@cols, "<font size=1>$mail->{'header'}->{'subject'}</font>") if ($show{'Subject'});
        push(@cols, "<font size=1>$size</font>") if ($show{'Size'});
        push(@cols, "<font size=1>$mail->{'status'}</font>") if ($show{'Status'});
+       push(@cols, "<font size=1>$dir</font>") if ($show{'Dir'});
        print "</tr>\n";
        if ($access{'mailq'} == 2) {
                print &ui_checked_columns_row(\@cols, \@tds, "file",$f);