get('pop3.host', '0.0.0.0'); $port = (int)($options['p'] ?? $options['port'] ?? $config->get('pop3.port', 110)); $maxConnections = (int)($options['m'] ?? $options['max-connections'] ?? $config->get('pop3.max_connections', 100)); if ($port < 1 || $port > 65535) { echo "Invalid port\n"; exit(1); } if ($maxConnections < 1 || $maxConnections > 1000) { echo "Invalid max connections\n"; exit(1); } $server = new Pop3Server($host, $port, $maxConnections); $server->start();