Forwarding to PHP script help

9 posts / 0 new
Last post
#1 Mon, 01/26/2009 - 06:59
AbitatSupport

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:

reyrey-www1.mydomain.com: |/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 :(

(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?

Thanks!

EDIT*

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/aliases-lib.pl line 239.

but it still modifies the aliases file.

My test has the following aliases:

reyrey@www1.mydomain.com.txt File /home/www1/mytest Program /home/www1/public_html/test.php

which looks like this:

reyrey-www1.mydomain.com: "|/etc/webmin/virtual-server/autoreply.pl /home/www1/autoreply-reyrey@www1.mydomain.com.txt 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

Wed, 01/28/2009 - 11:14
andreychek

Howdy,

What does this show:

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

Tue, 02/17/2009 - 22:09 (Reply to #2)
sfatula

Where is this patch? Have a link?

Tue, 02/03/2009 - 01:03
manus

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

Tue, 02/03/2009 - 06:09 (Reply to #4)
andreychek

Can you list the exact error message? And, if there's a file or directory mentioned in the error, can you ran a &quot;ls -l&quot; on that file or directory?
-Eric

Tue, 02/03/2009 - 06:17
manus

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

ls -l:
-rw-r--r-- 1 root root 7950 2009-01-25 22:49 /usr/share/webmin/postfix/aliases-lib.pl

Tue, 02/03/2009 - 10:28 (Reply to #6)
andreychek

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

What version of Webmin and Virtualmin do you have installed?
-Eric

Tue, 02/03/2009 - 10:34
manus

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

Tue, 02/17/2009 - 22:38
Topic locked