How to forward all email except...
Gerald Brandt
gbr at majentis.com
Fri Oct 16 22:16:54 CEST 2015
On 2015-10-16 03:05 PM, Gerald Brandt wrote:
>
>
> On 2015-10-16 02:14 PM, Mihai Badici wrote:
>>
>> On Friday 16 October 2015 13:58:29 Gerald Brandt wrote:
>>
>> > Hi,
>>
>> >
>>
>> > I have kolab configured for domain example.com. So a user will get
>>
>> > email for user at example.com.
>>
>> >
>>
>> > I'd like to change is so any user at example.com gets sent to an
>>
>> > external host, and any user at mail.example.com is delivered locally.
>>
>> >
>>
>> > I'm doing this for migration purposes. I have an Exchange server that
>>
>> > has been running for years. As users are added to Kolab, I tell the
>>
>> > exchange server to forward emails to user at mail.example.com. This works
>>
>> > like a charm as long as each user has a secondary email that matches.
>>
>> >
>>
>> > If a user on Kolab sends email to a user on Exchnage, I start getting
>>
>> > issues. The email bounces because the Kolab user doesn't exist on the
>>
>> > domain. So, I want to send ALL email to exchange, and then for migrated
>>
>> > users, it can forward back to mail.example.com
>>
>> >
>>
>> > Once all users are migrated, I need to chnage it back to except for the
>>
>> > domain.
>>
>> >
>>
>> > Is this possible?
>>
>> >
>>
>> > Thanks,
>>
>> > Gerald
>>
>> I think you can use
>>
>> transport_maps = hash:/etc/postfix/transport
>>
>> And in the transport file:
>>
>> example.com smtp:[exchange_server]
>>
>> This will forward all mails to exchange.
>>
>> > _______________________________________________
>>
>> > users mailing list
>>
>> > users at lists.kolab.org
>>
>> > https://lists.kolab.org/mailman/listinfo/users --
>>
>> Mihai Badici <http://mihai.badici.ro>
>>
>>
>
> Hi,
>
> Although that works, it forwards the email after it's done its name
> replacement. ie: if the primary email is bob.marley at example.com, and
> I send to bmarley at example.com, it gets to the exchange server as
> bob.marley at example.com, and that's not a valid user name.
>
> Gerald
>
Hi,
Okay, it works. I just created another smtp address for bmarley on the
Exchange server.
The problem is when it sends the mail back as
bmarley at mail1.example.com. Being the FQDM, postfix should except it and
deliver it locally. Instead, it expands the name to
bob.marley at erlphase.com, the transport rule kicks in again, and it gets
sent back to the Exchange server.
Gerald
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kolab.org/pipermail/users/attachments/20151016/cad6d482/attachment.html>
More information about the users
mailing list