Email - Mailbox

About

A mailbox is a file where the emails message are stored.

It can be real or virtual.

Management

Modification

Remotely (POP, IMAP)

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

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

Linux

Path

The default in post fix is /var/mail or /var/spool/mail. See postconf.5.html

sudo ls /var/mail
  • Two mailbox
root  user

Set the path with the MAIL environment variable

The MAIL environment variable set the path of the mailbox.

Example:

MAIL=/var/spool/mail/nico

Content

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.






Discover More
Email - Monitoring

Email monitoring is done by sending an email and looking up the mailbox. Example: Mail exporter prometheus
Email - Spoofing

Email spoofing is the creation of email messages where the sender email is not the owner of the mailbox (ie the sender email has just been forged). Because the core email protocols do not have any mechanism...
Email - on Linux

Linux runs a “locally configured” mailer daemon that doesn't route messages by default through the Internet but only copies messages to other users spool directories It is real SMTP-compliant email,...
How does the email system work? SMTP, POP, IMAP explained

This page gives you the foundations of the email system. At the end, you should be able to understand why when you configure your email client, you need to set up: The SMTP configuration And the...
POP3 and IMAP

pop3 and imap are email protocol used to connect to a remote mailbox (ie a remote server). You can then read, delete your email An Email Client (MUA) may use them to read/delete email remotely ...
Gmail Show Original Email
What is a Email Message ? known as Internet Message or RFC822

An email is a document that is composed of the following structure one or more headers followed by a body that may be composed of multi-parts: Text part HTML part Attachment and Inline Images...
What is a Mail Transfer Agent (MTA) or Relay in SMTP? (Email Smtp Server)

mail transfer agent or MTA 1) is the software that sends your emails as they implements Simple Mail Transfer Protocol (SMTP). They ultimately transport E-Mail messages from one computer to another.
What is a Mail User Agent (MUA) ? Tldr; a mail Client

A Mail User Agent (MUA) is the technical term from a email client application. User agentMail User Agent (MUA)user applicationuser agent on the web A MUA can: read and write in the mailbox and...
What is a Mail eXchange or Email mail delivery agent (MDA | LDA)?

A mail delivery agent (MDA) or Mail eXchange is a SMTP server that is responsible for the local delivery (reception) of e-mail messages to a mailbox It's also known as: message delivery agent (MDA)...
What is a SMTP Server? The server that sends, receives, and processes email

What is an SMTP server and how to implement it



Share this page:
Follow us:
Task Runner