Hi,

Thanks all for your help.

If anyone needs this in future, here's how I did it:
1. Added the following line to /etc/postfix/main.cf:
transport_maps = hash:/etc/postfix/transport

2. create a subdomain like(postfixadmin does not allow to add an alias
to a not existing domain):
command1.domain.org

2. go to postfixadmin and create the alias like this:
Alias: recipi...@domain.org
To: anyth...@command1.domain.org

3. edit /etc/postfix/transport and add like this:
anyth...@command1.domain.org some_name:

4. run: postmap /etc/postfix/transport

5. edit /etc/postfix/master.cf and add like this:
some_name unix - n n - - pipe
user=SOMEUSER argv=/path/to/php/script

6. run: postfix reload

On Fri, Mar 6, 2009 at 9:42 PM, J.P. Trosclair
<jptroscl...@judelawfirm.com> wrote:
>>> What is "my_custom_transport.example.com" ? A subdomain?
>>>
>>
>> Yes.  In addition, this list uses example.com as a basis quite frequently.
>> You didn't provide your own domain, so J.P. used this as an example.
>>
>
> As a side note, it doesn't have to be a real sub-domain. When the mail is
> handed off to postfix my_custom_transport.example.com will be found in the
> transport_maps table since you defined it there (or will soon enough) along
> with my_custom_transport. From there postfix will try to deliver the mail
> using the definition of my_custom_transport in master.cf. I'm sure some
> folks can get into more details than I can on what really happens, but in a
> nutshell this is how things will flow.
>
> When you create your pseudo domain for use in this setup, it's probably best
> to use a non existent sub-domain or some variant of your real domain just to
> help avoid confusion or complications down the road. This is not guaranteed
> to prevent problems, but in my opinion it's a good first step to avoiding
> them. I haven't personally seen a best practices guide for these sorts of
> situations. Just don't call your pseudo domain (gmail|yahoo|hotmail).com or
> some other real domain that accepts mail.
>
>
>
>

Reply via email to