aboutsummaryrefslogtreecommitdiff
path: root/incoming.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-01-04 20:46:29 +0800
committerRunxi Yu <me@runxiyu.org>2025-01-04 20:46:29 +0800
commit49f3a6cc3ed486289fd975cb1fcad0cd888c94e0 (patch)
tree19f0c76c17314d33ad98ebbbce6c1ce9deca8d15 /incoming.go
parentImplement NOOP (diff)
downloadmaild-49f3a6cc3ed486289fd975cb1fcad0cd888c94e0.tar.gz
maild-49f3a6cc3ed486289fd975cb1fcad0cd888c94e0.tar.zst
maild-49f3a6cc3ed486289fd975cb1fcad0cd888c94e0.zip
Reformat files
Diffstat (limited to 'incoming.go')
-rw-r--r--incoming.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/incoming.go b/incoming.go
index 169bde5..e264262 100644
--- a/incoming.go
+++ b/incoming.go
@@ -1,10 +1,11 @@
package main
import (
- "go.lindenii.runxiyu.org/lindenii-common/clog"
"os"
"path"
"time"
+
+ "go.lindenii.runxiyu.org/lindenii-common/clog"
)
func deliver_incoming(envelope_from string, envelope_recipients []string, data []byte) error {
@@ -15,7 +16,7 @@ func deliver_incoming(envelope_from string, envelope_recipients []string, data [
"data", string(data),
)
t := time.Now()
- fd, err := os.OpenFile(path.Join(config.Inbox_path, envelope_from+" "+t.Format(time.RFC3339Nano)+".eml"), os.O_CREATE|os.O_EXCL|os.O_WRONLY, 0660) // TODO: vulnerability
+ fd, err := os.OpenFile(path.Join(config.Inbox_path, envelope_from+" "+t.Format(time.RFC3339Nano)+".eml"), os.O_CREATE|os.O_EXCL|os.O_WRONLY, 0o660) // TODO: vulnerability
if err != nil {
// TODO: handle fs.ErrExist
return err_deliver_write