mirror of
https://git.keinpfusch.net/loweel/zangtumb
synced 2024-12-19 00:03:05 +01:00
Compare commits
4 Commits
885df1c4ab
...
223b65994c
Author | SHA1 | Date | |
---|---|---|---|
|
223b65994c | ||
|
1af4d062fd | ||
|
e7bdc4e92b | ||
|
386c80b6a4 |
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#Start multistage Docker
|
||||||
|
#Stage 1 : build brutalinks
|
||||||
|
|
||||||
|
|
||||||
|
FROM golang:latest AS zangbuilder
|
||||||
|
RUN apt install make git -y
|
||||||
|
RUN mkdir -p /go/src/zangtumb
|
||||||
|
RUN git clone https://git.keinpfusch.net/loweel/zangtumb.git /go/src/zangtumb
|
||||||
|
WORKDIR /go/src/zangtumb
|
||||||
|
ENV GO111MODULE=auto
|
||||||
|
RUN go build
|
||||||
|
|
||||||
|
|
||||||
|
#Start multistage Docker
|
||||||
|
#Stage 2 : put pieces together
|
||||||
|
|
||||||
|
FROM debian:latest
|
||||||
|
RUN apt update
|
||||||
|
RUN apt upgrade -y
|
||||||
|
RUN apt install ca-certificates -y
|
||||||
|
RUN mkdir -p /opt/zangtumb
|
||||||
|
WORKDIR /opt/zangtumb
|
||||||
|
COPY --from=zangbuilder /go/src/zangtumb /opt/zangtumb/
|
||||||
|
ENTRYPOINT ["/opt/zangtumb/zangtumb"]
|
@ -259,6 +259,11 @@ loop:
|
|||||||
to = nil
|
to = nil
|
||||||
buffer.Reset()
|
buffer.Reset()
|
||||||
case "MAIL":
|
case "MAIL":
|
||||||
|
|
||||||
|
log.Println("TlsConfigExists: " , s.srv.TLSConfig != nil)
|
||||||
|
log.Println("TLS_Required: " , s.srv.TLSRequired)
|
||||||
|
log.Println("We Are in Clear: ", !s.tls)
|
||||||
|
|
||||||
if s.srv.TLSConfig != nil && s.srv.TLSRequired && !s.tls {
|
if s.srv.TLSConfig != nil && s.srv.TLSRequired && !s.tls {
|
||||||
s.writef("530 5.7.0 Must issue a STARTTLS command first")
|
s.writef("530 5.7.0 Must issue a STARTTLS command first")
|
||||||
break
|
break
|
||||||
|
@ -38,10 +38,9 @@ func init() {
|
|||||||
if os.Getenv("USETLS") == "true" {
|
if os.Getenv("USETLS") == "true" {
|
||||||
log.Println("Preparing TLS Keys")
|
log.Println("Preparing TLS Keys")
|
||||||
ZMakecert()
|
ZMakecert()
|
||||||
ZangSmtpServer.ConfigureTLS(CrtFile, KeyFile)
|
|
||||||
ZangSmtpServer.TLSListener = false
|
ZangSmtpServer.TLSListener = false
|
||||||
ZangSmtpServer.TLSRequired = true
|
ZangSmtpServer.TLSRequired = true
|
||||||
log.Println("Using TLS")
|
log.Println("Using TLS: ", ZangSmtpServer.TLSRequired)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@ -59,6 +58,8 @@ func init() {
|
|||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
log.Println("Starting the server....")
|
log.Println("Starting the server....")
|
||||||
|
|
||||||
|
ZangSmtpServer.ConfigureTLS(CrtFile, KeyFile)
|
||||||
|
|
||||||
defer log.Println("Shutting down the server")
|
defer log.Println("Shutting down the server")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user