2

I need a sample file where mail utility stored messages.

What I mean is:

Return-path: <user@example.domain>
Received: from anton by nflogs.domain with local (Exim 4.80)
        (envelope-from <user@example.domain>)
        id 1VuiP9-0006js-Fa; Sun, 22 Dec 2013 19:45:11 +0700
To: man@nflogs.domain
Subject: test
Cc: textCC@example.domain
Message-Id: <E1VuiP9-0006js-Fa@example.domain>
From: Anton <user@example.domain>
Date: Sun, 22 Dec 2013 19:45:11 +0700

But I'm not sure that it's right.

2

The files located at /var/mail/username are in a format called mbox. You can read more about this format on the Wikipedia page titled: mbox.

excerpt of format

From MAILER-DAEMON Fri Jul  8 12:08:34 2011
From: Author <author@example.com>
To: Recipient <recipient@example.com>
Subject: Sample message 1

This is the body.
>From (should be escaped).
There are 3 lines.

From MAILER-DAEMON Fri Jul  8 12:08:34 2011
From: Author <author@example.com>
To: Recipient <recipient@example.com>
Subject: Sample message 2

This is the second body.
  • mbox starts each new message with '^From', but the format the OP showed (and my own /var/mail/username) starts with 'Return-Path:', what is the difference? – Nicolas Bonnefon Jun 13 '18 at 13:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.