functions for SMTP AUTH
More...
#include <qsmtpd/qsauth.h>
#include <qsmtpd/qsauth_backend.h>
#include <base64.h>
#include <control.h>
#include <fmt.h>
#include <log.h>
#include <netio.h>
#include <qsmtpd/antispam.h>
#include <qsmtpd/qsmtpd.h>
#include <sstring.h>
#include <tls.h>
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <syslog.h>
#include <time.h>
#include <unistd.h>
|
struct | authcmd |
| list of supported authentication methods and their handler functions More...
|
|
|
static int | err_input (void) |
|
static int | err_base64 (void) |
|
static int | authgetl (string *authin) |
| read in AUTH line More...
|
|
static int | auth_login (struct string *user) |
|
static int | auth_plain (struct string *user) |
|
int | smtp_auth (void) |
|
char * | smtp_authstring (void) |
| return a list of all enabled auth types More...
|
|
int | auth_permitted (void) |
|
void | auth_setup (int argc, const char **argv) |
|
|
const char * | tempnoauth = "454 4.5.0 AUTH temporaryly not available\r\n" |
|
static const char * | auth_host |
|
static struct authcmd | authcmds [] |
|
◆ authgetl()
static int authgetl |
( |
string * |
authin | ) |
|
|
static |
read in AUTH line
- Parameters
-
authin | buffer to hold authenication data |
- Returns
- if reading data was successful
- Return values
-
0 | AUTH line was read into authin |
-1 | error (errno is set) |
◆ smtp_auth()
check if user sends valid authentication
- Returns
- 0 if user is successfully authenticated, error code else
◆ smtp_authstring()
char* smtp_authstring |
( |
void |
| ) |
|
return a list of all enabled auth types
- Returns
- string of enabled auth types
- Return values
-
NULL | out of memory or AUTH currently not permitted |
The returned memory is allocated and has to be freed by the caller.
The returned string will contain a trailing CRLF pair.
◆ auth_host
◆ authcmds
Initial value:= {
{ .text = "login", .fun = auth_login },
{ .text = "plain", .fun = auth_plain },
{ }
}