From: Michele Petrazzo on

Hi all,
I have a local postfix configuration where lan users point to for send
mails.
If the recipient are inside virtual_alias_maps, postfix deliver email
inside maildir, otherwise it forward it through relay_host.
All works but like now I have to setup postfix for accept email, created
by an automatic software, for:
real_user+some_random_and_always_change_info(a)mydomain.com

When the software send this email postfix, seeing that the recipient
aren't in its virtual_alias_maps, forward it to the relay_host.
But I need that this email will be stored like as if I sent it to
real_user(a)mydomain.com

Is there a solution?
Thanks

Configuration:

biff = no
append_dot_mydomain = no
myhostname = linuxmail.myserver.local
mydestination = localhost, linuxmail.myserver.local
home_mailbox = mail/
mail_spool_directory = /home/
virtual_alias_maps = hash:/etc/postfix/virtual_domains
transport_maps = hash:/etc/postfix/transport

virtual_domains:
user1(a)mydomain.com user1(a)localhost

transport:
user2(a)mydomain.com smtp:[192.168.X.Y]

From: /dev/rob0 on
On Fri, Jul 02, 2010 at 04:14:23PM +0200, Michele Petrazzo wrote:
> If the recipient are inside virtual_alias_maps, postfix deliver
> email inside maildir, otherwise it forward it through relay_host.

Minor nitpick:
/usr/sbin/postconf: warning: relay_host: unknown parameter

> All works but like now I have to setup postfix for accept
> email, created by an automatic software, for:
> real_user+some_random_and_always_change_info(a)mydomain.com

Sounds like you want this:
http://www.postfix.org/postconf.5.html#recipient_delimiter

If not, see this:
http://www.postfix.org/DEBUG_README.html#mail
--
Offlist mail to this address is discarded unless
"/dev/rob0" or "not-spam" is in Subject: header