1. Information

Simple mail user agent

2. Linux

2.1. Installation

sudo apt-get install bsd-mailx

2.2. Usage

  • See https://www.johnkerl.org/doc/mail-how-to.html.

    mail            # Read emails.
    mail -f         # Read old emails when there are no new emails.
    
    h               # Show the current screenful of messages.
    h$              # Show the last screenful of messages.
    2024-06-03 17:58:52 smru@tbhf-anc-mrm ~$ echo "TEST 45" | mail -s "Test 45" "root@tbhf-anc-mrm.smru.shoklo-unit.com"    # Something is not right.
    2024-06-03 18:02:54 smru@tbhf-tst-mrm ~$ echo "TEST 49" | mail -s "Test 49" "root@tbhf-tst-mrm.smru.shoklo-unit.com"    # Works, can read email using mail/mailx.
    # On smru@tbhf-tst-mrm.
    
    echo "TEST 59" | mail -s "Test 59" "smru@tbhf-tst-mrm.smru.shoklo-unit.com"
    grep -i "Test 59" ~delta/mbox
    echo p | mail > /dev/null               # Print the first mail message in your default mailbox.
    grep -i "Test 59" ~delta/mbox

2.3. Test Emails