Vaza-Mail Server is open source application server which provides SMTP and POP3 server written with 100% pure Java.

 

Click here to download vaza-mail

 

Requirements:

- J2SE 5.0 Jdk 1.5 (tested with sun Jdk and Jrockit)

Sun Jdk 1.5  can be downloaded at: http://java.sun.com/j2se/1.5.0/download.jsp

Jrocktit can be downloaded at:

http://commerce.bea.com/products/weblogicjrockit/5.0/jr_50.jsp

- J2EE server

Currently, Vaza-Mail only works with jboss3.2.7 server. Perhaps on the next release it will support other J2EE server.

Jboss.3.2.7 can be downloaded at:

http://www.jboss.org/products/jbossas/downloads

- Database server

Microsoft SQL Server 2000 or MSDE (currently only support SQL 2000, but I plan to support others on the next release)

 

Architecture:

Vaza-Mail SMTP and POP3 server is three tier application server. It includes modules:

 - SMTP Listener , to process incoming messages.

 - SMTP Sender, to send messages.

 - POP2 Server, to server as POP3 server.

 - J2EE bean, to process incoming and outgoing messages.

Also, Vaza-Mail needs a Database server to store all email messages.

as shown below:

                   ____________           _____________          ___________

                   |          |          |            |         |           |

   internet < ---> |          | <------> |            | <------>|           |

                   |__________|          |____________|         |___________|

                   SMTP Listener         Jboss server            Database

                   SMTP Sender

                   POP3 Server

 

 

It is recommended to have 3 servers, but it can be installed on one server.

More advanced configuration:

 

                   ____________           _____________          ___________

                   |          |          |            |         |           |

   internet < ---> |          | <------> |            | <------>|           |

                   |__________|          |____________|         |___________|

                   SMTP Listener          ^  ^  Jboss server       Database

                                          |  |       

                   ___________            |  |  

   internet <----> |          |           |  |

                   |          | <----------  |             

                   |__________|              |

                   SMTP Sender               |

                                             |

                   ___________               |   

   internet <----> |          |              |

                   |          | <------------                

                   |__________|

                   POP3 Server

 

Installation:

You need to install Microsoft SQL Server 2000 to store mail messages.

To create database required by Vaza-Mail, what you to do is copy text in createMSSQLdatabase.sql.

Open SQL query analyzer, paste the text copied, and run it.

 

To install SMPT,POP3 servers and Jboss EJB(enterprise java bean). You need to compile all packages(SMTP, POP3 and EJB).

Before compiling, you need to extract package Vaza-Mail packages. In my development box, I extracted to F:\vaza.

Follow steps below to configure the Vaza-Mail:

1. - Edit vaza\conf\jtds-ds.xml to mach your environment, for example:

     Change SQL server connection to match you environment. The default is:

     <connection-url>jdbc:jtds:sqlserver://localhost:1433/vaza;tds=8.0;lastupdatecount=true</connection-url>

     Change localhost to reflect whatever you SQL server name.

     Change 1433 to reflect you SQL port configuration.

   - Change SQL admin name and password. On the default, I use 'sa' as admin name and 'sa' too as password.

       <user-name>sa</user-name>

       <password>sa</password>

       Change whatever you preferred when you install SQL server on the previous step.

 

2. - Edit \vaza\src\org\vaza\resources\users.properties, here the default:

     # org.jboss.security.auth.spi.UsersRolesLoginModule username to password mapping

     admin=password

     Change ‘password’ to whatever you need.

 

3. - Edit \vaza\conf\vazaconfig.xml.

     Change the admin password, it should be same as password you typed at step 2 above.

     Also other parameter if you want.

 

4, - Edit \vaza\conf\jmxuser.properties

     The default is:

     #Thu Feb 24 17:26:09 ICT 2005

     admin=password

     Change the 'password', it should be same as password you typed at step 2 above.

 

5. - Edit \vaza\jndi.properties

     This needed by smtp and pop3 server to locate jboss server.

     The default is:

            java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory

            java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

            java.naming.provider.url=localhost

      Change value localhost at the last line to point to your Jboss server name (see diagram).

      

6. - Install jdk1.5

     Edit vaza\setenv.cmd

     The default is SET JAVA_HOME=F:\java\jdk1.5.0, Change it to mach your Jdk installation setting.

     Run setenv.cmd

     At command prompt type: 

       ant make.all

     if it successful you will get vazaMbean.jar, vazaPOP3.jar, vazaSMPT.jar and vazaSMTP.ejb

     at directory vaza\dist\lib. Now, you’ve done compiling Vaza-Mail.

 

7. - Install Jboss server.

     Extract jboss package to your local drive. Extract it on all servers because it need it for

     compiling java files.

     you need to copy JDBC driver to jboss directory. Because I use MS SQL 2000 for database,

     we need to install MS SQL JDBC driver. I have been playing around with several JDBC drivers

     such as DataDirect and JDBC from Microsoft. All of them work fine. But, JTDS driver is

     free. So, I included that driver, you don't need to download it separately. More information

     of jtds go to: http://jtds.sourceforge.net/. If you want other JDBC driver , please let me know.

     Most of JDBC driver comes with *.jar (driver itself) and .xml configuration. You need to edit .xml

     config before deploy it. see step 1.

     Next, copy vaza\conf\jtds-ds.xml which you edit on step 1 to [jboss3.2.7-install-dir]\server\default\deploy

     Where is [jboss3.2.7-install-dir] is your jboss installation directory

     Copy vaza\dist\jtds-1.0.2.jar to [jboss3.2.7-install-dir]\server\default\lib

     Where is [jboss3.2.7-install-dir] is your jboss instalaltion directory

     Copy vaza\dist\lib\vazaSMTPejb.jar to [jboss3.2.7-install-dir]\server\default\deploy

     Where is [jboss3.2.7-install-dir] is your jboss installation directory

 

Running Vaza-Mail:

1. - To start jboss server:

     Go to jboss installation directory.

     Go to [jboss3.2.7-install-dir]\bin

     At command prompt type:

       Type: run -c default

     (if got error, try to set your CLASSPATH for jboss. You can use vaza\setenv.cmd to set your jboss CLASSPATH)

 

2. - To start Vaza-Mail:

     Goto vaza\ directory

     Type: setenv.cmd

     Type: ant run.vaza    

3. - To add user to mail server:

     Add user by run vaza\cmdadmin.cmd (type help for more instruction)

 

If you run to any problem, feel free to drop me an email at agam1@yahoo.com