Hi all,

I'm using the recipient_bcc_maps setting in main.cf to 'archive' all e-mail
to a separate mailbox:

main.cf:
recipient_bcc_maps = pcre:/etc/postfix/archive.pcre

archive.pcre:
if !/@archive\.bcc$/
/^(.*)/   $...@archive.bcc
endif

Our postfix installation uses the 'virtual' transport for all messages. The
users/aliases etc. are in a mysql database and we're using amavisd-new for
message hygiene. One 'problem' is that all mail is 'archived' twice.
(Sometimes the two archived messages differ very slightly; one is without
the X-headers, one is with the X-headers.)

Furthermore, both messages have the 'fake' archive address in it after
archiving.

Example 'archived' message:
----------------------------------------------------------------------------
----------------
Return-Path: <sen...@senderdomain.com>
X-Original-To: "recipi...@recipient.domain"@archive.bcc
Delivered-To: "recipi...@recipient.domain"@archive.bcc
Received: from localhost (my.postfixhost.com [127.0.0.1])
        by my.postfixhost.com (Postfix) with ESMTP id 1B08E12017C;
        Thu, 30 Jul 2009 18:19:07 +0200 (CEST)
Received: from my.postfixhost.com ([127.0.0.1])
        by localhost (my.postfixhost.com [127.0.0.1]) (amavisd-new, port
10024)
        with ESMTP id wS60q0T+zX59; Thu, 30 Jul 2009 18:19:06 +0200 (CEST)
Received: from sender.sendinghost.com (sender.sendinghost.com [11.12.13.14])
        by my.postfixhost.com (Postfix) with SMTP id BD7BA120174
        for <recipi...@recipient.domain>; Thu, 30 Jul 2009 18:18:54 +0200
(CEST)

<MessageContent Here>
----------------------------------------------------------------------------
----------------

Is there a way to have more granular control over this 'message archiving'?
Or a 'better' way?

I would like to be able to archive all incoming smtp messages BEFORE the
message hygiene filter (amavisd-new). And it would be really nice to have
the 'unmodified' version of the messages; without the inserted
bcc-recipient.

If this 'issue' is related to amavisd-new, I'm very sorry to have bothered
you.

My postconf -n shows this (some settings omitted):

content_filter = smtp-amavis:[127.0.0.1]:10024
local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname
mydestination = $myhostname, $transport_maps
recipient_bcc_maps = pcre:/etc/postfix/backup_bcc.pcre
virtual_alias_maps = mysql:/etc/postfix/remote_aliases
virtual_mailbox_domains = mysql:/etc/postfix/domains
virtual_mailbox_maps = mysql:/etc/postfix/aliases
virtual_minimum_uid = 47
virtual_transport = virtual
virtual_uid_maps = static:48

my master.cf (some lines omitted):

smtp      inet  n       -       n       -       -       smtpd
        -o cleanup_service_name=pre-cleanup
smtp-amavis unix -      -       n       -       2  smtp
    -o smtp_data_done_timeout=1200
    -o smtp_send_xforward_command=yes
    -o disable_dns_lookups=no
    -o max_use=20

127.0.0.1:10025 inet n  -       n       -       -  smtpd
    -o content_filter=
    -o smtpd_restriction_classes=
    -o smtpd_delay_reject=no
    -o smtpd_client_restrictions=permit_mynetworks,reject
    -o smtpd_helo_restrictions=
    -o smtpd_sender_restrictions=
    -o smtpd_recipient_restrictions=permit_mynetworks,reject
    -o smtpd_data_restrictions=reject_unauth_pipelining
    -o smtpd_end_of_data_restrictions=
    -o mynetworks=127.0.0.0/8
    -o smtpd_error_sleep_time=0
    -o smtpd_soft_error_limit=1001
    -o smtpd_hard_error_limit=1000
    -o smtpd_client_connection_count_limit=0
    -o smtpd_client_connection_rate_limit=0
    -o smtpd_milters=
    -o local_header_rewrite_clients=
    -o local_recipient_maps=
    -o relay_recipient_maps=
    -o
receive_override_options=no_header_body_checks,no_unknown_recipient_checks

pre-cleanup  unix n     -       n       -       0       cleanup
    -o virtual_alias_maps=
    -o canonical_maps=
    -o sender_canonical_maps=
    -o recipient_canonical_maps=
    -o masquerade_domains=


Thank you in advance,

Tino Donderwinkel


Reply via email to