1

Topic: X-Original-To:

I am looking for the configuration to add “X-Original-To:” in the head of the emails. I try to configure “enable_original_recipient = yes” in the main.cf, but it doesn’t help. What should I do?

I am working on Debian Squeeze with iRedMail 0.7.4 with MySQL Backend.

Thanks for help.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: X-Original-To:

I didn't try this before. May i know why you need this header?

3

Re: X-Original-To:

I made it work with below settings.

1) Make sure you have below settings in Postfix main.cf:

enable_original_recipient = yes
dovecot_destination_recipient_limit = 1

2) Add flag 'O' (Letter o in upper case, not digit number zero) in Postfix master.cf for transport pipe:

dovecot unix    -       n       n       -       -      pipe
    flags=DRhuO user=[...OMIT OTHER SETTINGS HERE...]

3) Restarting Postfix service is required.

References:
- Postfix manual page: pipe(8): http://www.postfix.org/pipe.8.html
- postconf(5): http://www.postfix.org/postconf.5.html# … _recipient

4 (edited by svenjust 2012-02-27 22:42:00)

Re: X-Original-To:

Thanks for your help.

We need this feature for a multidrop configuration with one catch-all account. From the catch-all account we read all emails with fetchmail to our inhouse email server.

I try your configuration advice but unfortunately there is still a little problem. The “X-Original-To:” header is added but the address is wrong.

Example:

iRedMail server domain: dcc-global.eu
catch-all account: www@dcc-global.eu
email recipient address: sven.just@dcc-global.eu 

The following wrong header is added:

X-Original-To: www@dcc-global.eu

the correct header would be:

X-Original-To: sven.just@dcc-global.eu

I add the complete email header, I hope it helps you. If you need the complete configuration, please let me know.

Return-Path: <sven.just@dcc-global.com>
X-Original-To: www@dcc-global.eu
Delivered-To: www@dcc-global.eu
Received: from localhost (localhost [127.0.0.1])
    by h1989655.stratoserver.net (Postfix) with ESMTP id 4A3CCE21AE
    for <www@dcc-global.eu>; Mon, 27 Feb 2012 09:06:44 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at h1989655.stratoserver.net
X-Amavis-Alert: BAD HEADER SECTION, Improper folded header field made up
    entirely of whitespace (char 20 hex): X-Spam-Report: ...that system
    for details.\n \n Content previ[...]
Received: from h1989655.stratoserver.net ([127.0.0.1])
    by localhost (h1989655.stratoserver.net [127.0.0.1]) (amavisd-new, port 10024)
    with ESMTP id u2mA37YKcRHH for <www@dcc-global.eu>;
    Mon, 27 Feb 2012 09:06:43 +0000 (GMT)
X-Original-Helo: h1683731.stratoserver.net (iRedMail: http://www.iredmail.org/)
Received: from h1683731.stratoserver.net (h1683731.stratoserver.net [85.214.255.254])
    by h1989655.stratoserver.net (Postfix) with ESMTPS id E6B85E21AC
    for <sven.just@dcc-global.eu>; Mon, 27 Feb 2012 09:06:42 +0000 (GMT)
Received: from p54839706.dip0.t-ipconnect.de ([84.131.151.6] helo=scalix.dcc-global.de)
    by h1683731.stratoserver.net with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
    (Exim 4.72)
    (envelope-from <sven.just@dcc-global.com>)
    id 1S1wXZ-0006eS-VX
    for sven.just@dcc-global.eu; Mon, 27 Feb 2012 10:06:42 +0100
Received: from scalix.dcc-global.de (localhost [127.0.0.1])
    by scalix.dcc-global.de (8.13.8/8.13.8) with ESMTP id q1R96ePu002488
    for <sven.just@dcc-global.eu>; Mon, 27 Feb 2012 10:06:40 +0100
Date: Mon, 27 Feb 2012 10:06:39 +0100
From: "Sven Just" <sven.just@dcc-global.com>
To: "sven.just" <sven.just@dcc-global.eu>
Message-ID: <"H000006c0023ef4c.1330333599.scalix.dcc-global.de*"@MHS>
Subject: test

5

Re: X-Original-To:

You can find several headers with value 'sven.just _at_ dcc-global.eu', are they enough for you?

6

Re: X-Original-To:

Unfortunately, not. We need the header to assign the e-mails with fetchmail the correct recipients.

7

Re: X-Original-To:

Hope this Zimbra bug report helps: http://bugzilla.zimbra.com/show_bug.cgi?id=15395

8 (edited by svenjust 2012-02-29 23:17:01)

Re: X-Original-To:

Thanks for your help, we solved the problem. Your post http://www.iredmail.org/forum/post14006.html#p14006 point us the right direction.

The problem was that mapping for the catch-all address was done by the postfix at port 25. At this time the envelope address is rewritten to the catch-all address. When the email comes to the postfix at port 10025 the envelope address is already the catchall address.

Therefore we need the first postfix at port 25 to not rewrite to the catchall address. With your hints and this idea in mind we do the following four adjustments:

1) Make sure you have below settings in Postfix main.cf:

enable_original_recipient = yes
dovecot_destination_recipient_limit = 1

2) Add flag 'O' (Letter o in upper case, not digit number zero) in Postfix master.cf for transport pipe:

dovecot unix    -       n       n       -       -      pipe
    flags=DRhuO user=[...OMIT OTHER SETTINGS HERE...]

3) In the Postfix master.cf we add the line (-o receive_override_options=no_address_mappings) after

smtp      inet  n       -       -       -       -       smtpd
   -o receive_override_options=no_address_mappings

4) In the Postfix master.cf we comment out one setting (#,no_address_mappings)

127.0.0.1:10025 inet n  -   -   -   -  smtpd
[...OMIT OTHER SETTINGS HERE...]
    -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks
#,no_address_mappings

Now everything works fine. Thanks for you great work. smile