$self -> create_domain(); $self -> create_user_account(); $self -> stop_server(); $self -> create_postmaster_account(); $self -> update_dirs_and_files(); $self -> info("Starting '$$self{'_xmail_debug'}' with the new config files"); $self -> info('o Server must be up for it to receive mail'); $self -> info("o Sending a test message to $$self{'_options'}{'user_name'}"); $process = $self -> start_server(); $self -> send_test_message(); $self -> receive_test_message(); $self -> stop_server(); $self -> install_and_start_service();
XMail::Install - A module to install the MS Windows mail server XMail
XMail::Install
#!/usr/bin/perl use strict; use warnings; use XMail::Install; # ----------------- my(%option) = (...); XMail::Install -> new(options => \%option) -> run();
See the next section for details.
XMail::Install is a pure Perl module. It only runs under MS Windows.
It will read an unpacked distro of the XMail mail server, and install, configure and test it.
Also, it will stop and remove the service if it is already running.
So, download xmail-1.25.win32bin.zip from http://xmailserver.org/ and unpack it into c:\. This creates c:\xmail-1.25.
Then: Unpack the distro. shell>cd examples shell>perl install-xmail-1.pl -h shell>perl install-xmail-1.pl -v -other -options shell>perl install-xmail-2.pl -v -other -options
The reason for having 2 install programs is that I could not get 1 to work properly, neither under Win2FK nor WinXFP. Sometimes it would work, and sometimes it would not.
This module is available as a Unix-style distro (*.tgz).
See http://savage.net.au/Perl-modules.html for details.
See http://savage.net.au/Perl-modules/html/installing-a-module.html for help on unpacking and installing.
new(...) returns an object of type XMail::Install.
This is the class's contructor.
Usage: XMail::Install -> new().
This method takes a hashref of options. There are no mandatory options.
Call new() as new(options => {key_1 => value_1, key_2 => value_2, ...}).
new()
This is the name of your mail domain.
The default is xmail.net.
This is the name of the directory into which you unpacked XMail.
The default is c:\xmail-1.25.
This is the name of the directory into which XMail's default directory MailRoot will be installed.
The default is c:\, so XMail will be installed into c:\MailRoot.
Also, executables in the distro dir c:\xmail-1.25\bin will be copied to c:\MailRoot\bin.
This is the password of the postmaster (admin) account.
The default is 'richness-of-martens'.
This is the IP address, or name, of the host on which the XMail service will be running.
The default is 127.0.0.1.
This is the name of a user (non-admin) account.
The default is 'rsavage'.
This is the password of the user account.
The default is 'skulk-of-foxes'.
This is the flag which controls the amount of progress messages printed.
Values are 0 or 1.
The default is 0.
A convenience method which makes the main line code in method run() simpler.
run()
Actually, except for new() and run(), all methods in the class are convenience methods.
Update ctrlaccounts.tab with the details of the user 'xmailuser'.
Use the XMail ctrlclnt program to create a mail domain.
XMail
ctrlclnt
Create XMail's postmaster account and password.
Create an XMail user account and password.
Print progress messages, while checking the verbose switch.
This installs and starts the XMail service.
Receive and print the test message sent by method send_test_message.
send_test_message
Do all the work required to install XMail.
This is achieved by calling all the convenience methods in the class.
Send a test message, which will be received by method receive_test_message.
receive_test_message
Start the XMail program as a process, not as a service.
Stop the XMail service, and then remove it.
Stop the XMail program.
Update various directories and files.
Update the registry, if necessary, being careful to preserve data in the immediate vicinity of the new keys.
Return the last error available from the OS.
To explicitly document a minimum set of steps I believe are required to install XMail.
This allows to me very simply install XMail on more than one system and, in the same way, it allows anyone to very simply set up a mail server to experiment with.
Email me if you have any suggestions regarding the steps I've implemented.
Well, you'll need to investigate XMail itself to answer that question. See http://www.xmailserver.org/
But we can say mail server security is a complex issue, and installing a mail server should not be done lightly.
At the absolute minimum, you should not use the default passwords shipped with this module.
not
Firstly, as a way of drawing you attention to the problem of choosing good passwords, and secondly because I like playing with the English language.
And yes, 'a richness of martens' is correct English, where martens refers to a type of bird, and richness is the corresponding collective noun. The same goes for 'skulk-of-foxes'.
One source of passwords is https://www.grc.com/passwords.htm
V 1.22 and V 1.24.
No. I use a commercial web hosting company, http://www.quadrahosting.com.au/
The way I use XMail is by restricing the clients which can talk to it to be clients with IP addresses in the ranges 192.168.*.* and 10.*.*.*.
I examined it, and decided it wasn't quite relevant.
A daemon is what Microsoft, and others, call a service.
See http://en.wikipedia.org/wiki/Daemon_%28computer_software%29 for an explanation.
XMail::Install was written by Ron Savage in 2007. [ron@savage.net.au]
Home page: http://savage.net.au/index.html
Australian copyright (c) 2007, Ron Savage. All rights reserved.
All Programs of mine are 'OSI Certified Open Source Software'; you can redistribute them and/or modify them under the terms of The Artistic License, a copy of which is available at: http://www.opensource.org/licenses/index.html
To install XMail::Install, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XMail::Install
CPAN shell
perl -MCPAN -e shell install XMail::Install
For more information on module installation, please visit the detailed CPAN module installation guide.