[Top] [All Lists]

Re: [nmh-workers] I Could Have Sworn that the inc Command used to work.

2019-06-02 05:26:07
Hi Bakul,

Looks like inc pays attention to $MAILDROP and if it is not set and
profile entry MailDrop is not set, it looks into /var/mail/$USER.

That's pretty much right.

Not sure if it ever checks $MAIL or $MAILPATH.

It doesn't, and it doesn't use $USER, or $LOGNAME, either.

inc(1) says

    If the environment variable $MAILDROP is set, then inc uses it as
    the location of the user's mail drop instead of the default (the
    -file name switch still overrides this, however).  If this
    environment variable is not set, then inc will consult the profile
    entry “MailDrop” for this information.  If the value found is not
    absolute, then it is interpreted relative to the user's nmh
    directory.  If the value is not found, then inc will look in the
    standard system location for the user's mail drop.

The source says

    -file's argument.
    MAILDROP environment variable.
    maildrop profile entry.
    mmdfldir/mmdflfil from mts.conf.
        mmdfldir defaults to HOME environment variable.
        mmdflfil is ‘unknown’ if getpwuid(3) fails or there's no
            pw_name, else it's the user part of the profile's optional 
            local-mailbox, else it's pw_name from getpwuid(3).

Martin, along with all the other suggestions, could you be a mix of
users thanks to su(1) and thus your shell is telling you of mail in one
location, but inc(1) looking in another?

Cheers, Ralph.


<Prev in Thread] Current Thread [Next in Thread>