First of all: I'm working on a rented server setup here (hosted at Ulyssis.org). I only have access to my user folder (/home/preparee) folder and an online application that allows me to manage my account, and set up mail aliases.
Now, I want to be able to manage mail forwards for my domain, which is called preparee.be. Preparee is our organisation. In the past, we just added users to mail forwarding manually using the online application. Now, I'm developing a PHP solution to manage our organisation. I wanted to be able to control the mail forwards from PHP, without having to manually visit the online tool every time. I've got all the mail adresses in a MySQL database, seems a bit silly to manually copy them and paste them in the online tool every time.
firstname.lastname@example.org -> (list of board mail addresses) email@example.com -> (list of regular members mail addresses)
The admins told me to do the following:
- In the online tool, make sure the mail is delivered to "Inbox" (which seems to be the postfix inbox)
- In the online tool, define (for example) firstname.lastname@example.org to forward to email@example.com
- In my home directory, create a file called ".forward+pudding", and make it contain the line-seperated mail addresses the mails should be forwarded too when they arrive at firstname.lastname@example.org
I was told postfix should try to "match" the incoming mail to these .forward files, and use the most specific .forward file.
Well, this doesn't work. The only thing that works is if I define mail addresses in the regular ".forward" file, but that file just seems to get used if all else fails. I've tried poking around with the user rights to read the .forward files, tried other syntax than line-seperation, but to no avail.
I've checked the postfix documentation, but it is quite archaic, and no info seems to match the restricted environment in which I'm working (only access to home directory, I can't even access the postfix logs).
Anybody with experience with this type of forwarding?