invoke php script on incoming mails on postfix
I added the line– his: "| /var/www/his/goompare/ml.php" --(ml.php inserts value into my mysql database and
I think i'm almost there, but is getting it wrong somewhere. Please help!
8 Replies
In your setup, how would you add a "normal" e-mail address under the gotranz.com domain? There's a couple different ways to handle that, and /etc/aliases might not be where it's looking for gotranz.com stuff. (Also, you have run "newaliases", right?)
Create an alias on the virtual domain, in your case it could be something like:
The name is not important and you don't even have to create a real mailbox for the user. Then on /etc/aliases create another alias, mapping the "local" hisgotranzcom user to the script:
hisgotranzcom: |/var/www/his/goompare/ml.php
I don't recall if it was absolutely necessary to remove the space between the pipe and the script path.
@GrunkaLunka creating a new alias means adding hisgotranzcom to the table users in the Mail DB ??
In theory, there must be a way to add two types of email addresses to the database, regular ones with an actual mailbox and others that just forward email to another address. You want to set up one of the latter ones, which will receive mail and forward it to the local user hisgotrazcom.
Hope that helps.
What is bothering me is that nothing ever has appeared in the mail log about /etc/aliases. i seriously doubt that /etc/aliases is nt being checked by postfix wen i recieve mails.
Also i get a failed deliver report, seems the forwarding isnt working..
" This is the mail system at host gotranz.com.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<
mail.gotranz.com loops back to myself "