简体   繁体   中英

Linux not accepting connections to port 25

I am working on a simple smtp server, but am stuck on accepting TCP connections on port 25.

I tried running to server and using telnet from localhost and it works. From a separate computer it says trying (ip)...

When sending email's from GMail to my smtp server it does not see any connection

relevant code in Golang

func main() {
    listener, err := net.Listen("tcp", ":25")
    checkError(err)
    for {
        conn, err := listener.Accept()
        checkError(err)
        go handleConnection(conn)
    }
}

It is a Ubuntu server running on Digital Ocean

I know port 25 is not being used and I have file descriptors remaining

Tried it on a different port and it worked. Seems to be a Digital Ocean thing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM