forked from drdaeman/docker-emailrelay
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4752cd5
commit 47fab53
Showing
2 changed files
with
31 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,45 @@ | ||
# Docker image for E-MailRelay | ||
|
||
![MicroBadger Size](https://img.shields.io/microbadger/image-size/dcagatay/emailrelay) | ||
![MicroBadger Layers](https://img.shields.io/microbadger/layers/dcagatay/emailrelay) | ||
![Docker Pulls](https://img.shields.io/docker/pulls/dcagatay/emailrelay) | ||
![Docker Stars](https://img.shields.io/docker/stars/dcagatay/emailrelay) | ||
|
||
Available Tags: | ||
|
||
- [latest](https://github.com/dogukancagatay/docker-emailrelay/blob/master/Dockerfile) | ||
- [2.4](https://github.com/dogukancagatay/docker-emailrelay/blob/2.4/Dockerfile) | ||
- [2.3](https://github.com/dogukancagatay/docker-emailrelay/blob/2.3/Dockerfile) | ||
- [2.2](https://github.com/dogukancagatay/docker-emailrelay/blob/2.2/Dockerfile) | ||
- [2.1](https://github.com/dogukancagatay/docker-emailrelay/blob/2.1/Dockerfile) | ||
- [2.0.1](https://github.com/dogukancagatay/docker-emailrelay/blob/2.0.1/Dockerfile) | ||
|
||
Alpine based Docker image for E-MailRelay. You can read capabilities, configuration etc. of E-MailRelay on its [website](http://emailrelay.sourceforge.net). | ||
|
||
Container configuration is done via *environment variables* and *command line arguments*. Command line arguments are given directly to ``emailrelay`` executable. | ||
Container configuration is done via _environment variables_ and _command line arguments_. Command line arguments are given directly to `emailrelay` executable. | ||
|
||
To see all command line options of ``emailrelay`` command: | ||
To see all command line options of `emailrelay` command: | ||
|
||
```bash | ||
docker run --rm dcagatay/emailrelay --help --verbose | ||
``` | ||
|
||
## Usage | ||
Some usage examples are given in ``docker-compose.yml``. | ||
|
||
Some usage examples are given in `docker-compose.yml`. | ||
|
||
#### Example Usage with for Gmail SMTP Service | ||
|
||
Sample configuration for sending emails from your Gmail account. | ||
|
||
Add your credentials to ``client-auth.txt``. | ||
Add your credentials to `client-auth.txt`. | ||
|
||
``` | ||
client plain [email protected] gmail-or-app-password | ||
``` | ||
|
||
Run the docker container | ||
|
||
```bash | ||
docker run --rm \ | ||
-p "25:25" \ | ||
|
@@ -43,37 +49,46 @@ dcagatay/emailrelay --forward-on-disconnect --forward-to smtp.gmail.com:587 --cl | |
|
||
## Environment Variables | ||
|
||
#### ``DEFAULT_OPTS`` | ||
By default the following arguments are given on runtime. You can overwrite ``DEFAULT_OPTS`` environment variable to change or disable this behaviour. | ||
#### `DEFAULT_OPTS` | ||
|
||
By default the following arguments are given on runtime. You can overwrite `DEFAULT_OPTS` environment variable to change or disable this behaviour. | ||
|
||
``` | ||
--no-daemon --no-syslog --log --log-time --remote-clients | ||
``` | ||
|
||
#### ``PORT`` | ||
The port that E-MailRelay runs on. Default value is ``25``. If you did TLS configuration you need to set this variable to ``587`` or something else. | ||
#### `PORT` | ||
|
||
#### ``SPOOL_DIR`` | ||
Spool directory for E-MailRelay. No need to change. Default value: ``/var/spool/emailrelay`` | ||
The port that E-MailRelay runs on. Default value is `25`. If you did TLS configuration you need to set this variable to `587` or something else. | ||
|
||
#### ``SWAKS_OPTS`` | ||
This variable is used to give options to _swaks_, it is used on built-in health-check functionality. If you serve with TLS configuration you need to set this variable to ``-tls``. Default value: _empty-string_ | ||
#### `SPOOL_DIR` | ||
|
||
Spool directory for E-MailRelay. No need to change. Default value: `/var/spool/emailrelay` | ||
|
||
#### `SWAKS_OPTS` | ||
|
||
This variable is used to give options to _swaks_, it is used on built-in health-check functionality. If you serve with TLS configuration you need to set this variable to `-tls`. Default value: _empty-string_ | ||
|
||
## Filter Scripts, Client/Server Authentication, and Others | ||
Inside ``config`` directory you will find sample files for usage with filter functionality, SMTP client authentication and relay server authentication. | ||
|
||
Inside `config` directory you will find sample files for usage with filter functionality, SMTP client authentication and relay server authentication. | ||
|
||
For any further configuration or details, refer to the [E-MailRelay documentation](http://emailrelay.sourceforge.net). | ||
|
||
## Testing | ||
|
||
You can test your configuration with _swaks_. | ||
|
||
```bash | ||
docker run --rm \ | ||
flowman/swaks \ | ||
echo "This is a test message." | swaks --to [email protected] --from [email protected] --server localhost --port 25 | ||
``` | ||
|
||
## Additions to ``drdaeman/docker-emailrelay`` | ||
## Additions to `drdaeman/docker-emailrelay` | ||
|
||
- E-MailRelay version upgrade. | ||
- Multi stage build for quicker builds. | ||
- ``bash`` shell in included for further scripting. | ||
- `bash` shell in included for further scripting. | ||
- Default TLS configuration is changed to insecure configuration. | ||
- Sample files for advanced configuration. |