Forwarding to PHP script help

I am trying to set up a mail alias that forwards to a php script and am running into problems.

I do:

Edit Mail Aliases->Add an alias to this domain

I set it to a mailbox called reyrey, and set it to forward to a program that I specified.

This is what my /etc/aliases file added: |/home/www1/public_html/test.php

Now, if I set up an auto reply using virtualmin, then go edit my /etc/aliases file and remove what virtualmin put in there, it STILL autoreplies, which leads me to believe there are more files being edited than just /etc/aliases.

Anyway, point is, I can manually browse to this page that for now inserts a record into a table and it works, but when I send an email to the address, nothing happens :frowning:

(However, if I set up auto replying, I do receive it back, but again, if I remove the auto reply line from /etc/aliases, it still auto replies when set up through virtualmin)

What am I missing here?



Also, I am getting this error occasionally when editing the aliases:

Error - Perl execution failed

Undefined subroutine &postfix::rebuild_map_cmd called at /usr/share/webmin/postfix/ line 239.

but it still modifies the aliases file.

My test has the following aliases:
File /home/www1/mytest
Program /home/www1/public_html/test.php

which looks like this: "|/etc/webmin/virtual-server/ /home/www1/ reyrey",/home/www1/mytest,|/home/www1/public_html/test.php

If I totally remove that line from my aliases file, it STILL autoreplies. Is there a service that needs restarting? Or a different file that I should be looking at?

EDIT 2***

I found this in my mail logs:
temporary failure. Command output: local: fatal: execvp /home/www1/public_html/test.php: Permission denied

Hummm…<br><br>Post edited by: AbitatSupport, at: 2009/01/26 09:53


What does this show:

ls -ld /home/www1
ls -l /home/www1/public_html/test.php

I get the same error on mail alias since the last Webmin/Virtualmin update.
I didn’t modified anything on virtualmin.

Can you list the exact error message? And, if there’s a file or directory mentioned in the error, can you ran a “ls -l” on that file or directory?

When I click on the save button for an alias:
Undefined subroutine &postfix::rebuild_map_cmd called at /usr/share/webmin/postfix/ line 239.

ls -l:
-rw-r–r-- 1 root root 7950 2009-01-25 22:49 /usr/share/webmin/postfix/

Hrm, I misunderstood your question originally, I think I get it now.

What version of Webmin and Virtualmin do you have installed?

I found 5 minutes ago the patch for the postfix alias problem on Webmin site.
So all work now for me.

Where is this patch? Have a link?