Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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