<commit_before># OpenSMTPD mailer for Docker

## What?

This container can be used for your hobby project to add mail out functionality. It sets up [OpenSMTPD](http://www.opensmtpd.org) as a simple relay to the configured SMTP server, e.g. Gmail. It will send  **all** emails to the configured mail-to address.

### Details

 * Debian Jessie
 * arm build uses armv7/armhf-debian:jessie
 * x86_64 uses 
 * Must be configured to work! 
 * Ports 25 and 587 are exposed
 * Do **not** map the ports to outside world. The relay is configured to accept **ALL** requests without auth. Use internal Docker network

## Flow

                                        +-------------+                +-----------------+
                                            +-----------------+                 |             |                |                 |
                                                |                 |                 |  OpenSMTPd  |                |  external SMTP  |
                                                    | your container  | smtp request    |  Container  |                |  server, such   |
                                                        | that needs mail +----------------->             +--------------->+  as Gmail       |
                                                            | out             |  to smtp://smtpd+-------------+                |                 |
                                                                |                 |                 | name: smtpd |                |                 |
                                                                    +-----------------+                 +-------------+                +-----------------+

                                                                        +-------------------------------------------------+
                                                                            |                                                 |
                                                                                |                   Docker network                |
                                                                                    |                                                 |
                                                                                        +-------------------------------------------------+

## Configuration

Configuration is done with environment variables. Start the server with the `smtpd` command. The entrypoint script will do the rest 

### Variables

    SMTP_SERVER   # Mail server, such as smtp.gmail.com
    SMTP_USERNAME # Your SMTP username
    SMTP_PASSWORD # <PASSWORD>
    MAIL_TO       # The address all mails should be forwarded to

## Usage

You can use the docker-compose-example.yml file as a reference, but generally it can be run like this:<commit_msg>Fix skewed ASCII flow diagram<commit_after># OpenSMTPD mailer for Docker

## What?

This container can be used for your hobby project to add mail out functionality. It sets up [OpenSMTPD](http://www.opensmtpd.org) as a simple relay to the configured SMTP server, e.g. Gmail. It will send  **all** emails to the configured mail-to address.

### Details

 * Debian Jessie
 * arm build uses armv7/armhf-debian:jessie
 * x86_64 uses 
 * Must be configured to work! 
 * Ports 25 and 587 are exposed
 * Do **not** map the ports to outside world. The relay is configured to accept **ALL** requests without auth. Use internal Docker network

## Flow

                                        +-------------+                +-----------------+
    +-----------------+                 |             |                |                 |
    |                 |                 |  OpenSMTPd  |                |  external SMTP  |
    | your container  | smtp request    |  Container  |                |  server, such   |
    | that needs mail +----------------->             +--------------->+  as Gmail       |
    | out             |  to smtp://smtpd+-------------+                |                 |
    |                 |                 | name: smtpd |                |                 |
    +-----------------+                 +-------------+                +-----------------+
    +-------------------------------------------------+
    |                                                 |
    |                   Docker network                |
    |                                                 |
    +-------------------------------------------------+

## Configuration

Configuration is done with environment variables. Start the server with the `smtpd` command. The entrypoint script will do the rest 

### Variables

    SMTP_SERVER   # Mail server, such as smtp.gmail.com
    SMTP_USERNAME # Your SMTP username
    SMTP_PASSWORD # <PASSWORD>
    MAIL_TO       # The address all mails should be forwarded to

## Usage

You can use the docker-compose-example.yml file as a reference, but generally it can be run like this:
{'fraction_non_alphanumeric': 0.15115577889447235, 'fraction_numerical': 0.004020100502512563, 'mean_word_length': 0.7350069735006973, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 57, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7159706', 'n_tokens_mistral': 995, 'n_tokens_neox': 916, 'n_words': 345}