Skip to content

Commit

Permalink
lmtp: commands: Added structural comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanbosch committed Dec 7, 2017
1 parent 124a7f9 commit ebdfdb7
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions src/lmtp/commands.c
Expand Up @@ -30,6 +30,10 @@

#define ERRSTR_TEMP_MAILBOX_FAIL "451 4.3.0 <%s> Temporary internal error"

/*
* EHLO command
*/

int cmd_lhlo(struct client *client, const char *args)
{
struct rfc822_parser_context parser;
Expand Down Expand Up @@ -77,6 +81,10 @@ int cmd_lhlo(struct client *client, const char *args)
return 0;
}

/*
* STARTTLS command
*/

int cmd_starttls(struct client *client)
{
struct ostream *plain_output = client->output;
Expand Down Expand Up @@ -105,6 +113,10 @@ int cmd_starttls(struct client *client)
return 0;
}

/*
* MAIL command
*/

int cmd_mail(struct client *client, const char *args)
{
struct smtp_address *address;
Expand Down Expand Up @@ -167,6 +179,10 @@ int cmd_mail(struct client *client, const char *args)
return 0;
}

/*
* RCPT command
*/

int cmd_rcpt(struct client *client, const char *args)
{
struct mail_recipient *rcpt;
Expand Down Expand Up @@ -303,6 +319,10 @@ int cmd_rcpt(struct client *client, const char *args)
}
}

/*
* QUIT command
*/

int cmd_quit(struct client *client, const char *args ATTR_UNUSED)
{
client_send_line(client, "221 2.0.0 OK");
Expand All @@ -313,25 +333,41 @@ int cmd_quit(struct client *client, const char *args ATTR_UNUSED)
return -1;
}

/*
* VRFY command
*/

int cmd_vrfy(struct client *client, const char *args ATTR_UNUSED)
{
client_send_line(client, "252 2.3.3 Try RCPT instead");
return 0;
}

/*
* RSET command
*/

int cmd_rset(struct client *client, const char *args ATTR_UNUSED)
{
client_state_reset(client, "RSET");
client_send_line(client, "250 2.0.0 OK");
return 0;
}

/*
* NOOP command
*/

int cmd_noop(struct client *client, const char *args ATTR_UNUSED)
{
client_send_line(client, "250 2.0.0 OK");
return 0;
}

/*
* DATA command
*/

static struct istream *client_get_input(struct client *client)
{
struct client_state *state = &client->state;
Expand Down Expand Up @@ -583,6 +619,10 @@ int cmd_data(struct client *client, const char *args ATTR_UNUSED)
return -1;
}

/*
* XCLIENT command
*/

int cmd_xclient(struct client *client, const char *args)
{
const char *const *tmp;
Expand Down

0 comments on commit ebdfdb7

Please sign in to comment.