We found a bug in the FusionMail code (thanks to Jason Lavigne for pointing
out the problem).  Sometimes, when a mail is sent to both local and
non-local recipients, all of the mail is not received.  The reason for this
is that the DATA.CFM template relies on the "ToDomain" variable in some of
its queries (Kym's DATA.CFM probably has this fixed already but I haven't
checked).  The ToDomain variable is really only valid in the RCPT.CFM
template since it changes each time a new RCPT clause is received from the
remote server or client.  You should determine the recipients and domains
from the RCPTLIST or the RELAYLIST variables.

Here is the corrected code:

<!--- loop through all the RCPTs --->
<cfloop index="rcptloop" from="1" to="#counter#">
   <cfset emailaddr="#listgetat(rcpts,rcptloop)#">
   <cfset orgemailaddr=emailaddr>
   <cfset domainstr="#form.todomain#">
   <cfif find("@",emailaddr) gt 0>
      <cfset domainstr=mid(emailaddr,find("@",emailaddr)+1,len(emailaddr))>
      <cfset emailaddr=left(emailaddr,find("@",emailaddr)-1)>
   </cfif>

   <cfquery name="getuser" datasource="iMS">
      select * from (pops inner join aliases on
pops.accountnum=aliases.accountnum)
      inner join domainaliases on aliases.domain=domainaliases.domainid
      where domainaliases.domain='#domainstr#' and alias='#emailaddr#'
   </cfquery>

Please let me know if there are any problems or questions.

Regards,

Howie Hamlin
--
inFusion Project Manager; On-Line Data Solutions, Inc. (631)737-4668
www.CoolFusion.com
============================================================
Please vote for iMS in the Most Innovative category here:
*** http://www.sys-con.com/ColdFusion/readerschoice2000/ ***
============================================================
Check out inFusion Mail Server - the world's most configurable email server



========================================================================
     This list server is Powered by iMS
   'The Swiss Army Knife of Mail Servers'
   --------------------------------------
To leave this list please complete the form at 
http://www.CoolFusion.com/iMS.htm

List archives: http://www.mail-archive.com/infusion-email%40eoscape.com/
========================================================================

Reply via email to