postfix: automatically save emails as eml or msg in a separate folder

2.9k views Asked by At

For my business activity I have a very simple Debian + Postfix + Dovecot mail server.

  • Mails are saved under /var/mail/ in an MBox file.
  • procmail is not installed.
  • For spam filtering I have a mail gateway - scrollout on a virtual machine.
  • Mail users are Linux users, so there is no mysql or database connection.

What I want is that a specific account's emails will be stored in a format like eml or msg in a folder on my NAS. This is useful for me for several reasons.

I know that this will be done through Procmail... but I don't know the right way.

1

There are 1 answers

0
tripleee On

This particular user could have a simple .procmailrc which specifies

DEFAULT=/path/to/your/NAS/dir

but as indicated in comments, I don't think Procmail is really necessary or useful here.

(Specifying a directory just tells Procmail to save a unique file in the directory. Add a trailing slash to make Procmail deliver to a Maildir with the customary new, tmp, and cur subdirectories; or a trailing slash and a dot to have the next available numbered file à la MH. See procmailrc(5) for details.)