How To Connect Localhost Apache James With Thunderbird

Apache James is a popular open source mail server. It support both SMTP, POP3 and IMAP protocol. This article will tell you how to install Apache James both on Windows and Linux, how to create user account on it and how to use 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 latest Apache James version from 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 run 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 start both SMTP and POP3 mail server, SMTP is used to send email out while POP3 is used to receive income email.
  2. The default SMTP server port number is 25, and default POP3 server port number is 110.
  3. But you can change the default SMTP and POP3 port number by edit conf/smtpserver.xml and conf/pop3server.xml file. The conf folder is located in 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 smtpserver.xml file in a file editor and edit below code to change the default smtp port number.
       <smtpserver enabled="true">
  5. Open pop3server.xml file and edit below code to change default pop3 port number.
       <pop3server enabled="true">
  6. Now restart 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 local directory.
  2. Unzip the zip file to a local folder. You can use command like $ unzip ./ or use GUI tool.
  3. Also make sure you have JDK 8 installed in your Ubuntu.
  4. Make sure 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 one how to change SMTP, POP3 server port number in Windows.

3. Add Email Domain And User In Apache James.

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

  1. Open dos window in Windows or open a terminal in Ubuntu Linux.
  2. Then goto Apache James bin folder and run james-cli command in 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 below command twice to add two email user [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, add below ip domain mappings. Then Thunderbird will know that both domain and will be resolved to ip Please refer article How To Edit Hosts File In Windows 10.

    add smtp and pop3 mail server domain ip mappings in hosts file

  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 Continue button, then click Manual Config button to open below dialog. By default Thunderbird will search for the email domain in it’s online database automatically, but their database only contains world wide popular and real email domain and our domain do not exist in their database, so we should config the SMTP and POP3 server data manually.
  6. For 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 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 Re-test button to check whether the configuration is correct or not.
    configure smtp and pop3 mail server manually in thunderbird
  10. Click Done button in above picture then it goes to domain not use encryption security warning dialog, check the checkbox and click Done button to finish the settings. thunderbird add email account domain not use encryption warning dialog
  11. Add another email user info in Thunderbird like above.
  12. Now you can select one email user and click 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 Get Messages button to receive emails sent to him.
    use thunderbird to send receieve email between two apache james email user
0 0 votes
Article Rating
Notify of

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

1 Comment
Oldest Most Voted
Inline Feedbacks
View all comments

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

Would love your thoughts, please comment.x