fork()
Issues
Please follow these directions to have any hope in getting Mojo Mail running on Windows NT. You'll need to make some tweaks to the Config.pm file; all variables, unless otherwise noted are located in the Config.pm file.
Please Please Please Note: Mojo Mail is developed for a Unix-centric server in mind. There are a few major differences between a server, like Apache which Mojo Mail is tested on extensively and a server, like Microsoft's Internet Information Server, which isn't tested by us at all. At the moment, there is no interest for me (as the developer) to make it work on a Microsoft platform. The reason for this is my lack of time to invest and my lack of a server to test on.
I leave this as an invitation for a different party. My personal opinion of products from Microsoft really don't have anything to do with it, I just don't want to give the full thumbs up if Mojo Mail is flaky on IIS due to me not testing it enough on that particular platform.
Your most likely going to have to use SMTP for all mailings; Sendmail usually isn't available for Windows. As such, you need to specify an SMTP address in the $SMTP_ADDRESS variable, example:
$SMTP_ADDRESS = '216.18.218.211';
You may also want to tell Mojo Mail use SMTP sending right off the bat, instead of having to configure it everytime you make a list. You do this by adding a new line in the %LIST_SETUP_DEFAULTS hash:
%LIST_SETUP_DEFAULTS = ( send_via_smtp => 1, );
These may be other entries in this file, you can put this particular entry either above, or below any other ones:
%LIST_SETUP_DEFAULTS = ( use_pop_before_smtp => 1, smtp_server => $SMTP_ADDRESS,
send_via_smtp => 1
);
While you're at it, you may also want to add the 'strip_message_headers' and set it to 1:
%LIST_SETUP_DEFAULTS = ( use_pop_before_smtp => 1, smtp_server => $SMTP_ADDRESS, send_via_smtp => 1, strip_message_headers => 1, );
Without this, SDBM will be used, resulting in errors like this:
sdbm store returned -1, errno 22, key "20030110131517" at ..//MOJO/Guts.pm line 936, <HANDLE1> line 3.
These will happen when attempting to archive any message larger than around 1k in size.
It is very easy to install this on your own machine via the ActivePerl package manager (PPM).
If your ISP doesn't have this installed, you can also copy the files themselves into your include path. There may be an easier way to do this, but the way I figured out was to install ActivePerl on your own machine, then use the PPM utility to install DB_File, and then copy the DB_File files from there. These are the locations of the files in a standard ActivePerl install:
Installing C:\Perl\site\lib\auto\DB_File\DB_File.bs Installing C:\Perl\site\lib\auto\DB_File\DB_File.dll Installing C:\Perl\site\lib\auto\DB_File\DB_File.exp Installing C:\Perl\site\lib\auto\DB_File\DB_File.lib Installing C:\Perl\site\lib\DB_File.pm Installing C:\Perl\site\lib\auto\DB_File\autosplit.ix
If the you've already tried to run Mojo Mail without installing DB_File first, you'll need to delete everything in $FILES and start over, so the system can recreate everything with the new database format. If you don't, you'll get a many unexpected errors, as Mojo is counting one database format, finding two, and getting generally scoobied.
Perl CGI scripts need to be run in No Parse Header mode, set the $NPH variable to 1:
$NPH = 1;
You may also need to rename the mojo.cgi script to nph-mojo.cgi, but try that after you've done everything else.
You may also need to change the first ``shebang'' line in mojo.cgi from:
#!/usr/bin/perl
to something like:
#!C:/perl/bin/perl.exe
fork()
IssuesMojo Mail uses something called fork()
that may or may not be available to Windows Versions of Perl. fork()
is very critical to bulk mailings, but you can make bulk mailings, provided that you don't use batching, by setting the $FORK_SMTP_BULK_MAILINGS varaible to 1
$FORK_SMTP_BULK_MAILINGS = 1;
Documentation and caveats with using fork()
on Win32:
http://www.perldoc.com/perl5.8.0/pod/perlfork.html
Your version of Windows my not support File Locking, this is extremely important in keeping the subscription list uncorrupted. You may want to look into using a SQL backend to use as your subscription list. There may also be unknown complications with the templating in Mojo Mail as well. YMMV.
If you are using NT4, there is a patch that needs to be applied for to IIS. As of January 2003, more information and the patch is available here:
http://support.microsoft.com/default.aspx?scid=KB;en-us;q280341
If the patch is moved or removed, do a search on Microsoft's support site for it. Microsoft says to contact them via this page:
http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS
Your copy of Mojo Mail should be all set to run on a Windows Server. If you still cannot run the program, open up the mojo.cgi script and find these two lines:
use lib './'; #look for the MOJO folder in the same directory as the script use lib './MOJO';
you may have to change these to the full absolute path of where they're at (example:)
use lib 'D:\somewhere\else\mojo'; use lib 'D:\somewhere\else\mojo\MOJO';
Thanks goes out to David Wood ( obsidian@panix.com ) for adding many great points to this FAQ.
Um, Good Luck!