A mailbox is a file where the emails message are stored.
It can be real or virtual.
You can modify a remote mailbox via the remote protocol POP and IMAP
FetchMail can also retrieve the email via POP and IMAP and stores them locally
You can modify local mail box With mail client utility
Example on how to to delete the mail 1 to 15 with mailx
mail
d 1-15
quit
The default in post fix is /var/mail or /var/spool/mail. See postconf.5.html
sudo ls /var/mail
root user
The MAIL environment variable set the path of the mailbox.
Example:
MAIL=/var/spool/mail/nico
UNIX mailboxes: A mailbox file is just a collection of text mail separated by --multipart-boundary--
(See also Mbox format (JavaMail can read them))
Example:
--multipart-boundary--
From [email protected] Wed Jun 10 03:10:08 2020
Return-Path: <[email protected]>
Received: from example.com (localhost [127.0.0.1])
by example.com (8.14.7/8.14.7) with ESMTP id 05A1A7A9005523
for <[email protected]>; Wed, 10 Jun 2020 03:10:07 +0200
Received: (from root@localhost)
by example.com (8.14.7/8.14.7/Submit) id 05A1A7dG005522
for root; Wed, 10 Jun 2020 03:10:07 +0200
Date: Wed, 10 Jun 2020 03:10:07 +0200
Message-Id: <[email protected]>
From: Anacron <[email protected]>
To: [email protected]
Content-Type: text/plain; charset="UTF-8"
Subject: Anacron job 'cron.daily' on example.com
/etc/cron.daily/logrotate:
error: skipping "/var/log/php-fpm/error.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/php-fpm/www-error.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.