FC more FHS clashes (was: BIND and FHS)

Jeff Spaleta jspaleta at gmail.com
Tue Mar 7 17:02:29 UTC 2006


On 3/7/06, Chris Adams <cmadams at hiwaay.net> wrote:
> Again, how many of those try $MAIL first?  That should always be set, so
> falling back to /var/mail, /var/spool/mail, or /dev/null should not be
> flagged as a bug.

balsa is even smarter than that... first it checkes $MAIL and then it
iterates across a set of guesses starting with /var/mail.

I think I've learned a value lesson today. And that lesson is the
original poster is on crack.

Out of everything in his original /var/spool/mail hitlist which "may"
be a problem the only thing I can see so far is dhcp, which seems to
have a list of directories to try which doesn't include /var/mail  on
linux.   Needs to be addressed with upstream if possible.

<quote from linux.h in dhcp src code>
const char *dirs[] = {
        "/tmp",
        "/usr/tmp",
        ".",
        "/",
        "/var/spool",
        "/dev",
        "/var/spool/mail",
        "/home",
        "/usr/home",
        NULL
};
</quote>


<quote from libbalsa.c from balsa src code>
libbalsa_guess_mail_spool(void)
{
    int i;
    gchar *env;
    gchar *spool;
    static const gchar *guesses[] = {
        "/var/mail/",
        "/var/spool/mail/",
        "/usr/spool/mail/",
        "/usr/mail/",
        NULL
    };

    if ((env = getenv("MAIL")) != NULL)
        return g_strdup(env);

    if ((env = getenv("USER")) != NULL) {
        for (i = 0; guesses[i] != NULL; i++) {
            spool = g_strconcat(guesses[i], env, NULL);

            if (g_file_test(spool, G_FILE_TEST_EXISTS))
                return spool;

            g_free(spool);
        }
    }

    /* libmutt's configure.in indicates that this
     * ($HOME/mailbox) exists on
     * some systems, and it's a good enough default if we
     * can't guess it any other way. */
    return g_strconcat(g_get_home_dir(), "/mailbox", NULL);
}
</quote>


-jef




More information about the fedora-devel-list mailing list