Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

mapping email to a script

Posted on 2003-03-04
7
Medium Priority
?
205 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
  • 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
Independent Software Vendors: 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension . This reminded me of questions that come up here at EE along the lines of, "How can I tell the type of file from its cont…
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month15 days, 23 hours left to enroll

580 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