Lightweight SMTP relay using Microsoft Graph API
550
ZapZap is a lightweight SMTP relay service that uses Microsoft Graph API to relay emails. It is designed to be easy to deploy using Docker and Docker Compose. The service listens on port 25 and forwards emails using the credentials and configuration provided via environment variables.
.env file.Before using ZapZap, you'll need to register an application in Microsoft 365 (Azure AD) to obtain the necessary credentials.
Go to Entra Portal:
Register a New Application:
ZapZap SMTP Relay).Record the Application (Client) ID and Directory (Tenant) ID:
.env file.Create a Client Secret:
Relay__ClientSecret.API Permissions:
Mail.Send permission.Assign User ID:
Relay__UserId has the necessary permissions to send emails via the Microsoft Graph API. This can typically be the email address of an account within your organization.To get started with ZapZap, you'll need to set up a .env file with the required environment variables and use Docker Compose to deploy the service.
.env FileCreate a .env file in the root of your project directory with the following variables:
Relay__ClientId=your-client-id
Relay__ClientSecret=your-client-secret
Relay__TenantId=your-tenant-id
Relay__UserId=your-user-id
Ensure your docker-compose.yml file is configured as follows:
services:
zapzap:
image: creobe/zapzap:latest
container_name: zapzap
ports:
- "25:25"
environment:
- Relay__ClientId=${Relay__ClientId}
- Relay__ClientSecret=${Relay__ClientSecret}
- Relay__TenantId=${Relay__TenantId}
- Relay__UserId=${Relay__UserId}
restart: unless-stopped
To start the service, run:
docker-compose up -d
This command will start the ZapZap service in the background, listening on port 25, and configured using the environment variables from your .env file.
The service is configured to automatically restart using Docker’s restart: unless-stopped policy. This ensures that the service remains running unless manually stopped.
ZapZap is provided under the MIT License.
Content type
Image
Digest
sha256:c70b9bccc…
Size
58.8 MB
Last updated
about 2 years ago
docker pull creobe/zapzap