I can't manage to implement a new request for mail routing.

Our mail domain is listed in "virtual_alias_domains". All mail addresses and 
the respective target mail
addresses are listed in the file defined in "virtual_alias_maps". An address 
rewriting is therefore
carried out, whereby the domain used in the target mail addresses is not listed 
in
"virtual_alias_domains". A transport rule in "transport_maps" defines the 
server (e.g. Exchange) to
which the final mail delivery should be made. In simple terms, the 
configuration looks like this:

/etc/postfix/main.cf:
  virtual_alias_domains = example.com
  virtual_alias_maps = hash:/etc/postfix/virtual
  transport_maps = hash:/etc/postfix/transport

/etc/postfix/virtual:
  us...@example.com    user1@exchange

/etc/postfix/transport:
  exchange               smtp:[excha...@example.com]

This setup has been used in this form for many years. The new requirement is to 
route some mail
addresses of the mail domain without address rewriting. I am aware that this 
could in principle be
realized via a rule in "transport_maps", e.g:

/etc/postfix/transport:
  us...@example.com       smtp:[some_other_destination]

But then the mail is rejected in the SMTP handshake as soon as it is sent:

  Recipient address rejected: User unknown in virtual alias table

I have tried to list the mail address in virtual_alias_maps with a dummy entry 
so that no address
rewriting takes place. The destination is therefore identical to the original 
mail address:

/etc/postfix/virtual:
  us...@example.com    us...@example.com

Fortunately, this does not create a loop. The mail is now also accepted via 
SMTP, but I receive a bounce
mail with the following content

  <us...@example.com> : User unknown in virtual alias table

Dispensing with virtual_alias_maps and only routing via transport_maps (and 
possibly relay_domains)
would certainly be a sensible option. However, this cannot be changed in a 
hurry because a number of
scripts are still attached to it that process these maps.

How could this be solved in the existing configuration with virtual_alias_maps?

Ingo
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to