I am setting up a postfix email gateway. It will not hold any mail but will accept email for my domain and forward it to another internal mailserver and relay mail out from the internal server.
One of the main problems is that I am working on a live running system and this will be an upgrade so I am using a test domain which I will change at some point to the real domain.
I tried various methods but found the simplest way (that worked) was to use a script to create an aliases file (from ldap entries). There are various problems with this method. The main one being that the entries can't be of the simple form email@example.com because the gateway doesn't know where to send them. They have to be of the form: firstname.lastname@example.org.
What I would like doesn't seem hard but I can't get my head around the postfix documentation. There seem to be various ways but none of them seem to work. Most of the examples I have found on the web assume the mail is going to end up on the server. I want a list of users somewhere, preferably of the form: user1, user2, etc rather than email@example.com (I can easily generate this list) and I would like postfix to forward all email to example.com to a particular server: ie realmailserver.example.com.
Can anyone suggest clues as to how I might do this?