X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=doc%2FREADME;h=8811727cd4dcc639b27d844d68d4a0424f628cec;hb=1975b1d7755c8a92480a8847f9dd3dc476f95ff5;hp=c5bd6cc66f271c9611d6f9de62aada79d7583f49;hpb=53ae1e68bebff56f89414676e3303c553e6708c7;p=org.ibex.mail.git diff --git a/doc/README b/doc/README index c5bd6cc..8811727 100644 --- a/doc/README +++ b/doc/README @@ -1,7 +1,6 @@ ============================================================================== org.ibex.mail - A mail server offering the same level of flexibility as Java Servlets. The org.ibex.mail server infrastructure is designed to run within @@ -15,3 +14,109 @@ including: - Shared configuration of virtual hosts between web-apps and mail-apps - Authentication infrastructure + +______________________________________________________________________________ +Compliance + +Ibexmail is believed to be compliant with the following RFCs: + + - + + +______________________________________________________________________________ +JavaScript API + +Each script is invoked with the variable 'm' bound to a message to be +handled. The script MUST return either a Filter or a Target which +will process the message next. This is a crucial property that +prevents mail from being lost -- a script can never "lose" a message +except by explicitly sending it to the target 'ibex.mail.target.dead'. +All methods which create new messages (such as ibex.mail.message.clone()) +Also take a target -- the newly-created message is immediately directed +to the target; the current script does not get access to it. + +The following properties are available from ibex.mail: + + ibex.mail. + + my. -- this can be read from but only written to if it is null + mailbox -- a mail storage object; subproperties are submailboxes; also qualifies as a Target + db -- a (read/write) properties file for the current user + + freshMessageId -- returns a fresh message id every time it is read + + + props[path] -- reads a java-style properties file from [path] and allows read-write access + script[path] -- reads a script from 'path', parses it as a JS script, and passes the message to that script + + filter. + anonymize + html2text + pgp + singleUseAddress + returnReciept + dcc + vipul + spamAssassin + vacation + + target. + dead -- drops the message on the floor; it vanishes without a trace + dir[path] -- uses the directory [path] as a naive file-based storage area + send -- sends the outgoing message via smtp + bounce(message) -- bounces the message + darcs(repo) + procmail(procmailrc) + lmtp(path) + sms(phone#) + fax(phone#) + nntp(group) + + message. + create -- creates a fresh Message object when read from + clone(m, t) -- makes a copy of message 'm' and sends it to target 't' + pipe(cmdline) -- pipes the message (headers and body) to the shell command 'cmdline' + + crypto. + base36 + .decode + .encode + + + +The following tables describe the keys on objects of various types. +The type of an object is not visible from the JavaScript world; it is +provided here only for documentation purposes. + +Note that, for example, m.headers.date is not the same as m.date; the +former is a string; the latter is a Date object (with subfields) + + Message + allHeaders [String] -- one massive string holding all the headers + headers [Hash] -- the *string* value of each header, keyed on header name + subject [String] -- the Subject: header (for convenience) + date [Date] -- the message's date + to [Address] -- the To: header as an Address object + from [Address] -- the From: header as an Address object + envelopeTo [Address] -- the SMTP "RCPT TO:" recipient + envelopeFrom [Address] -- the SMTP "MAIL FROM:" sender + replyto [Address] -- the ReplyTo: header as an Address object + messageid [String] -- the MessageId: header; if none is present one will be created + cc [Array] -- an array of Adress objects, one for each person cc'd + bcc [Array] -- an array of Adress objects, one for each person bcc'd + resent *FIXME* + traces [Array] -- an array of Trace objects + + deleted [boolean] -- the message's deleted flag + read [boolean] -- the message's read flag + answered [boolean] -- the message's answered flag + + Address + user [String] -- the 'user' part of 'foo ' + host [String] -- the 'host.com' part of 'foo ' + description [String] -- the 'foo' part of 'foo ' + + Trace + returnPath [String] -- FIXME + FIXME +