Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
ngx_mail.h File Reference
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_event.h>
#include <ngx_event_connect.h>
Include dependency graph for ngx_mail.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ngx_mail_conf_ctx_t
struct  ngx_mail_listen_t
struct  ngx_mail_addr_conf_t
struct  ngx_mail_in_addr_t
struct  ngx_mail_port_t
struct  ngx_mail_conf_port_t
struct  ngx_mail_conf_addr_t
struct  ngx_mail_core_main_conf_t
struct  ngx_mail_core_srv_conf_t
struct  ngx_mail_proxy_ctx_t
struct  ngx_mail_session_t
struct  ngx_mail_log_ctx_t
struct  ngx_mail_protocol_s
struct  ngx_mail_module_t

Macros

#define NGX_MAIL_POP3_PROTOCOL   0
#define NGX_MAIL_IMAP_PROTOCOL   1
#define NGX_MAIL_SMTP_PROTOCOL   2
#define NGX_POP3_USER   1
#define NGX_POP3_PASS   2
#define NGX_POP3_CAPA   3
#define NGX_POP3_QUIT   4
#define NGX_POP3_NOOP   5
#define NGX_POP3_STLS   6
#define NGX_POP3_APOP   7
#define NGX_POP3_AUTH   8
#define NGX_POP3_STAT   9
#define NGX_POP3_LIST   10
#define NGX_POP3_RETR   11
#define NGX_POP3_DELE   12
#define NGX_POP3_RSET   13
#define NGX_POP3_TOP   14
#define NGX_POP3_UIDL   15
#define NGX_IMAP_LOGIN   1
#define NGX_IMAP_LOGOUT   2
#define NGX_IMAP_CAPABILITY   3
#define NGX_IMAP_NOOP   4
#define NGX_IMAP_STARTTLS   5
#define NGX_IMAP_NEXT   6
#define NGX_IMAP_AUTHENTICATE   7
#define NGX_SMTP_HELO   1
#define NGX_SMTP_EHLO   2
#define NGX_SMTP_AUTH   3
#define NGX_SMTP_QUIT   4
#define NGX_SMTP_NOOP   5
#define NGX_SMTP_MAIL   6
#define NGX_SMTP_RSET   7
#define NGX_SMTP_RCPT   8
#define NGX_SMTP_DATA   9
#define NGX_SMTP_VRFY   10
#define NGX_SMTP_EXPN   11
#define NGX_SMTP_HELP   12
#define NGX_SMTP_STARTTLS   13
#define NGX_MAIL_AUTH_PLAIN   0
#define NGX_MAIL_AUTH_LOGIN   1
#define NGX_MAIL_AUTH_LOGIN_USERNAME   2
#define NGX_MAIL_AUTH_APOP   3
#define NGX_MAIL_AUTH_CRAM_MD5   4
#define NGX_MAIL_AUTH_NONE   5
#define NGX_MAIL_AUTH_PLAIN_ENABLED   0x0002
#define NGX_MAIL_AUTH_LOGIN_ENABLED   0x0004
#define NGX_MAIL_AUTH_APOP_ENABLED   0x0008
#define NGX_MAIL_AUTH_CRAM_MD5_ENABLED   0x0010
#define NGX_MAIL_AUTH_NONE_ENABLED   0x0020
#define NGX_MAIL_PARSE_INVALID_COMMAND   20
#define NGX_MAIL_MODULE   0x4C49414D /* "MAIL" */
#define NGX_MAIL_MAIN_CONF   0x02000000
#define NGX_MAIL_SRV_CONF   0x04000000
#define NGX_MAIL_MAIN_CONF_OFFSET   offsetof(ngx_mail_conf_ctx_t, main_conf)
#define NGX_MAIL_SRV_CONF_OFFSET   offsetof(ngx_mail_conf_ctx_t, srv_conf)
#define ngx_mail_get_module_ctx(s, module)   (s)->ctx[module.ctx_index]
#define ngx_mail_set_ctx(s, c, module)   s->ctx[module.ctx_index] = c;
#define ngx_mail_delete_ctx(s, module)   s->ctx[module.ctx_index] = NULL;
#define ngx_mail_get_module_main_conf(s, module)   (s)->main_conf[module.ctx_index]
#define ngx_mail_get_module_srv_conf(s, module)   (s)->srv_conf[module.ctx_index]
#define ngx_mail_conf_get_module_main_conf(cf, module)   ((ngx_mail_conf_ctx_t *) cf->ctx)->main_conf[module.ctx_index]
#define ngx_mail_conf_get_module_srv_conf(cf, module)   ((ngx_mail_conf_ctx_t *) cf->ctx)->srv_conf[module.ctx_index]

Typedefs

typedef struct ngx_mail_protocol_s ngx_mail_protocol_t
typedef void(* ngx_mail_init_session_pt )(ngx_mail_session_t *s, ngx_connection_t *c)
typedef void(* ngx_mail_init_protocol_pt )(ngx_event_t *rev)
typedef void(* ngx_mail_auth_state_pt )(ngx_event_t *rev)
typedef ngx_int_t(* ngx_mail_parse_command_pt )(ngx_mail_session_t *s)

Enumerations

enum  ngx_pop3_state_e {
  ngx_pop3_start = 0, ngx_pop3_user, ngx_pop3_passwd, ngx_pop3_auth_login_username,
  ngx_pop3_auth_login_password, ngx_pop3_auth_plain, ngx_pop3_auth_cram_md5
}
enum  ngx_imap_state_e {
  ngx_imap_start = 0, ngx_imap_auth_login_username, ngx_imap_auth_login_password, ngx_imap_auth_plain,
  ngx_imap_auth_cram_md5, ngx_imap_login, ngx_imap_user, ngx_imap_passwd
}
enum  ngx_smtp_state_e {
  ngx_smtp_start = 0, ngx_smtp_auth_login_username, ngx_smtp_auth_login_password, ngx_smtp_auth_plain,
  ngx_smtp_auth_cram_md5, ngx_smtp_helo, ngx_smtp_helo_xclient, ngx_smtp_helo_from,
  ngx_smtp_xclient, ngx_smtp_xclient_from, ngx_smtp_xclient_helo, ngx_smtp_from,
  ngx_smtp_to
}

Functions

void ngx_mail_init_connection (ngx_connection_t *c)
ngx_int_t ngx_mail_salt (ngx_mail_session_t *s, ngx_connection_t *c, ngx_mail_core_srv_conf_t *cscf)
ngx_int_t ngx_mail_auth_plain (ngx_mail_session_t *s, ngx_connection_t *c, ngx_uint_t n)
ngx_int_t ngx_mail_auth_login_username (ngx_mail_session_t *s, ngx_connection_t *c, ngx_uint_t n)
ngx_int_t ngx_mail_auth_login_password (ngx_mail_session_t *s, ngx_connection_t *c)
ngx_int_t ngx_mail_auth_cram_md5_salt (ngx_mail_session_t *s, ngx_connection_t *c, char *prefix, size_t len)
ngx_int_t ngx_mail_auth_cram_md5 (ngx_mail_session_t *s, ngx_connection_t *c)
ngx_int_t ngx_mail_auth_parse (ngx_mail_session_t *s, ngx_connection_t *c)
void ngx_mail_send (ngx_event_t *wev)
ngx_int_t ngx_mail_read_command (ngx_mail_session_t *s, ngx_connection_t *c)
void ngx_mail_auth (ngx_mail_session_t *s, ngx_connection_t *c)
void ngx_mail_close_connection (ngx_connection_t *c)
void ngx_mail_session_internal_server_error (ngx_mail_session_t *s)
u_char * ngx_mail_log_error (ngx_log_t *log, u_char *buf, size_t len)
char * ngx_mail_capabilities (ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
void ngx_mail_proxy_init (ngx_mail_session_t *s, ngx_addr_t *peer)
void ngx_mail_auth_http_init (ngx_mail_session_t *s)

Variables

ngx_uint_t ngx_mail_max_module
ngx_module_t ngx_mail_core_module

Macro Definition Documentation

#define NGX_IMAP_AUTHENTICATE   7

Definition at line 283 of file ngx_mail.h.

#define NGX_IMAP_CAPABILITY   3

Definition at line 277 of file ngx_mail.h.

#define NGX_IMAP_LOGIN   1

Definition at line 275 of file ngx_mail.h.

#define NGX_IMAP_LOGOUT   2

Definition at line 276 of file ngx_mail.h.

#define NGX_IMAP_NEXT   6

Definition at line 281 of file ngx_mail.h.

#define NGX_IMAP_NOOP   4

Definition at line 278 of file ngx_mail.h.

#define NGX_IMAP_STARTTLS   5

Definition at line 279 of file ngx_mail.h.

#define NGX_MAIL_AUTH_APOP   3

Definition at line 304 of file ngx_mail.h.

#define NGX_MAIL_AUTH_APOP_ENABLED   0x0008

Definition at line 311 of file ngx_mail.h.

#define NGX_MAIL_AUTH_CRAM_MD5   4

Definition at line 305 of file ngx_mail.h.

#define NGX_MAIL_AUTH_CRAM_MD5_ENABLED   0x0010

Definition at line 312 of file ngx_mail.h.

#define NGX_MAIL_AUTH_LOGIN   1

Definition at line 302 of file ngx_mail.h.

#define NGX_MAIL_AUTH_LOGIN_ENABLED   0x0004

Definition at line 310 of file ngx_mail.h.

#define NGX_MAIL_AUTH_LOGIN_USERNAME   2

Definition at line 303 of file ngx_mail.h.

#define NGX_MAIL_AUTH_NONE   5

Definition at line 306 of file ngx_mail.h.

#define NGX_MAIL_AUTH_NONE_ENABLED   0x0020

Definition at line 313 of file ngx_mail.h.

#define NGX_MAIL_AUTH_PLAIN   0

Definition at line 301 of file ngx_mail.h.

#define NGX_MAIL_AUTH_PLAIN_ENABLED   0x0002

Definition at line 309 of file ngx_mail.h.

#define ngx_mail_conf_get_module_main_conf (   cf,
  module 
)    ((ngx_mail_conf_ctx_t *) cf->ctx)->main_conf[module.ctx_index]

Definition at line 371 of file ngx_mail.h.

#define ngx_mail_conf_get_module_srv_conf (   cf,
  module 
)    ((ngx_mail_conf_ctx_t *) cf->ctx)->srv_conf[module.ctx_index]

Definition at line 373 of file ngx_mail.h.

#define ngx_mail_delete_ctx (   s,
  module 
)    s->ctx[module.ctx_index] = NULL;

Definition at line 364 of file ngx_mail.h.

#define ngx_mail_get_module_ctx (   s,
  module 
)    (s)->ctx[module.ctx_index]

Definition at line 362 of file ngx_mail.h.

#define ngx_mail_get_module_main_conf (   s,
  module 
)    (s)->main_conf[module.ctx_index]

Definition at line 367 of file ngx_mail.h.

#define ngx_mail_get_module_srv_conf (   s,
  module 
)    (s)->srv_conf[module.ctx_index]

Definition at line 369 of file ngx_mail.h.

#define NGX_MAIL_IMAP_PROTOCOL   1

Definition at line 121 of file ngx_mail.h.

#define NGX_MAIL_MAIN_CONF   0x02000000

Definition at line 354 of file ngx_mail.h.

#define NGX_MAIL_MAIN_CONF_OFFSET   offsetof(ngx_mail_conf_ctx_t, main_conf)

Definition at line 358 of file ngx_mail.h.

#define NGX_MAIL_MODULE   0x4C49414D /* "MAIL" */

Definition at line 352 of file ngx_mail.h.

#define NGX_MAIL_PARSE_INVALID_COMMAND   20

Definition at line 316 of file ngx_mail.h.

#define NGX_MAIL_POP3_PROTOCOL   0

Definition at line 120 of file ngx_mail.h.

#define ngx_mail_set_ctx (   s,
  c,
  module 
)    s->ctx[module.ctx_index] = c;

Definition at line 363 of file ngx_mail.h.

#define NGX_MAIL_SMTP_PROTOCOL   2

Definition at line 122 of file ngx_mail.h.

#define NGX_MAIL_SRV_CONF   0x04000000

Definition at line 355 of file ngx_mail.h.

#define NGX_MAIL_SRV_CONF_OFFSET   offsetof(ngx_mail_conf_ctx_t, srv_conf)

Definition at line 359 of file ngx_mail.h.

#define NGX_POP3_APOP   7

Definition at line 264 of file ngx_mail.h.

#define NGX_POP3_AUTH   8

Definition at line 265 of file ngx_mail.h.

#define NGX_POP3_CAPA   3

Definition at line 260 of file ngx_mail.h.

#define NGX_POP3_DELE   12

Definition at line 269 of file ngx_mail.h.

#define NGX_POP3_LIST   10

Definition at line 267 of file ngx_mail.h.

#define NGX_POP3_NOOP   5

Definition at line 262 of file ngx_mail.h.

#define NGX_POP3_PASS   2

Definition at line 259 of file ngx_mail.h.

#define NGX_POP3_QUIT   4

Definition at line 261 of file ngx_mail.h.

#define NGX_POP3_RETR   11

Definition at line 268 of file ngx_mail.h.

#define NGX_POP3_RSET   13

Definition at line 270 of file ngx_mail.h.

#define NGX_POP3_STAT   9

Definition at line 266 of file ngx_mail.h.

#define NGX_POP3_STLS   6

Definition at line 263 of file ngx_mail.h.

#define NGX_POP3_TOP   14

Definition at line 271 of file ngx_mail.h.

#define NGX_POP3_UIDL   15

Definition at line 272 of file ngx_mail.h.

#define NGX_POP3_USER   1

Definition at line 258 of file ngx_mail.h.

#define NGX_SMTP_AUTH   3

Definition at line 288 of file ngx_mail.h.

#define NGX_SMTP_DATA   9

Definition at line 294 of file ngx_mail.h.

#define NGX_SMTP_EHLO   2

Definition at line 287 of file ngx_mail.h.

#define NGX_SMTP_EXPN   11

Definition at line 296 of file ngx_mail.h.

#define NGX_SMTP_HELO   1

Definition at line 286 of file ngx_mail.h.

#define NGX_SMTP_HELP   12

Definition at line 297 of file ngx_mail.h.

#define NGX_SMTP_MAIL   6

Definition at line 291 of file ngx_mail.h.

#define NGX_SMTP_NOOP   5

Definition at line 290 of file ngx_mail.h.

#define NGX_SMTP_QUIT   4

Definition at line 289 of file ngx_mail.h.

#define NGX_SMTP_RCPT   8

Definition at line 293 of file ngx_mail.h.

#define NGX_SMTP_RSET   7

Definition at line 292 of file ngx_mail.h.

#define NGX_SMTP_STARTTLS   13

Definition at line 298 of file ngx_mail.h.

#define NGX_SMTP_VRFY   10

Definition at line 295 of file ngx_mail.h.

Typedef Documentation

typedef void(* ngx_mail_auth_state_pt)(ngx_event_t *rev)

Definition at line 322 of file ngx_mail.h.

typedef void(* ngx_mail_init_protocol_pt)(ngx_event_t *rev)

Definition at line 321 of file ngx_mail.h.

typedef void(* ngx_mail_init_session_pt)(ngx_mail_session_t *s, ngx_connection_t *c)

Definition at line 319 of file ngx_mail.h.

typedef ngx_int_t(* ngx_mail_parse_command_pt)(ngx_mail_session_t *s)

Definition at line 323 of file ngx_mail.h.

Definition at line 125 of file ngx_mail.h.

Enumeration Type Documentation

Enumerator:
ngx_imap_start 
ngx_imap_auth_login_username 
ngx_imap_auth_login_password 
ngx_imap_auth_plain 
ngx_imap_auth_cram_md5 
ngx_imap_login 
ngx_imap_user 
ngx_imap_passwd 

Definition at line 159 of file ngx_mail.h.

Enumerator:
ngx_pop3_start 
ngx_pop3_user 
ngx_pop3_passwd 
ngx_pop3_auth_login_username 
ngx_pop3_auth_login_password 
ngx_pop3_auth_plain 
ngx_pop3_auth_cram_md5 

Definition at line 148 of file ngx_mail.h.

Enumerator:
ngx_smtp_start 
ngx_smtp_auth_login_username 
ngx_smtp_auth_login_password 
ngx_smtp_auth_plain 
ngx_smtp_auth_cram_md5 
ngx_smtp_helo 
ngx_smtp_helo_xclient 
ngx_smtp_helo_from 
ngx_smtp_xclient 
ngx_smtp_xclient_from 
ngx_smtp_xclient_helo 
ngx_smtp_from 
ngx_smtp_to 

Definition at line 171 of file ngx_mail.h.

Function Documentation

void ngx_mail_auth ( ngx_mail_session_t s,
ngx_connection_t c 
)

Definition at line 661 of file ngx_mail_handler.c.

Here is the call graph for this function:

Here is the caller graph for this function:

ngx_int_t ngx_mail_auth_cram_md5 ( ngx_mail_session_t s,
ngx_connection_t c 
)

Definition at line 485 of file ngx_mail_handler.c.

Here is the call graph for this function:

Here is the caller graph for this function:

ngx_int_t ngx_mail_auth_cram_md5_salt ( ngx_mail_session_t s,
ngx_connection_t c,
char *  prefix,
size_t  len 
)

Definition at line 456 of file ngx_mail_handler.c.

Here is the call graph for this function:

void ngx_mail_auth_http_init ( ngx_mail_session_t s)

Definition at line 153 of file ngx_mail_auth_http_module.c.

Here is the call graph for this function:

Here is the caller graph for this function:

ngx_int_t ngx_mail_auth_login_password ( ngx_mail_session_t s,
ngx_connection_t c 
)

Definition at line 423 of file ngx_mail_handler.c.

Here is the call graph for this function:

Here is the caller graph for this function:

ngx_int_t ngx_mail_auth_login_username ( ngx_mail_session_t s,
ngx_connection_t c,
ngx_uint_t  n 
)

Definition at line 394 of file ngx_mail_handler.c.

Here is the call graph for this function:

Here is the caller graph for this function:

ngx_int_t ngx_mail_auth_parse ( ngx_mail_session_t s,
ngx_connection_t c 
)

Definition at line 835 of file ngx_mail_parse.c.

Here is the call graph for this function:

ngx_int_t ngx_mail_auth_plain ( ngx_mail_session_t s,
ngx_connection_t c,
ngx_uint_t  n 
)

Definition at line 335 of file ngx_mail_handler.c.

Here is the call graph for this function:

Here is the caller graph for this function:

char* ngx_mail_capabilities ( ngx_conf_t cf,
ngx_command_t cmd,
void *  conf 
)

Definition at line 630 of file ngx_mail_core_module.c.

Here is the call graph for this function:

void ngx_mail_close_connection ( ngx_connection_t c)

Definition at line 693 of file ngx_mail_handler.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void ngx_mail_init_connection ( ngx_connection_t c)

Definition at line 23 of file ngx_mail_handler.c.

Here is the call graph for this function:

u_char* ngx_mail_log_error ( ngx_log_t log,
u_char *  buf,
size_t  len 
)

Definition at line 726 of file ngx_mail_handler.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void ngx_mail_proxy_init ( ngx_mail_session_t s,
ngx_addr_t peer 
)

Definition at line 112 of file ngx_mail_proxy_module.c.

Here is the call graph for this function:

ngx_int_t ngx_mail_read_command ( ngx_mail_session_t s,
ngx_connection_t c 
)

Definition at line 599 of file ngx_mail_handler.c.

Here is the call graph for this function:

Here is the caller graph for this function:

ngx_int_t ngx_mail_salt ( ngx_mail_session_t s,
ngx_connection_t c,
ngx_mail_core_srv_conf_t cscf 
)

Definition at line 292 of file ngx_mail_handler.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void ngx_mail_send ( ngx_event_t wev)

Definition at line 534 of file ngx_mail_handler.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void ngx_mail_session_internal_server_error ( ngx_mail_session_t s)

Definition at line 679 of file ngx_mail_handler.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

ngx_module_t ngx_mail_core_module

Definition at line 107 of file ngx_mail_core_module.c.

ngx_uint_t ngx_mail_max_module

Definition at line 27 of file ngx_mail.c.