OSX SERVER: Mail Service Scriptable?

Is the Mail Service in Mac OSX Server scriptable and, if so, has anyone written a “create account” script?

I don’t have access to OS X Server so I need to ask if Mail Service is a OS X app or a UNIX app. If it’s a normal OS X app, you can drop its icon on Script Editor’s icon to see if it’s scriptable. If it is a UNIX application, accessed via the shell, it’s possible to issue shell commands via AppleScript but it would require an intimate knowledge of Mail Service and a lot of patience. :wink:

The mail service is controlled via the “Server Settings” OSX application. Dropping it on Script Editor revealed the following available AppleScript Suite. Doesn’t look like creating a user account via AppleScripting is an option.

I’ve included the suite below for everyone’s reference that doesn’t have OSX Server:

Standard Suite: Common terms for most applications

close: Close an object
close reference – the objects to close

data size: Return the size in bytes of an object
data size reference – the object whose data size is to be returned
Result: integer – the size of the object in bytes

get: Get the data for an object
get reference – the object whose data is to be returned
Result: anything – The data from the object

organize: Clean up windows for all or specified sessions
[session reference]

connect: Make a new connection to a host
[to string] – the name or IP of the server
[user string] – the username to use with connection
[with password anything] – password of given user
Result: reference – Object specifier for the new element

set: Set an object’s data
set reference – the object to change
to anything – the new value

Class application: An application program
‘RASW’ by numeric index
‘RASM’ by numeric index
window by numeric index, by name, before/after another element

Class window: A Window
bounds bounding rectangle – the boundary rectangle for the window
closeable boolean [r/o] – Does the window have a close box?
titled boolean [r/o] – Does the window have a title bar?
index integer – the number of the window
floating boolean [r/o] – Does the window float?
modal boolean [r/o] – Is the window modal?
resizable boolean [r/o] – Is the window resizable?
zoomable boolean [r/o] – Is the window zoomable?
zoomed boolean – Is the window zoomed?
name international text – the title of the window
visible boolean [r/o] – is the window visible?
position point [r/o] – upper left coordinates of window

select: Select the specified object
select reference – the object to select

Based on the dictionary, I’d have to agree that it probably isn’t possible.

I don’t use Mac OS X Server’s Mail server so I don’t know this for sure, but doesn’t it use the normal system accounts database for users?

i.e. add a user to the user database and they get an email account automatically?

Therefore isn’t the question: “Can I create a system account via AppleScript?” more than is Mac OS X Server’s Mail server scriptable?

The first question is undoubtedly true

I continue to use EIMS 3.1.4 on Mac OS 9 due to its extreme level of scriptability as a mail server. It is also much more capable overall than the OS X Server built in mail server.