skydiver12481
Goto Top

Sender Based Routing funkioniert nur eingeschränkt....

Hallo Leute,

mal wieder probleme mit dem exchange...

Folgendes:

ich habe 2 Sendekonnektoren einen für GMX (Bereich: nexthopdomain.com) und einen für meinefirma.de (Bereich: *).

Nun hab ich mein Sender Based Routing installiert nach dem ich folgendes Script zur DLL kompiliert hab:

[code]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Exchange.Data.Transport;
using Microsoft.Exchange.Data.Transport.Email;
using Microsoft.Exchange.Data.Transport.Smtp;
using Microsoft.Exchange.Data.Transport.Routing;
using Microsoft.Exchange.Data.Common;


namespace RoutingAgentOverride
{
public class SampleRoutingAgentFactory : RoutingAgentFactory
{
public override RoutingAgent CreateAgent(SmtpServer server)
{
RoutingAgent myAgent = new ownRoutingAgent();

return myAgent;
}
}
}
public class ownRoutingAgent : RoutingAgent
{
public ownRoutingAgent()
{
subscribe to different events
base.OnResolvedMessage += new ResolvedMessageEventHandler(ownRoutingAgent_OnResolvedMessage);
}

void ownRoutingAgent_OnResolvedMessage(ResolvedMessageEventSource source, QueuedMessageEventArgs e)
{
try
{
For testing purposes we do not only check the sender address but the subject line as well
If the subject contains the substring "REDIR" then the default routing is overwritten.

Instead of hard-coding the sender you could also perform an LDAP-query, read the information
from a text file, etc.

if (e.MailItem.FromAddress.ToString() == "xyz@gmx.de"
&& e.MailItem.Message.Subject.Contains("REDIR"))
{

Here we set the address space we want to use for the next hop. Note that this doesn't change the recipient address.
Setting the routing domain to "nexthopdomain.com" only means that the routing engine chooses a suitable connector
for nexthopdomain.com instead of using the recpient's domain.

RoutingDomain myRoutingOverride = new RoutingDomain("nexthopdomain.com");

foreach (EnvelopeRecipient recp in e.MailItem.Recipients)
{
recp.SetRoutingOverride(myRoutingOverride);

}

}
}

catch // (Exception except)
{

}
}

}
[/code]

Jetzt macht das dingen aber folgendes:

Schicke ich eine Mail von xyz@gmx.de an blablub@meinefirma.de klappt das und die mail ist auch im onlinepostfach.
Schicke ich eine Mail von xyz@gmx.de an mail@googlemail.com bekomme ich eine mail dass die mail versucht wurde über den konnektor von meinefirma.de zu verschicken und nicht verschickt werden konnte.... Was ja auch logisch ist da meinefirma.de nicht bei gmx ist.

Wo liegt nun der Fehler...ich steige nicht dahinter...

Ich vermute ja ein berechtigungsfehler... bin mir da aber nicht sicher denn der Transportagent den ich erstellt habe sendet wirklich nur an alle möglichen mailadressen welche mit @meinefirma.de enden... nur an alle anderen nicht...

Gruß

Skydiver
P.S: Danke schon mal an alle die versuchen mir zu helfen....

Content-Key: 147908

Url: https://administrator.de/contentid/147908

Printed on: April 23, 2024 at 23:04 o'clock

Member: Chrischmi
Chrischmi Jul 29, 2010 at 11:11:18 (UTC)
Goto Top
Hallo Skydiver, auf http://www.messageconcept.net findest Du mit messageconcept ExSBR eine Software, die Dein Problem löst.
Member: skydiver12481
skydiver12481 Jul 29, 2010 at 11:14:35 (UTC)
Goto Top
ich weiß ich kenne das tool, aber die kosten ein schweine geld und für so ne kleine umgebung lohnt der betrag nicht...

Korrektur:

habe gerade mit chrischmi gesprochen und muss doch sagen dass die Software eine gute und einfache lösung darstellt. Die Preise sind dabei auch top...
Member: Chrischmi
Chrischmi Jul 29, 2010 at 11:29:48 (UTC)
Goto Top
Nunja, bei 250 EUR geht es los. Wenn man das mit dem Preis von einem Microsoft Office, Adobe Acrobat,... etc. vergleicht.