Link to home
Start Free TrialLog in
Avatar of randor1973
randor1973

asked on

mapping email to a script

Hello,

ok, i run a site that is hosted by a company. i need to have an email alias be sent to a script in my cgi-bin, well needless to say, i am getting no help from my host, all they are saying is that i need to find someone to map it for me, or they will do it for $60 an hour, even though i already pay them over $100 per month for my sites now. well, anyway what i have is this: currently all my emails are dropping into a catch-all box via email forwarding (which i have control over through the sites menu) but forwarding will not let me forward an address to a path. now i do have an .mail_aliases file above my public_html and in it i placed this:
test: "|/path/to/my/parser.pl"

but it still is not sending to my path.

so:
do i need to have the server restarted after making these alterations?
if so, is there a way to just restart my part locally?
im i doing something wrong in there?
do i need to maybe setup a seperate email box for each email?
or maybe do i need to forward that email to a different place so that i can alias it to the script?

please, any help will be greatly appreciated...

Thank you,
Randor
Avatar of Nick Accad
Nick Accad
Flag of Canada image

im not sure what exactly is your host running, but shouldnt
that file be .forward instead of .mail_aliases? or is your
ISP specefically using .mail_aliases?

what is your local mailer? if its procmail the file to play
with is .procmailrc

something like this:

:0fw
| /path/to/my/parser.pl

like i said, i do not know enough about your system to give
more help, if u have any more info please post them here

tc
-nick

Avatar of periwinkle
Assuming that you are running on a Linux system, and you have access to your aliases, you can simply set up an alias like:

thisemail:      "|/full/path/to/your/program"
After changing aliases mapping for sendmail, you need to run "newaliases" in order to tell to sendmail to rebuild its aliases.db file.
Avatar of randor1973
randor1973

ASKER

ok, i found out that i actually need to use the procmail, so can someone show me how to redirect anything coming in test@mydomain.com to /path/to/my/parser.pl

Thank you for any help
Why do you need to use procmail?  

In the /etc/aliases file, you can set up:

test:      "|/path/to/my/parse.pl"

and then run 'newaliases' to update the aliases.
ASKER CERTIFIED SOLUTION
Avatar of Nick Accad
Nick Accad
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
yes, sry naccad, i was unsure if i was reading it correctly, i infact have procmasil and that worked, thank you