?
Solved

mapping email to a script

Posted on 2003-03-04
7
Medium Priority
?
201 Views
Last Modified: 2010-04-20
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
0
Comment
Question by:randor1973
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 3

Expert Comment

by:naccad
ID: 8064881
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

0
 
LVL 15

Expert Comment

by:periwinkle
ID: 8068417
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"
0
 
LVL 8

Expert Comment

by:JIEXA
ID: 8082770
After changing aliases mapping for sendmail, you need to run "newaliases" in order to tell to sendmail to rebuild its aliases.db file.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:randor1973
ID: 8092128
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
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 8092433
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.
0
 
LVL 3

Accepted Solution

by:
naccad earned 400 total points
ID: 8092527
randor, i already posted an example for procmail

anyway, here it is again:

create a .procmailrc file (that is dot procmailrc)

in it, put something like this
(this is a working procmailrc file)

##BEGIN PROCMAIL CONF
PATH=$HOME/bin;/usr/bin:/bin:/usr/local/bin
LOGFILE=$HOME/.procmail.log
LOCKFILE=$HOME/.procmail.lock
VERBOSE=off

:0fw
| /home/user1/parser.pl
##END PROCMAIL CONF

tc
-nick

0
 

Author Comment

by:randor1973
ID: 8097736
yes, sry naccad, i was unsure if i was reading it correctly, i infact have procmasil and that worked, thank you
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month14 days, 10 hours left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question