from
Display mail sender information from a mailbox
TLDR
SYNOPSIS
from [-f file] [-s sender] [user]
DESCRIPTION
from displays the header of each message in a mailbox, showing who mail is from (and, depending on the implementation, subject and date). It reads the system mailbox (typically /var/mail/username) and prints one line per message.The tool provides a quick overview of pending mail without opening a full mail client. With -s, output is filtered to messages whose sender matches the given address or substring. This is useful for checking mail status in shell scripts, cron jobs, or quick terminal checks.
PARAMETERS
USER
Username to check mail for (reads their system mailbox).-s SENDER
Only print headers from messages whose From address matches the given string. Note: this does not show subject lines.-f FILE
Read from the specified mailbox file instead of the default system mailbox.-c
Print only the count of messages. GNU mailutils only; not available in BSD/OpenBSD from.-d, --debug
Print debugging information. GNU mailutils only.-V, --version
Display version information. GNU mailutils only.
CAVEATS
Only works with mbox format mailboxes. May not work with modern mail delivery systems (Maildir, IMAP). Limited to local mail stored in traditional Unix mbox files.
HISTORY
from is a classic BSD utility for checking local mail, originating from 4.2BSD. It predates modern mail systems and works with traditional Unix mbox format files.
