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

Postfix forward mail to other server but leaving a copy...

1,468 views
Skip to first unread message

gilbertoferreira

unread,
Apr 29, 2015, 4:18:52 PM4/29/15
to
Hi guys

I need some help... After search for many foruns and websites through
Google, I can't find out how to solve it...

I have two mail servers:

1 - Pure postfix

2 - Zimbra Mail Server

So, I am already have the Pure postfix server transport the mail messages to
Zimbra Mail server, via transport map:

somea...@domain.com smtp:[IP-ZIMBRA]

But, in this way, I am unable to keep copy of every mail that arrive to
someaccount... All messages goes to Zimbra Mail Server...

How is the best way to make postfix keep a copy on server and, at same time,
forward to Zimbra mail server??

Thanks a lot for any help





--
View this message in context: http://postfix.1071664.n5.nabble.com/Postfix-forward-mail-to-other-server-but-leaving-a-copy-tp76521.html
Sent from the Postfix Users mailing list archive at Nabble.com.

gilbertoferreira

unread,
Apr 29, 2015, 4:23:26 PM4/29/15
to
Hi again...

Just a complementary information: both servers has the same domain...



--
View this message in context: http://postfix.1071664.n5.nabble.com/Postfix-forward-mail-to-other-server-but-leaving-a-copy-tp76521p76523.html

J. Echter

unread,
Apr 29, 2015, 5:54:33 PM4/29/15
to
Am 29.04.2015 um 22:17 schrieb gilbertoferreira:
> Hi guys
>
> I need some help... After search for many foruns and websites through
> Google, I can't find out how to solve it...
>
> I have two mail servers:
>
> 1 - Pure postfix
>
> 2 - Zimbra Mail Server
>
> So, I am already have the Pure postfix server transport the mail messages to
> Zimbra Mail server, via transport map:
>
> somea...@domain.com smtp:[IP-ZIMBRA]
>
> But, in this way, I am unable to keep copy of every mail that arrive to
> someaccount... All messages goes to Zimbra Mail Server...
>
> How is the best way to make postfix keep a copy on server and, at same time,
> forward to Zimbra mail server??
>
> Thanks a lot for any help
>
>
>
>
>
> --
> View this message in context: http://postfix.1071664.n5.nabble.com/Postfix-forward-mail-to-other-server-but-leaving-a-copy-tp76521.html
> Sent from the Postfix Users mailing list archive at Nabble.com.
Hi,

maybe use something like this: always_bcc = catchall@localhost in main.cf

on your local system or forward to a special archive mail adress.

have a nice day

juergen

gilbertoferreira

unread,
Apr 30, 2015, 7:44:23 AM4/30/15
to
Hi...

Thanks for your answer, but I need this only for a few accounts...
I thing use procmail or .forward rules...

Or other idea...

Thanks



--
View this message in context: http://postfix.1071664.n5.nabble.com/Postfix-forward-mail-to-other-server-but-leaving-a-copy-tp76521p76569.html

gilbertoferreira

unread,
May 1, 2015, 8:55:55 AM5/1/15
to
Hi guys
Just let me tell that I solved this issue, using fetchmail to forward
messages to another smtp server and keep the message at the same time...
The only inconvenient, is that the message on server where fetchmail is
installed, always marked as read..
But this is not a big deal... I can live with that...
Thanks



--
View this message in context: http://postfix.1071664.n5.nabble.com/Postfix-forward-mail-to-other-server-but-leaving-a-copy-tp76521p76600.html

gilbertoferreira

unread,
May 4, 2015, 12:33:03 PM5/4/15
to
Hey guys

With fetchmailrc works nicely, but some users refuse to give us the
password, complain about privacy blah blah blah...

Now, I am search something about transport.
As we know, transport allow us do this:

us...@domain.com smtp:[smtp.server.com]

So, with this line in transport, we can forward all email to
us...@domain.com, relayied to smtp.server.com
Of course, we have an user with same name on smtp.server.com, as well.

But using this procedure, we don't have a way to leave a copy of mail.

Or there is??

I really really apreciate any help... Thanks



--
View this message in context: http://postfix.1071664.n5.nabble.com/Postfix-forward-mail-to-other-server-but-leaving-a-copy-tp76521p76615.html

Robert Schetterer

unread,
May 4, 2015, 12:58:09 PM5/4/15
to
read

http://www.postfix.org/ADDRESS_REWRITING_README.html#auto_bcc

http://www.postfix.org/postconf.5.html#recipient_bcc_maps


Best Regards
MfG Robert Schetterer

--
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein

Alex JOST

unread,
May 4, 2015, 12:59:04 PM5/4/15
to
Am 30.04.2015 um 13:43 schrieb gilbertoferreira:
> Thanks for your answer, but I need this only for a few accounts...
> I thing use procmail or .forward rules...

Have a look at recipient_bcc_maps:
http://www.postfix.org/postconf.5.html#recipient_bcc_maps

--
Alex JOST

gilbertoferreira

unread,
May 4, 2015, 1:09:46 PM5/4/15
to
Hello Alex and Robert

Thanks for reply

I already tried both bcc solutions, but not work as I need... Let me
explain...

Let say that we have two servers:

Server Left: pure postfix - domain: company.com - hostname: mail.company.com

Server Right: Zimbra Mail Server - domain: company.com - hostname:
email.company.com

Both of them are postfix based...

When I use BCC, in my case, I have rbcc_maps, like this:

account-on-server-left <TAB> same-accou...@email.company.com

On Server RIght I get this message:

May 4 10:22:02 email postfix/smtp[17640]: AED8F100C50A0:
to=<account-se...@email.company.com>, relay=none, delay=0.06,
delays=0.05/0.01/0/0, dsn=5.4.6, status=bounced (mail for email.company.com
loops back to myself)

I think I am doing same mistake... =(






--
View this message in context: http://postfix.1071664.n5.nabble.com/Postfix-forward-mail-to-other-server-but-leaving-a-copy-tp76521p76618.html

Viktor Dukhovni

unread,
May 4, 2015, 1:12:46 PM5/4/15
to
On Mon, May 04, 2015 at 10:08:59AM -0700, gilbertoferreira wrote:

> On Server RIght I get this message:
>
> May 4 10:22:02 email postfix/smtp[17640]: AED8F100C50A0:
> to=<account-se...@email.example.com>, relay=none, delay=0.06,
> delays=0.05/0.01/0/0, dsn=5.4.6, status=bounced (mail for email.example.com
> loops back to myself)

You've failed to add "email.example.com" to mydestination, or create
virtual aliases that cause the mail to be routed to a mailbox rather
than be sent out via SMTP.

--
Viktor.

gilbertoferreira

unread,
May 4, 2015, 1:31:12 PM5/4/15
to
Guys

Transport or virtual mapping works fine... But this solution do not allow me
to leave a copy to the user...
That is my issue...
I try it with fetchmail, but fetchmail need user password... And some users
don't share it...

Forgive me if I am far away to understand other solutions that you guys
might point to me...
I am still learning a lot with postfix...

Thanks



--
View this message in context: http://postfix.1071664.n5.nabble.com/Postfix-forward-mail-to-other-server-but-leaving-a-copy-tp76521p76620.html

gilbertoferreira

unread,
May 4, 2015, 1:39:28 PM5/4/15
to
And here's another complementary information: both servers deal with same
domain: @company.com



--
View this message in context: http://postfix.1071664.n5.nabble.com/Postfix-forward-mail-to-other-server-but-leaving-a-copy-tp76521p76621.html

Kelbley, Steven

unread,
May 4, 2015, 1:42:31 PM5/4/15
to
Might be worth looking at the recipient_bcc_maps config option. You could make a file mapping each user to your chosen bcc address, then run postmap on it.

http://www.postfix.org/postconf.5.html#recipient_bcc_maps

-
Steven

Kelbley, Steven

unread,
May 5, 2015, 7:25:33 AM5/5/15
to
Oops, I missed that Alex had already posted this suggestion. Sorry!
0 new messages