services/mail/pod-mail-worker/README.md
Pod Mail Worker is a service that provides bidirectional synchronization between Huly messages and email servers.
This service acts as a bridge between Huly's internal messaging system and external email infrastructure, enabling:
/mta-hook)Key environment variables:
PORT: Service port (default: 4050)WORKSPACE_URL: Target Huly workspace URLACCOUNTS_URL: Huly accounts service URLKVS_URL: Key-value store URL for thread mappingQUEUE_CONFIG: Kafka queue configurationHOOK_TOKEN: Authentication token for MTA hooksIGNORED_ADDRESSES: Comma-separated list of email addresses to ignoreMAIL_SIZE_LIMIT: Maximum email size (default: 50mb)Receives incoming emails from mail transfer agents.
Headers:
x-hook-token: Authentication token (if configured)Body: MTA message format with envelope and message data
Response: Always returns 200 OK with { action: 'accept' } to prevent email bounces
# Install dependencies
rush update
# Build
rushx build
# Run tests
rushx test
# Start development server
rushx run-local
The service is designed to run as a containerized application with the following requirements: