I'm guessing my obfuscation has clouded the issue, so I'll re-iterate my
question with (hopefully) a clearer example.

We need three email addresses that go to our domain (in this example
referred to as my-domain.com) @my-domain.com, to be redirected to
@other-domain.com.

These three users do not exist on our systems.

The postfix server relays mail directly to an exchange server, apart
from three exceptions that are delivered locally. (but that is
irrelevant for this query)

So, for the three addresses, redirection should be as follows:

us...@my-domain.com -> us...@other-domain.com
us...@my-domain.com -> us...@other-domain.com
us...@my-domain.com -> us...@other-domain.com

All other email for @my-domain.com is relayed to an exchange server
(with two or three exceptions as described above)

So...

In /etc/postfix/virtual - I have:

anythinghere.com      VIRTUALDOMAIN # this is as per the postfix readme

# redirects to other-domain.com
us...@my-domain.com     us...@other-domain.com
us...@my-domain.com     us...@other-domain.com
us...@my-domain.com     us...@other-domain.com

-----------------------------------------------

In /etc/postfix/transport - I have:

# these addresses delivered locally
#
my_us...@my-domain.com  local:
my_us...@my-domain.com  local:
my_us...@my-domain.com  local:
#
my-domain.com   smtp:[1.2.3.4] # 1.2.3.4 is the exchange server
#
------------------------------------------------------------------

In /etc/postfix/main.cf - I have:
#
virtual_alias_maps = hash:/etc/postfix/virtual
#

I also have a virtual.db in /etc/postfix - generated with postmap.

--------------------------------------------------------------

I am using spamassassin to filter mail - so mail is delivered to
spamassassin and then passed back to postfix for delivery. (hence the
relay=spamassassin)

This is the log entry generated when sending email to
us...@my-domain.com

Dec  4 12:22:40 my_server_name postfix/pipe[7162]: A973D9170E:
to=<us...@other-domain.com>, orig_to=<us...@my-domain.com>,
relay=spamassassin, delay=3, status=sent (my_server_name)

However - the person on the receiving end doesn't get the email - it
appears to end up in some administrator mailbox (not much detail - and I
haven't been able to get more) - which suggests an over zealous spam
filter on their side. So I'm wondering if the address rewrite is
triggering some kind of anti spam action on the (other-domain.com)
server - and hence begs the question - am I doing this correctly?

I have tested this to my own home account *and* to Hotmail (by setting
up the appropriate redirects) and it worked fine in both cases.

So my question is:
------------------

Have I done this correctly? I looked on the postfix site and various man
pages - and picked up a hint that perhaps I should be using canonical
for this - but I'm not sure....

I hope this example is clearer - and apologies for the length of it.

Thanks again,
Tony.
 

-----Original Message-----
From: owner-postfix-us...@postfix.org
[mailto:owner-postfix-us...@postfix.org] On Behalf Of Simon Waters
Sent: 08 December 2009 17:36
To: postfix-users@postfix.org
Subject: Re: Receiving email for u...@example.com and redirecting it to
u...@bloggs.com

On Tuesday 08 December 2009 17:12:48 Tony Rogers wrote:
>
> My domain is example.com - the server relays all mail for
*...@example.com
> to an exchange server.
>
> I have a requirement where I need to redirect email for
u...@example.com
> to u...@bloggs.com.
>
> u...@example.com does not exist on our system.

I've done similar here with a transport map.

transport_maps = hash:/etc/postfix/transport

:transport:
f...@example.com local:
example.com smtp:[nameofsmtpserverforexample.com]

And then used /etc/aliases to redirect "fred" email to whereever I
wanted it 
to go - but I know our destination doesn't use SPF, or any "silly" spam 
checks.

Crude but it works for our needs.

> Dec  4 12:22:40 my_server_name postfix/pipe[7162]: A973D9170E:
> to=<u...@bloggs.com>, orig_to=<u...@example.com>, relay=spamassassin,
> delay=3, status=sent (my_server_name)

spamassassin - who is this server?

> However - the person on the receiving end doesn't get the email - it
> appears to end up in some administrator mailbox (not much detail - and
I
> haven't been able to get more) - which suggests an over zealous spam
> filter on their side.

I think you are going to have to explain the set up more, or provide the

normally requested output for this list.

> So my question is:
> ------------------
>
> Have I done this correctly?

It feels wrong to me, how does postfix know what to do with the rest of 
example.com's mail. Or has your obfuscation destroyed the question?

Reply via email to