Forum Moderators: bakedjake

Message Too Old, No Replies

Need help with Postfix

Trying to aggregate aliases before sending upstream

         

tmhcorp

12:27 am on Jul 27, 2004 (gmt 0)

10+ Year Member



I'm trying to use Postfix to combine aliases for "domain.com" into standard accounts and then forward on to another SMTP server. I don't want to change the "domain.com" part. (Out of my control)

So:
name1@domain.com user1@domain.com
name2@domain.com user1@domain.com
name3@domain.com user2@domain.com
@domain.com user3@domain.com

I've tried to accomplish this using Virtual maps, but as soon as a virtual domain is listed there, Postfix will not relay the mail for that domain. Any ideas?

Thanks,
Jim

MattyMoose

7:55 pm on Jul 27, 2004 (gmt 0)

10+ Year Member



You might be looking for a "transports" file...

in your main.cf add:

transport_maps = hash:/usr/local/etc/postfix/transport

in your /usr/local/etc/postfix/transport file, I have:

mydomain.com smtp:192.168.1.1

once you've done that, you need to run the "postmap" command (with the hash option). That'll create a new file called "transport.db" (Berkley DB format, I think).

HTH,
-MM

tmhcorp

8:13 pm on Jul 27, 2004 (gmt 0)

10+ Year Member



Thanks MM. I tried using transports, but the address change still needed to be defined elsewhere. If I used the virtual table to define the change then the entry in transports would get ignored when it tried to deliver the mail.

What I have been able to use is the canonical_recipients map. This replaces the address with a different one, and then uses transports to determine what to do with the message next. Seems to be working so far.

Thanks!
Jim