Development Guidelines
This implementation does not substitute the previous POP3, SMT, and IMAP integration for other e-mail services. It can also be parametrized for being utilized simultaneously with those integrations.
The following steps must be accomplished in their presented order:
Inside Microsoft Azure:
- Create or choose an e-mail to be utilized by the system in these integrations; It is not necessary to be a specific e-mail account. However, the user must be aware that the e-mail readout and dispatch can modify and pollute the mail inbox; so the user must create rules and folders for messages clearing and organization, so the work of one does not interfere with another.
- Create or choose an application from this e-mail account, in Azure Active Directory. It will be used for e-mail readout and dispatch.
- Set the following permissions:
- Set the application access to the email account that will be used:
- Allow the public-client flow for the application:
- APP ID: Save this ID for future configuration.
- Folders for e-mail readout: If the user wishes to define filtering folders and rules for the mail inbox readout, they must be created at this point. In the first Graph Mail Project version, the sweep for identifying the folders is only realized as it launches.
ActiveMQ user
Set a user to have access to the ActiveMQ queues by executing the following command and parametrizing a secure password for the option "-p", according to your environment:
sh add-user.sh -a -u jmsuser -p 1 -g guest
ActiveMQ queues
The e-mail readout and dispatch queues must be set in the WildFly configuration file, the standalone.xml file, for example. Add the tags with the names of the queues inside the main tag: <subsystem xmlns="urn:jboss:domain:messaging-activemq:3.0">
Example:
System Properties
For the Service Management project to upload the listeners, who will listen to the e-mail readout queues, it is necessary to set the following property:
In the tag <system-properties> of standalone.xml it is possible to name a queue multiple times to be heard, only by separating with a coma.
Folder for sharing images and file attachments
A folder must be created and the writing and readout permissions must be set on the application server, for the volume mapping of the docker containers, which will upload the applications. Thus it will allow the sharing of files between them. This folder will be used for the compose files and in parameter 479.
The correct file localization in the docker-compose.yml file from the Graph Mail Project must be set. Also, set the defined folders for image and attachment sharing.
The following properties must be set in the config.properties file of the Graph Mail Project, according to the client scenario:
The Graph Mail Project depends on the Service Management project, so it should only be executed when the Service Management one is running.
Functioning
- A Thread or Job:
- Obtains the e-mail messages occasionally and extracts the: sender, subject, body, and attachments from the parameterized list of folders;
- Registers messages received in a specific queue for registration of tickets in WildFly, containing the name of the folder, the queue, and the content of the email, including the list of attachments;
- Etches the attachments to a mapped folder on a volume that SM is able to access;
- Performs the "Email control procedure":
- Processing control: the system reads a predefined folder, allowing the user to create filtering rules, specific to the ticket registration. It can be an incident, problem, change or release ticket: what determines it is the automatic action registration;
- Destination of the processed message: the system marks the already processed message as read.
- Mailbox sharing:
- It can be used by the user and the system - if the folder for reading is implemented;
- It will also be used for sending e-mails.