You are not logged in Log in Join
You are here: Home » Members » mjablonski » MailBoxer - mailinglist / newsletter / mailarchive - framework for ZOPE » HowTo use Mailboxer with Windows?

Log in
Name

Password

 

HowTo use Mailboxer with Windows?

How-to use MailBoxer on a windows platform ------------------------------------------- by Gandon Yves ([email protected])

MailBoxer is compatible with windows platfoms (just rename the extension of the downloaded file to be ".tgz" if you have a problem with WinZip).

Then you need to communicate and configure a Mail Transfert Agent. If you have the opportinuty to adapt the configuration of a unix/linux MTA to send to Zope using HTTP your mails, it's great ! Follow the readme instructions.

However, if you want to manage your own MTA with different mailboxes for several users or mailing list, I have test a configuration working with a "free intranet solution for Windows".

First download a powerfull free intranet server (web, proxy, news, smtp, pop, mta ...) called Spin/SIS and running on windows.

http://perso.wanadoo.fr/thierry.peuzin/spin

SPIN (or SIS) is able to launch an external software and particularly a Pascal script when receiving a mail.

You need to modify the corresponding line in the SIS.ini file to define the "SMTP" calling back external script or software. Follow the technical instructions to configurate the SIS.ini file.

Call for example a "mailboxer.spn" script placed for example in the "Samples" folder in the SIS directory.

SMTPCallBack=$([Config].SisRoot)\Samples\mailboxer.spn

mailboxer.spn contains the following script:

// #######################################################

Program mailboxer;

// send automatically mails to Zope MailBoxer product

Var Mail : String; Dest : String; MailFile: Object;

Begin Mail := ParamStr(2);

// If you want to check if it's a mail to send to Zope, // or if you have several lists with different MailBoxer // open the mail to contol the Destination // If you don't do the test, you don't need the following two lines

MailFile.Open( Mail ); Dest := Lower(MailFile.FindHeaderField( "To" ));

// TODO: put the e-mail address accepted !!! // If you don't want to test don't put the following two lines

If ( Dest = mailing.list@yourhost ) Then Begin

// Mandatory lines, " type " must be in lower case // TODO: put your parameters !!!

System ( "type " + Mail + " | c:\YourZopePath\bin\python.exe c:\YourSISPath\Samples\smtp2http.py [-r] callUrl [maxBytes]" );

// Delete .mail et .dest files Unlink( ParamStr(2) ); Unlink( ParamStr(3) );

// Leave this intermediate End line only if you do the test

End;

End.

// #######################################################

(NB : callUrl = something like http://localhost:8080/MyZope/MailingList/manage_mailboxer (cf MailBoxer readme)

YourZopePath = the path containing ZOPE. It indicates to DOS where is python.exe.

YourSISPath/Sample/ = Where (for example) you have put the smtp2http.py script. DON'T FORGET to copy smtp2http.py there !