I have a server running Postfix 2.6.5, and all of the local users have email accounts through the company ISP. These accounts have the same usernames as their usernames on the server.

I would like any locally sent email (i.e., sent to joe@local.localdomain or just joe) to be sent directly to the ISP accounts (i.e., joe@my-isp.com). I don't want the users to even have mailboxes on the server.

Using smtp_generic_maps looks close, but I think it requires a separate line for every user in the system. Do I need to put regexps in generic? Or is there an easier way to do this?

link|improve this question

feedback

1 Answer

up vote 2 down vote accepted

Use virtual delivery, as follows:

@local.localdomain @my-isp.com

See virtual(5) for more information on how this works, and why (specifically, the "RESULT ADDRESS REWRITING" section).

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.