Skip to content

Allow DKIM key to be injected with Docker Secrets #51

@valentinomariotto

Description

@valentinomariotto

Hi,
thank you for this great container, it's very useful.

I'd like to pass my DKIM key as a secret in docker-compose, but I can't because of lines 29 and 30 of the opendkim.conf.sh script:

# Checks
if [ ! -f "${DKIM_KEYFILE}" ]; then
    echo "dkim >> Error: DKIM_KEYFILE ${DKIM_KEYFILE} not found"
    # shutdown everything
    s6-svscanctl -t /etc/s6
    exit 128
else
    echo "dkim >> Setting mode and owner on $DKIM_KEYFILE"
    chown root:root ${DKIM_KEYFILE}
    chmod 400 ${DKIM_KEYFILE}
fi

I think it'd be best to make the chown and chmod optional. So that if the owner is alredy root and the file is already readonly, we can use the secrets construct.
Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions