/*
   Indicating capability: MODE-READER

   This command MUST NOT be pipelined.

   Syntax
     MODE READER

   Responses
     200    Posting allowed
     201    Posting prohibited
     502    Reading service permanently unavailable [1]

   [1] Following a 502 response the server MUST immediately close the
       connection.

   From RFC-4644:

   Syntax
      MODE STREAM

   Responses
      203   Streaming permitted
*/
Indicating capability: MODE-READER

This command MUST NOT be pipelined.

Syntax
MODE READER

Responses
200    Posting allowed
201    Posting prohibited
502    Reading service permanently unavailable [1]

[1] Following a 502 response the server MUST immediately close the
connection.



Syntax
MODE STREAM

Responses
203   Streaming permitted
/ * Indicating capability : MODE - READER This command MUST NOT be pipelined . Syntax MODE READER Responses 200 Posting allowed 201 Posting prohibited 502 Reading service permanently unavailable [ 1 ] [ 1 ] Following a 502 response the server MUST immediately close the connection . From RFC - 4644 : Syntax MODE STREAM Responses 203 Streaming permitted * /
func handleMode(args []string, s *session, c *textproto.Conn) error {
	arg0 := "reader"
	if len(args)>0 { arg0=strings.ToLower(args[0]) }
	switch arg0 {
	case "stream":
		c.PrintfLine("203 Streaming permitted")
	case "reader":
		fallthrough
	default:
		if s.backend.AllowPost() {
			c.PrintfLine("200 Posting allowed")
		} else {
			c.PrintfLine("201 Posting prohibited")
		}
	}
	return nil
}
func handleMode ( args [ ] string , s * session , c * textproto . Conn ) error { arg0 := " " if len ( args ) > 0 { arg0 = strings . ToLower ( args [ 0 ] ) } switch arg0 { case " " : c . PrintfLine ( " " ) case " " : fallthrough default : if s . backend . AllowPost ( ) { c . PrintfLine ( " " ) } else { c . PrintfLine ( " " ) } } return nil }
Indicating capability: MODE-READER
Indicating capability : MODE - READER