コード例 #1
0
ファイル: protocol-smtp.c プロジェクト: cweimann/mailfront
static int RCPT(void)
{
  const response* resp;
  msg2("RCPT ", arg.s);
  if (!saw_mail) return respond(&resp_no_mail);
  if ((resp = parse_addr_arg()) == 0) {
    if ((resp = handle_recipient(&addr, &params)) == 0)
      resp = &resp_accepted_recip;
    if (number_ok(resp))
      saw_rcpt = 1;
  }
  return respond(resp);
}
コード例 #2
0
ファイル: protocol-smtp.c プロジェクト: cweimann/mailfront
// FIXME: if rules_reset fails, exit
static int MAIL(void)
{
  const response* resp;
  msg2("MAIL ", arg.s);
  do_reset();
  if ((resp = parse_addr_arg()) == 0) {
    if ((resp = handle_sender(&addr, &params)) == 0)
      resp = &resp_accepted_sender;
    if (number_ok(resp)) {
      saw_mail = 1;
    }
  }
  return respond(resp);
}
コード例 #3
0
ファイル: responses.c プロジェクト: ser/mailfront
int response_ok(const response* r)
{
  return r == 0 || number_ok(r);
}