vSMTP is based on the micro-service architecture. Each service uses the Advanced Message Queuing Protocol (AMQP) to share data with the system, and uses RabbitMQ as a message broker and queue manager.
A simple vSMTP configuration would look like the following.
The SMTP Receiver service is the SMTP entrypoint of you vSMTP infrastructure, it simply received emails from external sources. The entire SMTP exchange is processed in this service, and at each SMTP command you can apply filters using the Rhai scripting language.
The Working service is an intermediary service that is used to offload jobs from the SMTP Receiver service that consume a lot of resources. Let's say, for example, email analyzis for viruses, delegation to a third-party service, or email modifications.
Lastly, the Delivery service sends the email to the desired target, depending on the delivery method configured. (forwarding, maildir, mbox, etc.)
There are many other services available, like the Logger service. They are not necessary for this introduction, so we will skip them for now.