{
PrivilegedAction a;
if( File.separatorChar == '/')
{
// Try some common (UNIX) locations.
a = new GetSystemPropertyAction("user.name");
String username = (String) AccessController.doPrivileged(a);
inbox = new File("/var/mail/" + username); // GNU
if( !inbox.exists())
{
inbox = new File("/var/spool/mail/" + username);
// common alternative
}
}
if( !inbox.exists())
{
a = new GetSystemPropertyAction("user.home");
String userhome = (String) AccessController.doPrivileged(a);
inbox = new File(userhome, "Mailbox"); // qmail etc
}
}
return new MboxFolder(this, inbox, true);