Fix #1027 - Support templating mail#1028
Conversation
|
✅ All required contributors have signed the F5 CLA for this PR. Thank you! |
|
I have hereby read the F5 CLA and agree to its terms |
43bd71b to
b1ee25a
Compare
Added functions to keep it DRY
b1ee25a to
238c0ab
Compare
|
Thank you for your contribution! It does make sense to have it templated. I've started work to add stream templates to the tests to make sure those work as intended: https://github.com/thresheek/docker-nginx/commits/tests-templates/ It would make sense to test the mail template functionality as well. CI issues seem to be unrelated, opened #1029 to fix those. |
|
@thresheek Hey, sorry for sending this PR a bit early, I did some work on it in October last year, and lost track of progress. Since this is a dependency for another PR and forgetting it wasn't finished I created this pull request, later realized it was still missing tests (and some renaming variables were not yet committed, and almost got lost in the rebase). A simple test would be: # smtp.conf.mail-template
server_name server-name;
auth_http http://127.0.0.1:9000/;
server {
listen 25;
protocol smtp;
}Optional auth handler: # smtp_auth_http.conf.template
server {
listen 127.0.0.1:9000;
location / {
default_type text/plain;
add_header Auth-Status "Login not supported since this is a dummy nginx smtp handler";
add_header Auth-Error-Code "550 5.3.5";
return 200;
}
}A test could be: $ echo "QUIT\r\n" | nc 127.0.0.1 25which should results in: |
I have hereby read the F5 CLA and agree to its terms.
Proposed changes
Added functions to keep it DRY
Checklist
./update.shand ensured all entrypoint/Dockerfile template changes have been applied to the relevant image entrypoint scripts & DockerfilesREADME.mdand/ormodules/README.md)