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.

For example:

[email protected] -> (list of board mail addresses) [email protected] -> (list of regular members mail addresses)

The admins told me to do the following:

  1. In the online tool, make sure the mail is delivered to "Inbox" (which seems to be the postfix inbox)
  2. In the online tool, define (for example) [email protected] to forward to [email protected]
  3. 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 [email protected]

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?

1 Answer 1


The behavior is described in http://www.postfix.org/local.8.html in the paragraph of Address Extension:

   For  example,  with  "recipient_delimiter  =  +", mail for
   name+foo is delivered to the  alias  name+foo  or  to  the
   alias  name,  to  the  destinations  listed in ~name/.for-
   ward+foo or in ~name/.forward, to the mailbox owned by the
   user name, or it is sent back as undeliverable.

But to be honest: Ditch that provider. Letting you configure mail forwarding only by .forward files is technology of the last century.

  • Well, it's a provider run by students in their free time, and it's dirt cheap, because it's running on campus bandwidth. And to be fair, they've got a nice web front-end to manage mail forwarding, just nothing to configure it from PHP or any other language. Commented Oct 18, 2011 at 13:02
  • 1
    'technology of the last century' is pretty elitist now, and naively elitist almost a decade ago. This answer is tarnished by that disappointing inclusion. Commented Nov 18, 2020 at 21:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .