§2024-09-28
odroid-N2+, with Ubuntu Jammy was inatlled with wildduck mail server and Jitsi Video cofference server.
- Installations:
- WildDuck Installer script
- systemd servce file
- wildduck-webmail.service - wildduck.service
- zone-mta.service
- haraka.service
- configs:
- WildDuck: /etc/wildduck
- ZoneMTA: /etc/zone-mta
- WildDuck Webmail: /etc/wildduck/wildduck-webmail.toml
- Haraka: /opt/haraka/config
- systemd servce file
- Jitsi Meet : Install, jitsi-videobridge2.service
- nginx will be installed
- WildDuck Installer script
WildDuck Mail is a modern open-source email server platform that can be scaled to handle millions of users. It is designed to be highly performant and uses multiple components, such as Nginx, Redis, Haraka, ZoneMTA, and others, to achieve its goal of providing fast, reliable email services. Here’s an explanation of how these components work together:
- Nginx (Web Proxy/Reverse Proxy)
Role: Nginx acts as the reverse proxy server for the web interfaces of WildDuck Mail. Functionality: It helps distribute web traffic, serves as a gateway between the users and the backend services, and can handle SSL termination (HTTPS encryption). It manages requests for the WildDuck Mail API, typically hosted on Node.js or another web framework. Communication: Nginx forwards incoming HTTP/HTTPS requests to the appropriate backend service (e.g., the WildDuck web API).
-
Redis (Caching/Session Store) Role: Redis serves as an in-memory data store and is primarily used for caching and session management. Functionality: WildDuck Mail uses Redis to store temporary data like session tokens, rate limiting, and caching common queries. This enables faster access to frequently requested data and reduces the load on the database. Communication: The backend services (WildDuck API, ZoneMTA, etc.) interact with Redis to store and retrieve cached data, session tokens, and other ephemeral information.
-
Haraka (SMTP Server for Inbound Email) Role: Haraka is a Node.js-based SMTP server used for receiving incoming emails. Functionality: It processes incoming email (SMTP traffic) and applies spam filtering, validation, and other email handling rules. Haraka can perform tasks like anti-spam checks (SPF, DKIM, DMARC) and forwards legitimate email to the appropriate backend services for delivery or storage. Communication: Once Haraka processes an inbound email, it hands it off to the WildDuck Mail service, where the email can be stored and made available to the user.
-
ZoneMTA (Outbound Email Handling) Role: ZoneMTA is used for managing outgoing emails and acts as a high-performance Message Transfer Agent (MTA). Functionality: It handles the sending of outbound emails, load balancing the process of email delivery to other mail servers (e.g., Gmail, Yahoo). ZoneMTA can manage email queueing, retries for failed deliveries, and more. Communication: WildDuck sends outgoing emails to ZoneMTA, which takes care of the routing, queuing, and delivery of the emails to external mail servers.
-
WildDuck Mail Core (IMAP/Storage API) Role: WildDuck itself is the core mail storage engine and API provider, which handles the storage of emails and provides access to them via IMAP. Functionality: It stores all user emails in a MongoDB database. The web or mobile client communicates with the WildDuck API to fetch and send emails, while IMAP access allows third-party email clients to access stored mail. Communication: WildDuck interacts with the MongoDB database to store and retrieve emails. It also communicates with Haraka for receiving inbound emails and ZoneMTA for outbound email delivery.
-
Workflow: How They Work Together
-
Incoming Email:
- Emails sent to users' WildDuck email addresses are first received by Haraka, which performs basic checks (spam filtering, etc.).
- After validation, the email is passed to the WildDuck Mail Core, which stores the email in MongoDB for later retrieval by the user.
-
Outgoing Email:
- When a user sends an email, the request goes through the WildDuck API.
- The API hands the email to ZoneMTA, which manages the delivery process and sends the email to the destination mail server.
-
User Interaction:
- Users access their emails via the IMAP protocol provided by the WildDuck Mail Core, or through a web interface served by Nginx.
Nginx forwards requests to the WildDuck web API for login, reading, and managing emails.
Redis is used to store session data, helping with login sessions and caching commonly accessed data.
- Summary of Key Functions:
- Nginx: Acts as a reverse proxy and load balancer.
- Redis: Provides caching and session storage.
- Haraka: Handles inbound emails via SMTP.
- ZoneMTA: Manages outbound email sending and delivery.
- WildDuck Core: Provides email storage, IMAP access, and the API for interacting with user emails.
Together, these components form a high-performance, scalable email infrastructure.