My company does not yet have dedicated Internet connectivity. Until we do,
several individuals have established personal accounts with an ISP whose
domain is, let's say, isp.com. Therefore, we all have mailboxes maintained
by the ISP with addresses like jdoe(_at_)isp(_dot_)com,
bdoe(_at_)isp(_dot_)com, cdoe(_at_)isp(_dot_)com,
etc....
We have established a domain (e.g. mycompany.com) and would like to have
addresses like jdoe(_at_)mycompany(_dot_)com rather than
jdoe(_at_)isp(_dot_)com; but the ISP
directs all mail addressed to mycompany.com to one mailbox. They tell us
that it will be up to the person who receives all mail addressed to
mycompany.com to redistribute it to the appropriate mailbox at isp.com and
suggested using procmail.
I've read in great, painful detail the various man pages and scanned the
mailing list archives and have not yet found a solution. This question has
been asked at least twice before by others, and answers were attempted but
none appeared satisfactory, so I thought I'd try one more time. Here's some
pseudo-code for what I'd like to do:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#Assume jdoe(_at_)isp(_dot_)com is the default mailbox for all mail
#sent to xxxx(_at_)mycompany(_dot_)com
Found_an_owner = FALSE.
If TO: adoe(_at_)mycompany(_dot_)com then
Found_an_owner = TRUE
send a copy to adoe(_at_)isp(_dot_)com(_dot_)
If TO: bdoe(_at_)mycompany(_dot_)com then
Found_an_owner = TRUE
redirect to bdoe(_at_)isp(_dot_)com(_dot_)
If TO: cdoe(_at_)mycompany(_dot_)com then
Found_an_owner = TRUE
redirect to cdoe(_at_)isp(_dot_)com(_dot_)
If TO: jdoe(_at_)mycompany(_dot_)com then #Note: this is mail sent to ME
Found_an_owner = TRUE
keep a copy for myself in jdoe(_at_)isp(_dot_)com(_dot_)
If Found_an_owner = FALSE then
keep a copy for myself in jdoe(_at_)isp(_dot_)com
else
I'm done, an owner was found.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Note that multiple recipients can receive copies of a single piece of mail.
I won't worry about the case where there were multiple addressees
at nigas.com and one was bad. In my dreams, the copy meant for
the bogus address would be returned or dropped into the default box,
but I suspect this would unnecessarily complicate matters for an
improbable set of circumstances.
Thanks VERY much,
Craig Hairrell
P.S. I'm a UNIX virgin. I know big iron and PCs. The stuff in between is
currently a mystery to me. Please make no assuptions of UNIX knowledge
beyond ls, cd, and pico.
--
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
----------------------------------
Craig Hairrell
Grassland Systems
Internet: hairrell(_at_)mcs(_dot_)com
CompuServe: 74143,3150
Snail Mail: 46W230 Jericho Road
Big Rock, IL 60511
----------------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^