Skip to content

Commit

Permalink
Upgrade version mailrelay 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dogukancagatay committed Nov 18, 2022
1 parent 4752cd5 commit 47fab53
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine:3.16 as builder

ARG DOWNLOAD_URL=https://downloads.sourceforge.net/project/emailrelay/emailrelay/2.3/emailrelay-2.3-src.tar.gz
ARG DOWNLOAD_URL=https://downloads.sourceforge.net/project/emailrelay/emailrelay/2.4/emailrelay-2.4-src.tar.gz

RUN apk add --no-cache curl g++ make autoconf automake openssl-dev \
&& mkdir -p /tmp/build && cd /tmp/build \
Expand Down
45 changes: 30 additions & 15 deletions README.md
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" \
Expand All @@ -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.

0 comments on commit 47fab53

Please sign in to comment.