Alan,

If you are getting looping, I would look at the mapping table.  The
excerpted mapping code looks like this:

  --- this is within the loop ---
  if (getMailetContext().isLocalServer(target.getHost())) {
    recipientsToAddLocal.add(target);
  } else {
    recipientsToAddForward.add(target);
  }

  --- this is outside the loop, where we make the changes ---
  // Add mapped recipients that are local
  recipients.addAll(recipientsToAddLocal);

  // Forward to mapped recipients that are remote
  if (recipientsToAddForward.size() != 0) {
    getMailetContext().sendMail(mail.getSender(), recipientsToAddForward,
mail.getMessage());
  }

This means that local recipients should just continue on, but remote
recipients will come back through the processing chain (sendMail injects
mail at the root), and likely be checked again.

Did you use the test script I'd posted for MySQL
(http://nagoya.apache.org/eyebrowse/ReadMsg?[EMAIL PROTECTED]
e.org&msgId=435697) to verify that your MSSQL changes are working as you
expect?  What are the contents of maildb.VirtualUserTable, and the contents
of your local repository?

The mailet doesn't have any tracing messages, but we could easily add some
if necessary.

        --- Noel

-----Original Message-----
From: Alan Gerhard [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 11, 2003 11:46
To: 'James Users List'
Subject: VirtualUsertable seems to be looping

Hi guys -

I am in the process of setting up a VirtualUserTable, James 2.1, W2K and
MSSQL
for the repository.
I converted the MySQL to M$SQL (se below) and am now processing with
throwing
JDBC exceptions.
All seems well -
<mailet match="All" class="JDBCVirtualUserTable">
        <table>db://maildb/VirtualUserTable</table>
        <sqlquery>
                SELECT TOP 1 VT.target_address
                FROM VirtualUserTable AS VT, VirtualUserTable AS VTD
                WHERE (VT.[user] like ? OR VT.[user] like '\%') AND
                        (VT.domain like ? OR (VT.domain like '\%' and VTD.domain like 
?))
                ORDER BY (VT.[user] + '@' + VT.domain) DESC;
        </sqlquery>
</mailet>

For the entry in the Virtual table, I have Bubba, some.com, and validUser as
the
records in the table.
I send mail to [EMAIL PROTECTED] and I get about 20 entries in the spool log
that
James has successfully spooled the mail - but to where I know not.

Yes, some.com is handled by James .....

Suggestions as to where I should look ??

Thanks,
Alan


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to