mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
Handle maildir-format dis under /var/spool/mail https://sourceforge.net/p/webadmin/bugs/4305/
This commit is contained in:
@@ -1659,6 +1659,9 @@ else {
|
||||
}
|
||||
|
||||
# mail_file_style(user, basedir, style)
|
||||
# Given a directory and username, returns the path to that user's mail file
|
||||
# under the directory based on the style (which may force use of parts of
|
||||
# the username).
|
||||
sub mail_file_style
|
||||
{
|
||||
if ($_[2] == 0) {
|
||||
|
||||
@@ -99,10 +99,12 @@ else {
|
||||
'index' => scalar(@rv) } );
|
||||
}
|
||||
|
||||
# Check for /var/mail/USERNAME file
|
||||
# Check for /var/mail/USERNAME file or directory
|
||||
if ($dir) {
|
||||
$dir =~ s/\/$//; # Trailing / means maildir format.
|
||||
# Postfix sometimes does this.
|
||||
local $mf = &mail_file_style($uinfo[0], $dir, $style);
|
||||
push(@rv, { 'type' => 0,
|
||||
push(@rv, { 'type' => -d $mf ? 1 : 0,
|
||||
'name' => $mf,
|
||||
'file' => $mf,
|
||||
'user' => $uinfo[0],
|
||||
|
||||
Reference in New Issue
Block a user