Skip to content

Commit

Permalink
Fix some README grammar and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
wader committed Feb 13, 2016
1 parent 4df8b36 commit 44e5167
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# postfix-relay
Postfix SMTP relay docker image. Useful when wanting to sending email without using an external SMTP server.
Postfix SMTP relay docker image. Useful for sending email without using an
external SMTP server.

## Usage
`docker pull mwader/postfix-relay` or clone and build it yourself. Default postfix is configured to be an open SMTP relay that rely on docker links for firewalling so be careful to not expose it publicly.
`docker pull mwader/postfix-relay` or clone and build it yourself. Default
postfix is configured to be an open relay that rely on docker networking
for firewalling. So be careful not to expose it publicly.

All postfix configuration options can be set using POSTFIX_* environment variables. See [Dockerfile](Dockerfile) for default configuration. It will work without making any changes but you might want to change `POSTFIX_myhostname`, the FQDN used by 220/HELO.
All postfix configuration options can be set using POSTFIX_<name> environment
variables. See [Dockerfile](Dockerfile) for default configuration. It will
work without making any changes but you might want to set
`POSTFIX_myhostname`, the FQDN used by 220/HELO.

#### Using docker run
#### Using docker run
```
docker run \
-e POSTFIX_myhostname=smtp.domain.tld \
Expand All @@ -16,12 +22,11 @@ docker run \
Now run some other container with a link to `smtp` and use it as SMTP server.

#### Using docker-compose

```
app:
links:
- smtp
# some app container config where host "smtp" is used as SMTP server
# use hostname "smtp" as SMTP server
smtp:
image: mwader/postfix-relay
Expand All @@ -31,15 +36,21 @@ smtp:
```

## SPF

When sending using your own SMTP server it is probably a very good idea to setup [SPF](https://en.wikipedia.org/wiki/Sender_Policy_Framework) for the domain your sending mail from.
When sending email using your own SMTP server it is probably a very good idea
to setup [SPF](https://en.wikipedia.org/wiki/Sender_Policy_Framework) for the
domain your sending mail from.

## DKIM
To enable [DKIM](https://en.wikipedia.org/wiki/DomainKeys_Identified_Mail)
specifying a white space separated list of domains using `OPENDKIM_DOMAINS`.
At container start new key pairs for each domain will be generated if not found
in `/etc/opendkim/keys/<domain>"`. To persist the keys make sure to add a host
directory volume for `/etc/opendkim/keys`. If your using docker-compose it will
automatically take care of moving data volumes between container recreates.

To enable [DKIM](https://en.wikipedia.org/wiki/DomainKeys_Identified_Mail) specifying a white space separated list of domains using `OPENDKIM_DOMAINS`. At conatiner start new key pairs for each domain will be generated if not found in `/etc/opendkim/keys/<domain>"`. To persist the keys make sure to add a host directory volume for `/etc/opendkim/keys`. If your using docker-compose it will automatically take care of moving data volumes between container recreates.

DNS records to configure can be found in the container log or by running `docker exec -ti <container> sh -c "cat /etc/opendkim/keys/*/mail.txt"`.
DNS records to configure can be found in the container log or by running
`docker exec -ti <container> sh -c "cat /etc/opendkim/keys/*/mail.txt"`.

## License

postfix-relay is licensed under the MIT license. See [LICENSE](LICENSE) for the full license text.
postfix-relay is licensed under the MIT license. See [LICENSE](LICENSE) for the
full license text.

0 comments on commit 44e5167

Please sign in to comment.