Beispiel #1
0
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);
}
Beispiel #2
0
// 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);
}
Beispiel #3
0
int response_ok(const response* r)
{
  return r == 0 || number_ok(r);
}