Skip to content

FIX: escape symbols in cron command#1200

Merged
tomav merged 1 commit intodocker-mailserver:masterfrom
dimalo:feature/fix-postfix-dh-generation
Jul 29, 2019
Merged

FIX: escape symbols in cron command#1200
tomav merged 1 commit intodocker-mailserver:masterfrom
dimalo:feature/fix-postfix-dh-generation

Conversation

@dimalo
Copy link
Copy Markdown
Contributor

@dimalo dimalo commented Jul 28, 2019

Hi @tomav, thanks for the good work!
I've found a bug after inspecting the logs in compose:

mail                     | Jul 28 09:51:55 mail postfix/smtpd[2658]: warning: cannot load 1024-bit DH parameters from file /etc/postfix/dhparams.pem -- using compiled-in defaults
mail                     | Jul 28 09:51:55 mail postfix/smtpd[2658]: warning: TLS library problem: error:0906D06C:PEM routines:PEM_read_bio:no start line:../crypto/pem/pem_lib.c:686:Expecting: DH PARAMETERS:

cat /etc/postfix/dhparams.pem was showing an empty file...

Logs from docker exec -it {container_name: mail} /bin/bash:

root@mail:~# cat /etc/cron.d/dh2048
@weekly FILE=/tmp/tmp.aFRqiZNPZT ; openssl dhparam -out  2048 > /dev/null 2>&1 && mv -f  /etc/postfix/dhparams.pem
root@mail:~# echo "@weekly FILE=\`mktemp\` ; openssl dhparam -out \$FILE 2048 > /dev/null 2>&1 && mv -f \$FILE /etc/postfix/dhparams.pem" > /etc/cron.d/dh2048
root@mail:~# cat /etc/cron.d/dh2048
@weekly FILE=`mktemp` ; openssl dhparam -out $FILE 2048 > /dev/null 2>&1 && mv -f $FILE /etc/postfix/dhparams.pem

@tomav tomav merged commit 70cbfa3 into docker-mailserver:master Jul 29, 2019
@tomav
Copy link
Copy Markdown
Contributor

tomav commented Jul 29, 2019

Thank you.

@dimalo dimalo deleted the feature/fix-postfix-dh-generation branch July 29, 2019 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants