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
Howdy,
What does this show:
ls -ld /home/www1
ls -l /home/www1/public_html/test.php
Where is this patch? Have a link?
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?
-Eric
When I click on the save button for an alias:
Undefined subroutine &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
Hrm, I misunderstood your question originally, I think I get it now.
What version of Webmin and Virtualmin do you have installed?
-Eric
I found 5 minutes ago the patch for the postfix alias problem on Webmin site.
So all work now for me.
Regards.
http://www.webmin.com/updates.html