/* Copyright (c) 2013-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "ioloop.h"
#include "smtp-parser.h"
#include "smtp-syntax.h"
#include "smtp-address.h"
#include "smtp-server-private.h"
/* MAIL command */
static bool
{
}
return FALSE;
}
return TRUE;
}
{
/* failure; substitute our own error if predictable */
(void)cmd_mail_check_state(cmd);
return;
}
/* success */
}
{
/* all preceeding commands have finished and now the transaction state
is clear. This provides the opportunity to re-check the transaction
state */
if (!cmd_mail_check_state(cmd))
return;
/* Advance state */
}
const char *params)
{
const char *error;
int ret;
/* mail = "MAIL FROM:" Reverse-path [SP Mail-parameters] CRLF
Reverse-path = Path / "<>"
*/
/* check transaction state as far as possible */
if (!cmd_mail_check_state(cmd))
return;
/* Reverse-path */
return;
}
return;
}
if (*params == ' ')
params++;
else if (*params != '\0') {
"Invalid FROM: Invalid character in path");
return;
}
/* no EHLO executed post-login, use pre-login value instead */
}
/* [SP Mail-parameters] */
switch (pperror) {
break;
break;
default:
i_unreached();
}
return;
}
/* specific implementation of MAIL command */
/* command is waiting for external event or it failed */
return;
}
}
if (!smtp_server_command_is_replied(command)) {
/* set generic MAIL success reply if none is provided */
}
}