Closed xdkaka closed 2 years ago
Use Submission for outgoing SMTP
Outbound messages from local domains should be sent via Submission endpoint - port 465 with implicit TLS or port 587 with STARTTLS.
Use Submission for outgoing SMTP
Outbound messages from local domains should be sent via Submission endpoint - port 465 with implicit TLS or port 587 with STARTTLS.
Yes, I had try 587, It say:
Please authenticate first
And I have find the resaon, I had change go-smtp pachage because I use haproxy for proxy to verify spf
go-smtp server.go
// old:
s.listeners = append(s.listeners, l)
// new
proxyListener := &proxyproto.Listener{Listener: l}
defer proxyListener.Close()
s.listeners = append(s.listeners, proxyListener)
go-smtp server.go
// old:
c, err := l.Accept()
// new
c, err := proxyListener.Accept()
Not sure how sending outbound messages is related to SPF. Could you provide more details about your setup and what you are trying to do?
SPF
Sending emails has nothing to do with spf. The changed proxy is because of the receipt, I use haproxy transparent forwarding email, This change affects the sending.
Describe the bug
What do you think is wrong? Send Email Error error: reject directive used
client_loop: send disconnect: Broken pipe
Steps to reproduce
Log files
smtp: listening on tcp://0.0.0.0:25 submission: listening on tls://0.0.0.0:465 submission: listening on tcp://0.0.0.0:587 smtp: Mail {"from":"addmin@mail.com"} smtp: Rcpt {"to":"xxx@gmail.com"} smtp: incoming message {"msg_id":"5462730f","sender":"admin@mail.com","src_host":"localhost","src_ip":"111.63.8.21:50855"} [debug] smtp/pipeline: sender admin@mail.com matched by domain rule 'xxx@gmail.com' {"msg_id":"5462730f"} [debug] smtp/pipeline: global rcpt modifiers: xxx@gmail.com => [xxx@gmail.com] {"msg_id":"5462730f"} [debug] smtp/pipeline: per-source rcpt modifiers: xxx@gmail.com => [xxx@gmail.com] {"msg_id":"5462730f"} [debug] smtp/pipeline: recipient xxx@gmail.com matched by default rule (clean = xxx@gmail.com) {"msg_id":"5462730f"} smtp: RCPT error {"effective_rcpt":"xxx@gmail.com","msg_id":"5462730f","reason":"reject directive used","smtp_code":501,"smtp_enchcode":"5.1.8","smtp_msg":"Use Submission for outgoing SMTP","to":"xxx@gmail.com"} smtp: Rcpt {"msg_id":"5462730f","to":"xxx@gmail.com"} smtp: aborted {"msg_id":"5462730f"}
Use a service like hastebin.com or attach a file if it is big
Configuration file
Located in /etc/maddy/maddy.conf by default, don't forget to remove DB passwords and other security-related stuff.
Environment information
go 1.8.13