route email to a script.

Issue: when i send an email to edi@qgatu001.con-way.com it is supposed to get sent to the deliveryagent es_mime_in so it can get proccessed. ok i got this to happen 1x. Will update over the weekend when i can test to let you know if it works completely.

sendmail: 8.12.10.
sendmail.mc was compiled w/:
FEATURE(`mailertable', `dbm /etc/mail/mailertable')

added the entry:
qgatu001.con-way.com es_mime_in:[localhost]
(note the space between the host and the delivery agent is 2 tabs)
made the map w/ the following command:
makemap dbm /etc/mail/mailertable < /etc/mail/mailertable

in my sendmail.cf i have the following deffintion for es_mime_in

Mes_mime_in, P=/usr/synthium/sun4.Solaris/bin/es_mime_in, S=11/31, R=21/31, A=es_mime_in -env /usr/synthium/etc/syn_env.sh -o $g -r $u -t mail -x

the only thing i seemed to be missing was /etc/mail/relay-hosts

in there i have my:
domainname
*

everything is working now.

FYi for other folks on how to filter emails on your UNIX host.

edit the /etc/aliases file and add this line...

<username> "|/path/to/script" ## that | is a pipe...

Then email to the <username> and the script can then filter and forward the email or filter and apply data to a oracle DB as in my example for my DBAs!

Dont forget to execute newaliases...

This is for HPUX but i am sure it is very similar on other unixces.