How To Connect Localhost Apache James With Thunderbird

Apache James is a popular open-source mail server. It supports both SMTP, POP3, and IMAP protocols. This article will tell you how to install Apache James both on Windows and Linux, how to create a user account on it, and how to use the free email client tool Thunderbird to connect to it to send and receive emails.

1. Install And Run Apache James On Windows.

1.1 Install Apache James On Windows.

  1. Download the latest Apache James version from the official website. I use Apache James 3.2.0. The zip file name is
  2. Unzip the download file to a local folder.
  3. Open a dos window and cd into bin folder under above folder for example C:\WorkSpace\Tool\james-server-app-3.2.0-app\james-server-app-3.2.0\bin.
  4. Before running the Apache James mail server, make sure you have JDK 8 installed.
  5. Execute run.bat in the dos window then Apache James server started.

1.2 Change SMTP And POP3 Port Number.

  1. When Apache James started, it starts both SMTP and POP3 mail servers, SMTP is used to send emails out while POP3 is used to receive income emails.
  2. The default SMTP server port number is 25, and the default POP3 server port number is 110.
  3. But you can change the default SMTP and POP3 port number by edit the file conf/smtpserver.xml and conf/pop3server.xml. The conf folder is located in the Apache James root folder. For example C:\WorkSpace\Tool\james-server-app-3.2.0-app\james-server-app-3.2.0\conf.
  4. Open the smtpserver.xml file in a file editor and edit the below code to change the default SMTP port number.
       <smtpserver enabled="true">
  5. Open the pop3server.xml file and edit the below code to change the default pop3 port number.
       <pop3server enabled="true">
  6. Now restart the Apache James server again, it will use the new SMTP and POP3 port number.

2. Install And Run Apache James On Ubuntu Linux.

2.1 Install Apache James On Ubuntu Linux.

  1. Download Apache James 3.2.0 zip file ( ) to a local directory.
  2. Unzip the zip file to a local folder. You can use the command like $ unzip ./ or use the GUI tool.
  3. Also, make sure you have JDK 8 installed in your Ubuntu.
  4. Make sure the libc6 package has been installed in Ubuntu also. You can see the install requirements at
  5. Now cd into the bin folder under James root folder ( /home/jerry/tool/james-server-app-3.2.0/bin ), run $ sudo ./ to start Apache James mail server.

2.2 Change SMTP And POP3 Port Number.

  1. Please refer to section 1.2 on how to change SMTP, POP3 server port numbers in Windows.

3. Add Email Domain And User In Apache James.

Now we have installed and started the Apache James mail server on both Windows and Linux, we need to add an email domain and email user account in it to make a test.

  1. Open the dos window in Windows or open a terminal in Ubuntu Linux.
  2. Then go to the Apache James bin folder and run the command james-cli in the bin folder to add an email domain.

    C:\WorkSpace\Tool\james-server-app-3.2.0-app\james-server-app-3.2.0\bin>james-cli.bat adddomain


    /bin$sudo ./ adddomain
  3. Run james-cli again to add email user. Run the below command twice to add two email users [email protected] and [email protected]

    bin>james-cli.bat adduser [email protected] admin


    /bin$sudo ./ adduser [email protected] admin

4. Use Thunderbird To Connect Apache James Mail Server On Localhost.

Now download and install Thunderbird which is an email client tool to test our Apache James server installation. We just demo how to use it in Windows.

  1. Download and install Thunderbird client.
  2. Edit hosts file in Windows ( Please refer to the article How To Edit Hosts File In Windows 10 ) to add below IP domain mappings. Then Thunderbird will know that both domain and will be resolved to IP address
  3. Start Thunderbird for the first time, then click Email in Accounts —> Set up an account section.
  4. Input Your name: admin, Email address: [email protected], Password: admin, in the popup dialog.
  5. Click the Continue button, then click the Manual Config button to open the below dialog. By default, Thunderbird will search for the email domain in it’s online database automatically, but their database only contains worldwide popular and real email domains and our domain does not exist in their database, so we should config the SMTP and POP3 server data manually.
  6. For the Incoming settings select POP3 and the server hostname should be ( the email domain we added before ) and the default port number is 110, select None for SSL and  Normal password for Authentication drop-down list.
  7. For the Outgoing row, the server hostname is also, the default port number is 25, select None for SSL and Normal password for Authentication.
  8. Input both incoming and outgoing user name with [email protected].
  9. Click the Re-test button to check whether the configuration is correct or not.
  10. Click the Done button in the above picture then it goes to the domain not use encryption security warning dialog, check the I understand the risks. checkbox and click the Done button to finish the settings.
  11. Add another email user info in Thunderbird like above.
  12. Now you can select one email user account on the Thunderbird left inbox list panel and click the Write button to create a message in Thunderbird and send the message from [email protected] to [email protected] to verify the Apache James server installation. Select an email user and click the Get Messages button to receive emails sent to him.

1 thought on “How To Connect Localhost Apache James With Thunderbird”

  1. i have an issue in thunderbird local mail
    i have created a mail id with pop server and want to get the sent mail into my mail inbox
    but i am unable to fetch those sent mails

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.