fetchmailmgr
is a bridge between fetchmail
and docker-mailserver
. It fetches emails from external mail providers and delivers them to
the docker-mailserver
. The configuration is managed by mailserver-admin
, the management interface for docker-mailserver
.
REDIS_URL
: The URL of the Redis server. Default isredis://localhost:6379
.TEMP_DIR
: The directory used for temporary files. Default is/run/fetchmailmgr
.MTA_HOST
: The hostname of the Mail Transfer Agent (MTA). Default ismta
.FETCHMAIL_PATH
: The path to thefetchmail
executable. Default is/usr/bin/fetchmail
.
-d, --debug
: Output extra debugging information.-i, --interval <interval>
: Interval in seconds to run fetchmail. Default is60
.-s, --server <server>
: Host to listen for health check requests. Default is0.0.0.0
.-p, --port <port>
: Port to listen for health check requests. Default is3000
.
fetchmailmgr
is a bridge between fetchmail
and docker-mailserver
. It fetches emails from external mail providers and delivers them to the docker-mailserver
. The configuration is managed by mailserver-admin
, the management interface for docker-mailserver
.
-
Configuration: The configuration details for email accounts are stored in Redis under the key
fetchmail_accounts
. These details are read and used to manage the fetching of emails. -
Account Object: The
account
object represents the configuration details for an email account. It includes various properties that define how to connect to the email server and how to handle the emails. -
Fetching Emails: The
fetchmailmgr
uses thefetchmail
executable to fetch emails from the configured email accounts. It constructs the necessary configuration files and executesfetchmail
with the appropriate arguments.
The account
object has the following properties:
id
: A unique identifier for the account.host
: The hostname of the email server.protocol
: The protocol used to connect to the email server (e.g.,IMAP
,POP3
).port
: The port number to connect to the email server.username
: The username for the email account.password
: The password for the email account.ssl
: A boolean indicating whether to use SSL or implicit TLS for the connection.verifySsl
: A boolean indicating whether to verify the SSL certificate.user
: The local user to deliver the emails to.
[
{
"id": 1,
"host": "mail.example.com",
"protocol": "IMAP",
"port": 993,
"username": "[email protected]",
"password": "password123",
"ssl": true,
"verifySsl": true,
"user": "localuser"
}
]
To add a prefilled fetchmail_accounts
key to Redis using docker compose
, follow these steps:
Start the services:
docker-compose up
Prefill the fetchmail_accounts key in Redis:
docker-compose exec redis redis-cli \
SET fetchmail_accounts '[{"id":1,"host":"mail.example.com","protocol":"IMAP","port":993,"username":"[email protected]","password":"password123","ssl":true,"verifySsl":true,"user":"localuser"}]'
These commands will start the services and set the fetchmail_accounts
key in Redis with the specified data.
This will put fetchmailmgr in a state where it will fetch emails from the specified email account.