How to create Mail Server using Apache James in Spring Boot?

1.1k Views Asked by At

Actually this topic is new for me. So Can someone give advice regarding this topic? Or right work path.

Have to create own mail server which handle testing mail request

e.g. username@<company_name>.com

Thanks in advance.

1

There are 1 best solutions below

0
On BEST ANSWER

**Notes :

  • You have to use static IP.
  • If you configure Database you just have to create empty database. Apache create relevant table by own.**
  • In some case if you configured domain & port properly then on process of manual configuration it taken values by their own no need to written down by your self.

Process :

  • Download Apache James latest version from given link:

http://james.apache.org/download.cgi

  • Unzip and put in root folder For windows,

c://program files/

  • Open command line as administrator. Move to following path, For windows,

C:\Program Files\james-server-app-x.x.x\conf

  • Optional : Default it came with Durby database. But it can support various other. For use your own DB,
    • Create one empty database.
    • Open database configuration from given path, For windows,

C:\Program Files\james-server-app-3.5.0\conf\james-database.properties

- Replace following lines,
// Fill with your personal database configuration
  database.driverClassName=<database_driver>
  database.url=<database_url>
  database.username=<username>
  database.password=<password>

  // It define in above comments
  vendorAdapter.database=<vendor_name>
  • Optional : As we know Apache James comes with default SMTP(25), POP3(110), IMAP port configuration. You can also change them according your need. For that you have to made change in following files.

imapserver.xml or pop3server.xml or smtpserver.xml

  • Install Apache James using given command (at bin folder)

james install

  • Start James using given command

james start

  • Add domain

james-cli.bat -h 127.0.0.1 -p 9999 AddDomain <domain_name>

  • Add Users

james-cli.bat -h 127.0.0.1 -p 9999 AddUser <user_name>
james-cli.bat -h 127.0.0.1 -p 9999 AddUser <user_name>

  • Now install thunderbird

  • Configure your mail id as like,

    Add name, email and password then click on continue

    enter image description here

  • Now click on configure manually and place relevant values.

    enter image description here

  • Click on done

  • Try to send mail one account to second & hopefully it'll work.

    Have a nice day...!!! :)