0. Is there a jump start for newbies, even with mail?
1. What additional items (besides the main BEJY package) do I need to use BEJY?
2. What configuration files need to be modified to use BEJY ?
3. How do I run BEJY under Win2K ?
4. How do I stop BEJY under Win2K ?
5. Once I have developed my web site where should it be put for proper serving ?
6. May I use both POP3 and IMAP mail services ?
7. What is the difference between IMAP/SMTP and POP3/SMTP servers ?
8. How do I block open-relay so that my mail server is not used by spammers?
9. Does BEJY have a FTP server capability ?
10. May BEJY be used for more than one domain name ?
11. Is there a utility to modify the "bejy.xml" file for me ?
12. Can you tell me how to set up the DNS entry to decode the "somedomain.com" to point to my IP ?
13. What items do I need to run the mail server components ?
14. Can you explain what you mean by "context" ?
15. How do I set the SQL database up for the mail server ?
16. How do I add / delete e-mail accounts on the mail server ?
17. Is a Web Mail feature built into BEJY ?
1. What additional items (besides the main BEJY package) do I need to use BEJY ?
Purpose | required | from |
---|---|---|
minimal HTTP server | Java Runtime Engine (JRE) | http://java.sun.com/j2se |
+ JSP | Java SDK (JDK) | http://java.sun.com/j2se |
+ PHP | PHP binary | http://www.php.net |
+ Perl | Perl environment | For Windows (TM of Microsoft): http://www.activestate.com |
+ Tcl | Tcl environment | For Windows (TM of Microsoft): http://www.activestate.com |
+ HTTPS | valid certificate + key pair | e.g. from VeriSign http://www.verisign.com |
Mail server POP3/IMAP/SMTP | database + JDBC driver | depends on used database: |
2. What configuration files need to be modified to use BEJY ?
The most important one to modify is the "bejy.xml" file. The "bejy.cmd" file also must be verified for proper paths to the Java runtime (virtual machine).
3. How do I run BEJY under Win2K ?
Execute the bejy.cmd file. For loading on boot place it in the Startup folder of the Start menu. Or, alternatively run it as a service: There are also public tools to run any program as service: e.g. http://www.codeproject.com/system/xyntservice.asp
4. How do I stop BEJY under Win2K ?
Close the DOS window or terminate the task using the task manager.
5. Once I have developed my web site where should it be put for proper serving ?
That depends upon what you specify in the "bejy.xml" file. Typically it is in the "htdocs" subdirectory of the BEJY subdirectory.
6. May I use both POP3 and IMAP mail services ?
Yes. Both can be run simultaneous. You can also run each without SSL and with SSL on different ports simultaneaus. It also safe to use the same mail account from as many clients as you like at the same time.
7. What is the difference between IMAP/SMTP and POP3/SMTP servers ?
The IMAP protocol enables lot more capabilities, to handle your mail. Most important features are:
8. How do I block open-relay so that my mail server is not used by spammers?
This feature is built in! BEJY allows only sending to foreign recipients, if:
9. Does BEJY have a FTP server capability ?
No, currently it does not support FTP services. However, you may write your own FTP protocol implementation. But I discourage the usage of FTP because of the security issues. Use ssh and scp instead! This is also not yet supported by BEJY.
If you insist on having the FTP server for your system there are Open Source FTP servers available for download at: http://sourceforge.net/softwaremap/trove_list.php
Specifically an open source Java FTP server is available at: http://sourceforge.net/projects/jqftp
10. May BEJY be used for more than one domain name ?
Yes. The XML file must be properly modified for the particular "host".
11. Is there a utility to modify the "bejy.xml" file for me ?
Yes. There is a simple admin page. Run the example configuration and open http://localhost:8081/admin
12. Can you tell me how to set up the DNS entry to decode the "somedomain.com" to point to my IP ?
Sorry, that is beyond the scope of this FAQ. However you may find FAQs about this at http://www.zoneedit.com
If you are interested in hosting your own DNS server try the following: http://bind8nt.meiway.com
13. What items do I need to run the mail server components ?
You need to have a SQL database server installed to handle the mail database. Also a JDBC (Java Database Connectivity) driver on the classpath so that BEJY may find it. The JDBC driver provides a standard interface (API) that BEJY uses to access the mail database. For Windows systems the CLASSPATH environment variable must point to the JDBC driver. An open source SQL database, MySQL, and a JDBC driver for the MySQL database is available here: http://www.mysql.com/downloads
14. Can you explain what you mean by "context" ?
When you run a web server, there often are more than one application running on it. This is true for different hosts, but it is also true for different subdirectories of one host. One of those subdirectories, with all its sub-content, is called a context. One web application requires PHP, another requires JSP: At context level you decide, what is usable and visible for that context. Same for users. You define groups and use them for a complete context.
Also important to know is, that servlet and JSP sessions are context local. It provides you additional security to separate applications in separate contexts.
Usually you decide to use only one technology within one web application, so usually you don't specify all of those handlers at once, but you may do it. I recommend, to separate the applications in different directories and also use different contexts.
15. How do I set the SQL database up for the mail server ?
First modify the "bejy.xml" file to point to a mail database. Change the "mailDbi" to point to one of the BEJY supplied interfaces, the "jdbcUrl" to point to the database server URL typically this is something like
"jdbc:mysql://localhost/mail?(master user name)&password=(your master password)"Here the URL uses localhost since the database runs on the same server hardware unit as BEJY is deployed on, with the subdirectory of "mail" under this context using the master user that was set up as part of the MySQL setup.
The "nameServer" config variable must point to a DNS name server. If you are running the BEJY web/mail server behind a router this would be the routers IP address if it also provides a DNS cache; if not then typically this would be the DNS address your ISP gave you to configure your service.
Also execute the SQL scripts provided for creating the tables within the mail database by entering the SQL shell and executing them.
16. How do I add / delete e-mail accounts on the mail server ?
The owner of the domain (which still must be added to the database manually) can add/modify/remove mail accounts by using the supplied mail.jsp.
17. Is a Web Mail feature built into BEJY ?
No, but a Java Script open source web mail is available for download at:
http://jwebmail.sourceforge.net Other CGI web mail packages are also available through SourceForge.
My current favorite is SquirrelMail. Here is also the snippet of my bejy.xml:
<context path="/prj/sqmail/squirrelmail-1.4.0" urlPath="/sqmail/"> <handler class="de.bb.bejy.http.CgiHandler" command="/php-4.3.0-Win32/php.exe" mask="/index.php" timeout="180000"/> <handler class="de.bb.bejy.http.CgiHandler" command="/php-4.3.0-Win32/php.exe" mask="/src/*.php" timeout="180000"/> <handler class="de.bb.bejy.http.CgiHandler" command="/php-4.3.0-Win32/php.exe" mask="/plugins/calendar/*.php" timeout="180000"/> <handler class="de.bb.bejy.http.FileHandler" mask="/images/*"/> <handler class="de.bb.bejy.http.WelcomeHandler" default="index.php" mask="*"/> </context>This configuration restricts the access to distincts folders and files for safety.
0. Is there a jump start for newbies, even with mail?
Here it is:
1. Install BEJY from ZIP archive. 2. Edit bejy (unix) or bejy.cmd (windows) and modify the paths to java executables. 3. Edit bejy.xml and modify the paths to javac executables 4. Start BEJY with the supplied configuration. 5. Verify the http server and request http://localhost (or use your servername). Now setup the mail part: (here mysql) 6. Login into the database as system user mysql -u root -p 7. Create a mail database: sqlprompt> create database mail; 8. Create a login for the mail server on your SQL server: sqlprompt> grant usage on mail.* to bejy@bejyhost; 9. Grant access to the new created user: sqlprompt> grant all on mail.* to bejy@bejyhost identified by 'secret'; 10.Update internal stuff: sqlprompt> flush privileges; 11.Login into database as bejy (using the 'secret' as password). mysql -u bejy -p 12.Execute the commands and then the provided create script, to create all needed tables: create database mail; use mail; use the file 'create_mysql.sql' from folder sqlscripts (e.g. copy and paste to cmd line) 13. Edit bejy (unix) or bejy.cmd (windows) and modify the classpath: ensure that the JDBC driver archive is in classpath. 14. Start BEJY and tse the admin page and enter the correct settings: DNS: nameServer="212.123.96.100" Mail: mailDbi="de.bb.bejy.mail.MySQLDbi" jdbcUrl="jdbc:mysql://localhost/mail?user=bejy&password=secret" path="mail" mainDomain="mydomain" jdbcDriver org.gjt.mm.mysql.Driver (or similar) Global: javac="c:\jdk13\bin\javac.exe -g" // ADD FIRST USERS AND DOMAINS TO MAIL SERVER: 15. Login into database as bejy (using the 'secret' as password). mysql -u bejy -p 16. Create first domains and assign this user as owner. INSERT INTO domain (domain, owner) VALUES ('mydomain.com', 1); The value 1 is the id of 'admin' in table mail_user (we create it with next step). To assign somebody else as owner, just use his mail_user.id. 17. Create a first mail_user: INSERT INTO mail_user (name, domain, passwd) VALUES ('admin', 'mydomain.com', PASSWORD('verysecret')); 18. Restart BEJY. 19. Verify the http server and request http://localhost (or use your servername). 20. Verify your mail installation clickin on "mail admin example". 21. Use this page to add mail users. A comfortable configuration of domains does not yet exist, you have to do it in the database yet. Users can be added with the provided mail.jsp page. 22. Setup a mail client and send / receive mails.