-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
457 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,25 @@ | ||
package smtp | ||
|
||
import ( | ||
"github.com/awakari/int-email/service/converter" | ||
"github.com/awakari/int-email/service/writer" | ||
"github.com/awakari/int-email/service" | ||
"github.com/emersion/go-smtp" | ||
) | ||
|
||
type backend struct { | ||
svcWriter writer.Service | ||
rcpts map[string]bool | ||
dataLimit int64 | ||
evtType string | ||
conv converter.Service | ||
svc service.Service | ||
} | ||
|
||
func NewBackend(svcWriter writer.Service, rcpts map[string]bool, dataLimit int64, evtType string, conv converter.Service) smtp.Backend { | ||
func NewBackend(rcpts map[string]bool, dataLimit int64, svc service.Service) smtp.Backend { | ||
return backend{ | ||
svcWriter: svcWriter, | ||
rcpts: rcpts, | ||
dataLimit: dataLimit, | ||
evtType: evtType, | ||
conv: conv, | ||
svc: svc, | ||
} | ||
} | ||
|
||
func (b backend) NewSession(c *smtp.Conn) (s smtp.Session, err error) { | ||
s = newSession(b.svcWriter, b.rcpts, b.dataLimit, b.evtType, b.conv) | ||
s = newSession(b.rcpts, b.dataLimit, b.svc) | ||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,6 +85,16 @@ affinity: | |
- "true" | ||
|
||
api: | ||
group: "default" | ||
smtp: | ||
data: | ||
limit: 1048576 | ||
rcpt: | ||
names: "publish" | ||
limit: 100 | ||
timeout: | ||
read: "1m" | ||
write: "1m" | ||
event: | ||
typ: | ||
self: "com_awakari_email_v1" | ||
|
@@ -109,12 +119,21 @@ backup: | |
schedule: "0 0 31 2 *" # never, manually only | ||
volume: | ||
name: "backup-secrets" | ||
cert: | ||
acme: | ||
email: "[email protected]" | ||
server: "https://acme-staging-v02.api.letsencrypt.org/directory" | ||
issuer: | ||
name: letsencrypt-staging | ||
tls: | ||
version: | ||
min: 769 | ||
client: | ||
auth: | ||
type: 4 | ||
key: | ||
path: "/etc/smtp/tls/tls.key" | ||
cert: | ||
path: "/etc/smtp/tls/tls.crt" | ||
acme: | ||
email: "[email protected]" | ||
server: "https://acme-staging-v02.api.letsencrypt.org/directory" | ||
issuer: | ||
name: letsencrypt-staging | ||
log: | ||
# https://pkg.go.dev/golang.org/x/exp/slog#Level | ||
level: -4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.