Ken,
Below is the first part of my RCPT.cfm. I think this is the part that is relevant for
you. Actually it's just a little part of this that you'd need, but I thought it would
help to see the full flow. I put in some comments to help explain what's going on.
My data structure is slightly different from the FusionMail one, so adjust accordingly
if that's what you're using. If you have any questions, let me know.
-Max
<!--- Check for max. recipients (defined in application.cfm) --->
<CFIF form.TotalRcpts GT variables.MaxRcpts>
result=tooMany
<CFABORT>
</CFIF>
<!--- Make sure there is a domain name or use the default one (defined in
application.cfm) --->
<CFSET DestDomain = IIf( NOT Len(Trim(form.ToDomain)), "variables.DefaultDomain",
"form.ToDomain" )>
<!--- Check incoming domain to see if local --->
<CFQUERY NAME="CheckDomain" DATASOURCE="#variables.DSN#">
SELECT DomainAliases.DomainID, Domains.MaxMailboxSize, Domains.MaxMessageSize,
Domains.DomainType, Domains.RelayToMX
FROM DomainAliases, Domains
WHERE DomainAliases.DomainID = Domains.DomainID
AND DomainAliases.DomainName = '#variables.DestDomain#'
</CFQUERY>
<!--- If local domain and it's a realy type domain, then relay to the specified mail
server --->
<CFIF CheckDomain.RecordCount AND CheckDomain.DomainType EQ 2>
<CFOUTPUT>
result=relay
mx="#CheckDomain.RelayToMX#"
</CFOUTPUT>
<CFABORT>
</CFIF>
<!--- If the domain is not local... --->
<CFIF NOT CheckDomain.RecordCount>
<!--- LocalSender is set to true if IP address was considered "local" in
HELO.cfm
Authenticated is to true (by iMS) if sender has authenticated
using SMTP AUTH --->
<CFIF form.LocalSender OR form.Authenticated>
result=relay
<!--- If not local domain, and not local IP and not AUTHorized, then deny
relay. --->
<CFELSE>
result=notLocal
customresponse="550 Relay Denied."
</CFIF>
<CFABORT>
</CFIF>
<!--- At this point the template has either exited or the domain is local and not a
relay domain, so go on to check that the user exists, etc... --->
At 7/19/2000 12:00 AM -0600, MailingLists wrote:
>Hi,
>
>Does anyone have code for RCPT.CFM that they would be willing
>to share for determining if someone has been authenticated
>and is allowed to relay mail?
>
>I've got the authentication up and running in the SMTPAUTH.CFM,
>but I'm not quite sure where to place the code in RCPT.CFM.
>
>Thanks,
>
>Ken
========================================================================
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/
========================================================================