xetus-oss / docker-archiva

A docker image for Apache Archiva
Apache License 2.0
55 stars 33 forks source link

validation_mail: user and password set via env variable #26

Closed makotr closed 4 years ago

makotr commented 4 years ago

In the moment the user and password cannot be set through env variables.

<New id="validation_mail" class="org.eclipse.jetty.plus.jndi.Resource">
    <Arg>mail/Session</Arg>
    <Arg>
      <New class="org.eclipse.jetty.jndi.factories.MailSessionReference">
        <Set name="user"></Set>
        <Set name="password"></Set>
        <Set name="properties">
          <New class="java.util.Properties">
            <Put name="mail.smtp.host"><Env name="SMTP_HOST" default="localhost"/></Put>
            <Put name="mail.smtp.port"><Env name="SMTP_PORT" default="25"/></Put>
          </New>
        </Set>
      </New>
    </Arg>
  </New>

Is it possible to change the code, that the user and password can set with env values?

tkent commented 4 years ago

👋 @makotr

Is certainly possible to add support for SMTP authentication configuration. However, we've tried to avoid adding that type of configuration support into this image because SMTP authentication can get a little complicated in certain scenarios. There are several existing lightweight images whose primary purpose is to provide relay support for an upstream SMTP server that requires authentication (for example juanluisbaptiste/docker-postfix).

Now, that said, if there is a reason that using a dedicated container for handling SMTP authentication won't work for you, we'll look at adding it. We're just trying to avoid complicating the code if it's not needed.

tkent commented 4 years ago

I'm closing this issue since we haven't received a response in a while. Please to leave a comment if you'd like it re-opened!