Cannot create IMAP-Mailbox in since Yosemite

We create an navigate to IMAP-Mailboxes form FileMaker since years.

Since Yosemite - sometimes it runs - or not :frowning:

Script is assembled in FileMaker and ten sent als AppleScript:
For testing I took it into ScriptEditor, to find out, what the Problem is…?

To create a MailBOX I send a full mailbox path to then “Create” command as “E/Example_MailBOX”.

It should create a mailbox "Example_Mailbox within the Mailbox “E” of account “KUNDEN”. Mailbox “E” already exists.
After Creating the mailbox was activated and the the new mailbox should be selected.

Somebody has hint what has changed and how to fix it ?

tell application "Mail"
	set TargetAccount to "KUNDEN"
	set NewMailboxPath to "E/EXAMPLE_MAILBOX"
	tell account TargetAccount
		if not (exists (mailbox "E/EXAMPLE_MAILBOX")) then
				make new mailbox with properties {name:NewMailboxPath}
			on error
				tell me to display dialog "Die Mailbox " & NewMailboxPath & " konnte nicht erstellt werden. Bitte manuell Prüfen" buttons {"OK"} default button 1 giving up after 5
			end try
		end if
	end tell
		set selected mailboxes of message viewer 1 to {mailbox NewMailboxPath of account TargetAccount}
	on error
		set theNewWindow to make new message viewer
		set selected mailboxes of theNewWindow to {mailbox NewMailboxPath of account TargetAccount}
	end try
end tell

Additional information:
I this issue I have only with our in-house mailserver on OSX Server.
With accounts on other mail servers I have no problems to script them.

When I try to creaet a mailbox on that OSX-Server-account with “…make new mailbox with properties {name:“AAA”} …”
I get the error message and Console shows:

28.02.15 17:51:03,165 Mail[689]: *** Assertion failure in -[MCSocket connectToHost:withPort:isBackground:], /SourceCache/Mail/Mail-2070.6/MailCore/Networking/MCSocket.m:202
28.02.15 17:51:03,165 Mail[689]: An exception was thrown during execution of an NSScriptCommand…
28.02.15 17:51:03,165 Mail[689]: This method must be called off the main thread

Somebody has an Idea?

is it a bug in Mail or in OSX Server’s mailserver ??

This issue was classified as an error and shall be fixed in “El Capitan”