LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

from

Display mail sender information from a mailbox

TLDR

Show all mail senders in your mailbox
$ from
copy
Show senders for a specific user
$ from [username]
copy
Filter messages by sender address/substring
$ from -s [alice@example.com]
copy
Count the number of messages (GNU mailutils only)
$ from -c
copy
Check a specific mailbox file
$ from -f [/var/mail/user]
copy

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.

INSTALL

sudo pacman -S mailutils
copy
sudo apk add mailutils
copy
sudo zypper install mailutils
copy
brew install mailutils
copy
nix profile install nixpkgs#mailutils
copy

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.

SEE ALSO

mail(1), biff(1), mailx(1), sendmail(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid