Compare commits
5 Commits
45ee2a0e3d
...
c62f1e9c97
Author | SHA1 | Date |
---|---|---|
wpetit | c62f1e9c97 | |
wpetit | 88660cdd78 | |
wpetit | f2530bf390 | |
wpetit | 66a06c9bf4 | |
wpetit | 622f71d901 |
|
@ -3,6 +3,6 @@
|
||||||
/vendor
|
/vendor
|
||||||
/data
|
/data
|
||||||
/bin
|
/bin
|
||||||
/misc/docker
|
/misc/docker/Dockerfile
|
||||||
/.env
|
/.env
|
||||||
/.env.dist
|
/.env.dist
|
|
@ -18,6 +18,8 @@ L'interface Web sera accessible à l'adresse http://localhost:8080/.
|
||||||
|
|
||||||
Le serveur SMTP sera accessible sur le port 2525. L'authentification est désactivée par défaut.
|
Le serveur SMTP sera accessible sur le port 2525. L'authentification est désactivée par défaut.
|
||||||
|
|
||||||
|
Voir la section "[Variables d'environnement](#variables-denvironnement)" pour voir comment personnaliser la configuration du service.
|
||||||
|
|
||||||
### Avec les binaires
|
### Avec les binaires
|
||||||
|
|
||||||
> TODO
|
> TODO
|
||||||
|
|
|
@ -43,7 +43,9 @@ func (b *Backend) AnonymousLogin(state *smtp.ConnectionState) (smtp.Session, err
|
||||||
return nil, smtp.ErrAuthRequired
|
return nil, smtp.ErrAuthRequired
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil, nil
|
ctx := context.WithValue(context.Background(), container.KeyServiceContainer, b.ctn)
|
||||||
|
|
||||||
|
return &Session{ctx, b.ctn, "anonymous"}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// A Session is returned after successful login.
|
// A Session is returned after successful login.
|
||||||
|
@ -105,6 +107,11 @@ func startSMTPServer(conf *config.Config, ctn *service.Container) {
|
||||||
s.MaxMessageBytes = conf.SMTP.MaxMessageBytes
|
s.MaxMessageBytes = conf.SMTP.MaxMessageBytes
|
||||||
s.MaxRecipients = conf.SMTP.MaxRecipients
|
s.MaxRecipients = conf.SMTP.MaxRecipients
|
||||||
s.AllowInsecureAuth = conf.SMTP.AllowInsecureAuth
|
s.AllowInsecureAuth = conf.SMTP.AllowInsecureAuth
|
||||||
|
|
||||||
|
if conf.SMTP.Username == "" && conf.SMTP.Password == "" {
|
||||||
|
s.AuthDisabled = true
|
||||||
|
}
|
||||||
|
|
||||||
if conf.SMTP.Debug {
|
if conf.SMTP.Debug {
|
||||||
s.Debug = os.Stdout
|
s.Debug = os.Stdout
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,13 @@ COPY . /src
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
|
||||||
|
RUN cp -f misc/docker/config-patch.yml misc/release/config-patch.yml
|
||||||
|
|
||||||
|
RUN go get github.com/krishicks/yaml-patch/cmd/yaml-patch
|
||||||
|
|
||||||
RUN npm install \
|
RUN npm install \
|
||||||
&& make vendor \
|
&& make vendor \
|
||||||
|
&& echo "---" > ./misc/release/config-patch.yml \
|
||||||
&& make ARCH_TARGETS=amd64 release
|
&& make ARCH_TARGETS=amd64 release
|
||||||
|
|
||||||
FROM busybox
|
FROM busybox
|
||||||
|
@ -24,4 +29,6 @@ COPY --from=build /src/release/fake-smtp-linux-amd64 /app
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
CMD ["bin/fake-smtp", "--config", "fake-smtp.yml"]
|
RUN mkdir -p /app
|
||||||
|
|
||||||
|
CMD ["bin/fake-smtp", "--config", "config.yml"]
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
- op: replace
|
||||||
|
path: /smtp/debug
|
||||||
|
value: false
|
Loading…
Reference in New Issue