scanned.
If not provided, it defaults to F</var/mail/$ENV{USER}> and
-F<$ENV{HOME}/Maildir/>.
+F<$ENV{HOME}/Maildir/>. If USER or HOME are not in the environment,
+the corresponding default directory is ignored. So on a system with
+neither of these variables defined, this option will default to an
+empty list.
B<NOTE:> See L<Email::FolderType> for information on how the type of a
folder is identified. In short, the suffix of the folder is analyzed:
our $OUTPUT_FILEHANDLE = \*STDOUT;
our $VERSION = '0.001002';
-our @DEFAULT_INBOX = (
- "/var/mail/$ENV{USER}",
- "$ENV{HOME}/Maildir/",
-);
+our @DEFAULT_INBOX;
+push @DEFAULT_INBOX, "/var/mail/$ENV{USER}" if exists $ENV{USER};
+push @DEFAULT_INBOX, "$ENV{HOME}/Maildir" if exists $ENV{HOME};
sub run {
my $config = Config::Auto->new(format => 'yaml')->parse;