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, ¶ms)) == 0) resp = &resp_accepted_recip; if (number_ok(resp)) saw_rcpt = 1; } return respond(resp); }
// 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, ¶ms)) == 0) resp = &resp_accepted_sender; if (number_ok(resp)) { saw_mail = 1; } } return respond(resp); }
int response_ok(const response* r) { return r == 0 || number_ok(r); }