Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Saving archive copy of all mail sent/received w/Dovecot+Postfix?

934 views
Skip to first unread message

Andrew M

unread,
Dec 12, 2011, 3:17:08 PM12/12/11
to
I'm running Dovecot 2.0.15 and Postfix 2.7.7 with postfix handing off to
Dovecot's LDA. I am hosting multiple virtual domains with multiple
users and everything is working. I would now like to create a permanent
archive of all sent/received mail with each virtual user's mail saved to
its own sent file and received file. This needs to be independent of
the user's regular Maildir store since he can't delete or modify the
permanent archive.

Any suggestions on how to best accomplish this either via postfix or
dovecot?

Postfix has in main.cf

virtual_transport = dovecot

and in master.cf

dovecot unix - n n - - pipe
flags=DRhu user=virtual:virtual
argv=/usr/libexec/dovecot /dovecot-lda -d ${recipient} -f ${sender}

dovecot uses this:

[root@xxx andrew]# dovecot -n
# 2.0.15: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.35.14-103.fc14.x86_64 x86_64 Fedora release 14
(Laughlin) ext4
auth_mechanisms = plain login cram-md5
disable_plaintext_auth = no
mail_location = maildir:/home/vmail/%d/%n/Maildir
mbox_write_locks = fcntl
passdb {
args = scheme=plain username_format=%u /etc/postfix/passwd
driver = passwd-file
}
protocols = imap lmtp
service auth {
inet_listener {
port = 12345
}
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
}
unix_listener auth-userdb {
mode = 0666
}
}
ssl_cert = </etc/pki/tls/certs/xxx.com.crt
ssl_key = </etc/pki/tls/private/xxx.com.key
userdb {
args = username_format=%u uid=5000 gid=5000 home=/home/vmail/%d/%n
driver = static
}

Thanks,
Andrew

Stan Hoeppner

unread,
Dec 12, 2011, 9:12:25 PM12/12/11
to
On 12/12/2011 2:17 PM, Andrew M wrote:
> I'm running Dovecot 2.0.15 and Postfix 2.7.7 with postfix handing off to
> Dovecot's LDA. I am hosting multiple virtual domains with multiple
> users and everything is working. I would now like to create a permanent
> archive of all sent/received mail with each virtual user's mail saved to
> its own sent file and received file. This needs to be independent of
> the user's regular Maildir store since he can't delete or modify the
> permanent archive.
>
> Any suggestions on how to best accomplish this either via postfix or
> dovecot?

Take a look an Enkive: http://www.enkive.org

--
Stan

Robert Schetterer

unread,
Dec 13, 2011, 2:22:26 AM12/13/11
to
postfix

always_bcc (default: empty)

Optional address that receives a "blind carbon copy" of each message
that is received by the Postfix mail system.

Note: if mail to the BCC address bounces it will be returned to the
sender.

Note: automatic BCC recipients are produced only for new mail. To
avoid mailer loops, automatic BCC recipients are not generated after
Postfix forwards mail internally, or after Postfix generates mail itself.

recipient_bcc_maps (default: empty)

Optional BCC (blind carbon-copy) address lookup tables, indexed by
recipient address. The BCC address (multiple results are not supported)
is added when mail enters from outside of Postfix.

This feature is available in Postfix 2.1 and later.

The table search order is as follows:

Look up the "user+ex...@domain.tld" address including the
optional address extension.
Look up the "us...@domain.tld" address without the optional
address extension.
Look up the "user+extension" address local part when the
recipient domain equals $myorigin, $mydestination, $inet_interfaces or
$proxy_interfaces.
Look up the "user" address local part when the recipient domain
equals $myorigin, $mydestination, $inet_interfaces or $proxy_interfaces.
Look up the "@domain.tld" part.

Specify the types and names of databases to use. After change, run
"postmap /etc/postfix/recipient_bcc".

Note: if mail to the BCC address bounces it will be returned to the
sender.

Note: automatic BCC recipients are produced only for new mail. To
avoid mailer loops, automatic BCC recipients are not generated after
Postfix forwards mail internally, or after Postfix generates mail itself.

Example:

recipient_bcc_maps = hash:/etc/postfix/recipient_bcc

sender_bcc_maps (default: empty)

Optional BCC (blind carbon-copy) address lookup tables, indexed by
sender address. The BCC address (multiple results are not supported) is
added when mail enters from outside of Postfix.

This feature is available in Postfix 2.1 and later.

The table search order is as follows:

Look up the "user+ex...@domain.tld" address including the
optional address extension.
Look up the "us...@domain.tld" address without the optional
address extension.
Look up the "user+extension" address local part when the sender
domain equals $myorigin, $mydestination, $inet_interfaces or
$proxy_interfaces.
Look up the "user" address local part when the sender domain
equals $myorigin, $mydestination, $inet_interfaces or $proxy_interfaces.
Look up the "@domain.tld" part.

Specify the types and names of databases to use. After change, run
"postmap /etc/postfix/sender_bcc".

Note: if mail to the BCC address bounces it will be returned to the
sender.

Note: automatic BCC recipients are produced only for new mail. To
avoid mailer loops, automatic BCC recipients are not generated after
Postfix forwards mail internally, or after Postfix generates mail itself.

Example:

sender_bcc_maps = hash:/etc/postfix/sender_bcc


https://www.milter.org/milter/61

MailArchiver and simular milters

http://freecode.com/projects/aox

Archiveopteryx

Archiveopteryx is an Internet mail server, optimized to support heavy
usage and long-term archiving. It stores mail in a PostgreSQL database,
and provides access to it through IMAP, POP, and more.

and so on.....
--
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria

0 new messages