-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add authentication to smtp relay host #204
Conversation
Hi @Bonno |
I'm not sure how to create tests for an authentication flow. |
Update from head
Hi @tiberios1 |
Totally understand the lack of time issue. Any chance you can give me some detail as to what needs doing and I'll see if I can help out? |
Hi @tiberios1 https://github.com/jeboehm/docker-mailserver/blob/main/.github/workflows/integration-tests.yml describes, how tests are executed. In your case:
An instance of mailhog is started (defined in https://github.com/jeboehm/docker-mailserver/blob/main/docker-compose.test.yml) and used to fake an external relay host. Problem here: mailhog doesn't support SMTP authentication. I think mailpit is a good alternative for mailhog, as it supports smtp auth. I hope this helps! |
* origin/smtp-auth: (53 commits) smtp_use_tls is deprecated. New config is smtp_tls_security_level Change test to match mailpit api Add workflow_dispatch trigger to integration test Started working on test flow Add authentication to smtp relay host chore(deps): update dependency jeboehm/mailserver-admin to v2.1.23 chore(deps): update dependency jeboehm/mailserver-admin to v2.1.22 chore(deps): update dependency jeboehm/mailserver-admin to v2.1.21 chore(deps): update dependency jeboehm/mailserver-admin to v2.1.20 chore(deps): update dependency jeboehm/mailserver-admin to v2.1.19 chore(deps): update dependency jeboehm/mailserver-admin to v2.1.18 chore(deps): update dependency jeboehm/mailserver-admin to v2.1.17 chore(deps): update dependency jeboehm/mailserver-admin to v2.1.16 chore(deps): update dependency jeboehm/mailserver-admin to v2.1.15 chore(deps): update dependency jeboehm/mailserver-admin to v2.1.14 chore(deps): update dependency jeboehm/mailserver-admin to v2.1.13 chore(deps): update dependency jeboehm/mailserver-admin to v2.1.12 chore(deps): update actions/checkout action to v4 (main) (jeboehm#308) chore(deps): update dependency jeboehm/mailserver-admin to v2.1.11 fix: prevent admin from deleting migrations table (jeboehm#307) ...
Thanks to the breakdown from @jeboehm I was able to change a few bits and now we have a successful test scenario for this PR. |
Hi @Bonno Merged. |
I've added configuration to provide TLS SMTP authentication for relayhosts. This is necessary when using gmail as relayhost for your mailserver for example.
To make use of the TLS authentication you need to follow these steps:
Create a config file './config/mta/sasl_passwd' with the following contents:
[smtp.gmail.com]:587 username:password
Add the following volume to 'docker-compose.override.yml' for the 'mta' service:
./config/mta/sasl_passwd:/etc/postfix/sasl_passwd
Add the following lines to your '.env' file