[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] sendmail, virtusers, and mail based perl scrip ts



-----Original Message-----
From: Josh Kuperman [mailto:josh@xxxxxxxxxxxxxxxxxx]
Sent: Wednesday, August 14, 2002 3:05 PM
To: cobalt users
Subject: [cobalt-users] sendmail, virtusers, and mail based perl scripts


This is a request for advice. I believe I could work it out on my own,
but if anybody has worked through similar, I didn't catch it.  I am
having a debugging problem.

In /etc/mail/aliases I have defined:

testing: "|/usr/adm/sm.bin/mytest.pl"

I believe that this script should be hit by any mail sent to my
server, regardless of which virtual host is used since it is in
/etc/mail/aliases. But in many cases other mail rules are intercepting
it as an unknown user. I could, in theory, do away with the catch-all
that I added if that is enough to make my life simpler. I could also
add an aliases for my test script but that seems counter productive.

I haven't really tracked down the local .mc files so I don't know if I
could add or otherwise get away with doing to much with sendmail, but
I should be able to run it in debugging mode and see what is hitting
what. Does anyone have any pointers.

In my virtusertable I have settings to catch and convert all the
addresses so they go to a single mailserver host .  I have entries to catch
all my virtual hosts.


# accept-email-at-domain routes
@saratoga.lib.ny.us	%1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# catch-all aliases
@sir-barton.saratoga.lib.ny.us	josh
# Put custom additions below (Do not change/remove this line).
testing@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx	testing

What I need to know is how to figure out what rule is catching it and
keeping the message from getting to the script. Since I have some
catch-all stuff in virtusertable, my only guess is the mail is being
caught by that before it gets delivered, but it shouldn't. I believe
there is a way to run sendmail and discover which rules in which file
are being used and the order. I have had it working for some of my
domains but not others.
-----------------------

What domainname to you use when trying to send to the testing alias?
If for exaple you use testing@xxxxxxxxxxxx, then I would suggest that
you put an entry in your virtualusertable that looks like:

testing@xxxxxxxxxxxx	testing

Otherwise the catch all for mydomain.com in virtusertable is likely
to catch mails to testing@xxxxxxxxxxxx and reject them. If you want to
use any of your domains to get to the testing alias then put a similar
entry in virtusertable for each of those domains too.