Lines Matching +full:64 +full:m

77 # define SMFS_INMSG		'M'	/* currently servicing a message */
105 if (bitnset(SMF_TEMPFAIL, m->mf_flags)) \
107 else if (bitnset(SMF_TEMPDROP, m->mf_flags)) \
109 else if (bitnset(SMF_REJECT, m->mf_flags)) \
171 if (tTd(64, 5)) \
195 ** Assumes 'm' is a milter structure for the current socket.
205 if (!SM_FD_OK_SELECT(m->mf_sock)) \
207 if (tTd(64, 5)) \
209 (routine), m->mf_name, m->mf_sock, \
214 m->mf_name, (routine), m->mf_sock, \
216 milter_error(m, e); \
223 SM_FD_SET(m->mf_sock, &fds); \
226 ret = select(m->mf_sock + 1, \
235 if (tTd(64, 5)) \
237 (routine), m->mf_name, (function)); \
241 m->mf_name, \
244 milter_error(m, e); \
249 if (tTd(64, 5)) \
251 m->mf_name, sm_errstring(save_errno)); \
256 m->mf_name, (routine), \
259 milter_error(m, e); \
263 if (SM_FD_ISSET(m->mf_sock, &fds)) \
265 if (tTd(64, 5)) \
267 (routine), m->mf_name); \
272 m->mf_name, (routine)); \
274 milter_error(m, e); \
287 ** m -- milter to read from.
298 milter_sysread(m, buf, sz, to, e, where) in milter_sysread() argument
299 struct milter *m; in milter_sysread()
324 if (tTd(64, 5))
326 m->mf_name,
332 m->mf_name,
335 milter_error(m, e);
343 len = read(m->mf_sock, buf + curl, sz - curl);
349 if (tTd(64, 5))
351 m->mf_name, (long) len,
356 m->mf_name, (long) len,
358 milter_error(m, e);
371 if (tTd(64, 5))
373 m->mf_name, (long) curl, (long) sz);
377 m->mf_name, (long) curl, (long) sz);
378 milter_error(m, e);
385 milter_read(m, cmd, rlen, to, e, where) in milter_read() argument
386 struct milter *m; in milter_read()
402 if (m->mf_sock < 0)
407 m->mf_name, where);
408 milter_error(m, e);
419 setsockopt(m->mf_sock, IPPROTO_TCP, TCP_CORK, (char *)&cork,
423 if (milter_sysread(m, data, sizeof(data), to, e, where) == NULL)
428 setsockopt(m->mf_sock, IPPROTO_TCP, TCP_CORK, (char *)&cork,
440 if (tTd(64, 5))
442 m->mf_name, where);
446 m->mf_name, where);
447 milter_error(m, e);
458 if (tTd(64, 25))
460 m->mf_name, (long) expl);
464 if (tTd(64, 5))
466 m->mf_name, (long) expl, where);
470 m->mf_name, (long) expl, where);
471 milter_error(m, e);
480 if (milter_sysread(m, buf, expl, to, e, where) == NULL)
486 if (tTd(64, 50))
488 m->mf_name, (int) expl, buf);
497 ** m -- milter to read from.
511 milter_write(m, cmd, buf, len, to, e, where) in milter_write() argument
512 struct milter *m; in milter_write()
536 if (tTd(64, 5))
539 m->mf_name, (long) len,
542 m->mf_name, str2prt(buf));
547 m->mf_name, (long) len, command);
548 milter_error(m, e);
551 if (m->mf_sock < 0)
556 m->mf_name);
557 milter_error(m, e);
561 if (tTd(64, 20))
563 m->mf_name, command, (long) len);
598 if (tTd(64, 50))
600 m->mf_name, (int) len, buf);
607 i = writev(m->mf_sock, vector, num_vectors);
612 if (tTd(64, 5))
614 m->mf_name, command, (long) i, (long) sl,
619 m->mf_name, command, (long) i, (long) sl,
621 milter_error(m, e);
635 ** m -- milter to connect to.
648 milter_open(m, parseonly, e) in milter_open() argument
649 struct milter *m; in milter_open()
663 if (SM_IS_EMPTY(m->mf_conn))
665 if (tTd(64, 5))
667 m->mf_name);
670 m->mf_name);
674 m->mf_name);
675 milter_error(m, e);
681 p = m->mf_conn;
705 m->mf_name);
706 milter_error(m, e);
732 if (tTd(64, 5))
734 m->mf_name, p);
737 m->mf_name, p);
741 m->mf_name, p);
742 milter_error(m, e);
762 if (tTd(64, 5))
764 m->mf_name, colon);
768 m->mf_name, colon);
772 m->mf_name, colon);
773 milter_error(m, e);
786 m->mf_name, colon);
792 if (tTd(64, 5))
794 m->mf_name, colon);
802 m->mf_name, colon);
807 m->mf_name, colon);
808 milter_error(m, e);
834 if (tTd(64, 5))
836 m->mf_name, colon);
839 m->mf_name, colon);
843 m->mf_name, colon);
844 milter_error(m, e);
853 if (tTd(64, 5))
855 m->mf_name, colon);
858 m->mf_name, colon);
862 m->mf_name, colon);
863 milter_error(m, e);
872 if (tTd(64, 5))
874 m->mf_name, colon);
878 m->mf_name, colon);
882 m->mf_name, colon);
883 milter_error(m, e);
929 if (tTd(64, 5))
931 m->mf_name, at);
934 m->mf_name, at);
938 m->mf_name, at);
939 milter_error(m, e);
945 if (tTd(64, 5))
947 m->mf_name, at);
950 m->mf_name, at);
954 m->mf_name, at);
955 milter_error(m, e);
965 if (tTd(64, 5))
967 m->mf_name, at);
971 m->mf_name, at);
975 m->mf_name, at);
976 milter_error(m, e);
1003 if (tTd(64, 5))
1005 m->mf_name, at,
1009 m->mf_name, at, hp->h_addrtype);
1013 m->mf_name, at,
1015 milter_error(m, e);
1026 if (tTd(64, 5))
1028 m->mf_name);
1030 syserr("X%s: unknown socket protocol", m->mf_name);
1034 m->mf_name);
1035 milter_error(m, e);
1042 m->mf_state = SMFS_READY;
1051 if (m->mf_state != SMFS_READY &&
1052 m->mf_state != SMFS_CLOSED)
1055 if (tTd(64, 1))
1057 m->mf_name, (char) m->mf_state);
1058 milter_error(m, e);
1073 if (tTd(64, 5))
1075 m->mf_name,
1080 m->mf_name, sm_errstring(save_errno));
1081 milter_error(m, e);
1094 if (m->mf_timeout[SMFTO_CONNECT] > 0)
1095 ev = sm_setevent(m->mf_timeout[SMFTO_CONNECT],
1111 if (tTd(64, 5))
1113 m->mf_name, at, sm_errstring(save_errno));
1117 m->mf_name, at, sm_errstring(save_errno));
1143 if (tTd(64, 5))
1145 m->mf_name, at,
1150 m->mf_name, at,
1152 milter_error(m, e);
1162 if (tTd(64, 5))
1164 m->mf_name, sm_errstring(save_errno));
1168 m->mf_name, sm_errstring(save_errno));
1170 milter_error(m, e);
1177 m->mf_state = SMFS_OPEN;
1189 setsockopt(m->mf_sock, IPPROTO_TCP, TCP_NODELAY,
1226 struct milter *m; local
1242 m = (struct milter *) xalloc(sizeof(*m));
1243 memset((char *) m, '\0', sizeof(*m));
1244 m->mf_name = newstr(line);
1245 m->mf_state = SMFS_READY;
1246 m->mf_sock = -1;
1247 m->mf_timeout[SMFTO_CONNECT] = (time_t) 300;
1248 m->mf_timeout[SMFTO_WRITE] = (time_t) 10;
1249 m->mf_timeout[SMFTO_READ] = (time_t) 10;
1250 m->mf_timeout[SMFTO_EOM] = (time_t) 300;
1252 m->mf_mta_prot_version = SMFI_PROT_VERSION;
1253 m->mf_mta_prot_flags = SMFI_CURR_PROT;
1254 m->mf_mta_actions = SMFI_CURR_ACTS;
1272 syserr("X%s: `=' expected", m->mf_name);
1274 SM_FREE(m);
1288 m->mf_conn = NULL;
1290 m->mf_conn = newstr(p);
1297 setbitn(bitidx(*p), m->mf_flags);
1302 milter_parse_timeouts(p, m);
1307 m->mf_mta_actions = strtoul(p, NULL, 0);
1310 m->mf_mta_prot_flags = strtoul(p, NULL, 0);
1313 m->mf_mta_prot_version = strtoul(p, NULL, 0);
1319 m->mf_name, fcode);
1326 (void) milter_open(m, true, CurEnv);
1329 s = stab(m->mf_name, ST_MILTER, ST_ENTER);
1331 syserr("X%s: duplicate filter definition", m->mf_name);
1334 s->s_milter = m;
1335 m->mf_idx = ++idx;
1409 ** m -- milter to set.
1416 milter_parse_timeouts(spec, m) in milter_parse_timeouts() argument
1418 struct milter *m;
1440 syserr("X%s, T=: `:' expected", m->mf_name);
1470 if (tTd(64, 5))
1472 m->mf_name, fcode);
1474 m->mf_name, fcode);
1479 m->mf_timeout[tcode] = convtime(p, 's');
1480 if (tTd(64, 5))
1482 m->mf_name, fcode,
1483 (u_long) m->mf_timeout[tcode]);
1594 if (tTd(37, 2) || tTd(64, 5))
1621 if (tTd(37, 2) || tTd(64,5))
1626 if (tTd(37, 2) || tTd(64,5))
1792 ** m -- milter structure of filter to close down.
1800 milter_quit_filter(m, e) in milter_quit_filter() argument
1801 struct milter *m; in milter_quit_filter()
1804 if (tTd(64, 10))
1805 sm_dprintf("milter_quit_filter(%s)\n", m->mf_name);
1808 m->mf_name);
1811 if (m->mf_state == SMFS_ERROR)
1814 if (m->mf_sock < 0 ||
1815 m->mf_state == SMFS_CLOSED ||
1816 m->mf_state == SMFS_READY)
1818 m->mf_sock = -1;
1819 m->mf_state = SMFS_CLOSED;
1823 (void) milter_write(m, SMFIC_QUIT, (char *) NULL, 0,
1824 m->mf_timeout[SMFTO_WRITE], e, "quit_filter");
1825 if (m->mf_sock >= 0)
1827 (void) close(m->mf_sock);
1828 m->mf_sock = -1;
1830 if (m->mf_state != SMFS_ERROR)
1831 m->mf_state = SMFS_CLOSED;
1838 ** m -- milter structure of filter to abort.
1846 milter_abort_filter(m, e) in milter_abort_filter() argument
1847 struct milter *m; in milter_abort_filter()
1850 if (tTd(64, 10))
1851 sm_dprintf("milter_abort_filter(%s)\n", m->mf_name);
1854 m->mf_name);
1856 if (m->mf_sock < 0 ||
1857 m->mf_state != SMFS_INMSG)
1860 (void) milter_write(m, SMFIC_ABORT, (char *) NULL, 0,
1861 m->mf_timeout[SMFTO_WRITE], e, "abort_filter");
1862 if (m->mf_state != SMFS_ERROR)
1863 m->mf_state = SMFS_DONE;
1870 ** m -- milter to send macros to.
1898 milter_send_macros(m, macros, cmd, e) in milter_send_macros() argument
1899 struct milter *m; in milter_send_macros()
1957 if (tTd(64, 10))
1959 m->mf_name, command, macros[i], exp);
1966 (void) milter_write(m, SMFIC_MACRO, buf, s,
1967 m->mf_timeout[SMFTO_WRITE], e, "send_macros");
1975 ** m -- current milter filter
1987 milter_send_command(m, cmd, data, sz, e, state, where) in milter_send_command() argument
1988 struct milter *m; in milter_send_command()
2005 if (tTd(64, 10))
2007 m->mf_name, (char) command, (long) sz);
2090 if (tTd(64, 10))
2092 m->mf_name, skipflag, m->mf_pflags);
2095 if (skipflag != 0 && bitset(skipflag, m->mf_pflags))
2099 (void) milter_write(m, command, data, sz,
2100 m->mf_timeout[SMFTO_WRITE], e, where);
2101 if (m->mf_state == SMFS_ERROR)
2108 if (norespflag != 0 && bitset(norespflag, m->mf_pflags))
2112 response = milter_read(m, &rcmd, &rlen,
2113 m->mf_timeout[SMFTO_READ], e, where);
2114 if (m->mf_state == SMFS_ERROR)
2120 if (tTd(64, 10))
2122 m->mf_name, (char) rcmd);
2131 m->mf_name, action, response);
2139 m->mf_name, action);
2147 m->mf_name, action);
2155 m->mf_name, action);
2163 m->mf_state = SMFS_CLOSABLE;
2165 m->mf_state = SMFS_DONE;
2169 m->mf_name, action);
2175 m->mf_state = SMFS_INMSG;
2179 m->mf_name, action);
2186 m->mf_name, action);
2187 m->mf_state = SMFS_SKIP;
2195 m->mf_name, action, rcmd);
2196 milter_error(m, e); /* NO ERROR CHECK? */
2241 if (tTd(64, 10))
2248 struct milter *m = InputFilters[i]; local
2251 if (m->mf_state == SMFS_ERROR)
2258 if (m->mf_sock < 0 ||
2259 (m->mf_state != SMFS_OPEN && m->mf_state != SMFS_INMSG))
2267 if ((m->mf_lflags & MI_LFLAGS_SYM(stage)) != 0)
2268 idx = m->mf_idx;
2277 milter_send_macros(m, macros, command, e);
2278 if (m->mf_state == SMFS_ERROR)
2294 ** where == "rcpt" && m->mf_pflags & SMFIP_RCPT_REJ != 0
2300 (m->mf_pflags & SMFIP_RCPT_REJ) == 0))
2303 response = milter_send_command(m, command, data, sz, e, state,
2311 m->mf_name, command, (int) (curtime() - tn));
2323 milter_getsymlist(m, buf, rlen, offset) in milter_getsymlist() argument
2324 struct milter *m; in milter_getsymlist()
2332 SM_ASSERT(m != NULL);
2359 SM_ASSERT(m->mf_idx > 0 && m->mf_idx < MAXFILTERS);
2360 macros = MilterMacros[i][m->mf_idx];
2361 m->mf_lflags |= MI_LFLAGS_SYM(i);
2363 r = milter_set_macros(m->mf_name, macros, buf + offset,
2367 if (tTd(64, 5))
2369 m->mf_name, SM_M_MACRO_NAME(i),
2386 ** m -- milter filter structure.
2395 milter_negotiate(m, e, milters) in milter_negotiate() argument
2396 struct milter *m; in milter_negotiate()
2408 if (m->mf_sock < 0 || m->mf_state != SMFS_OPEN)
2413 m->mf_name);
2414 milter_error(m, e);
2419 mta_prot_vers = m->mf_mta_prot_version;
2420 mta_prot_flags = m->mf_mta_prot_flags;
2421 mta_actions = m->mf_mta_actions;
2442 (void) milter_write(m, SMFIC_OPTNEG, data, sizeof(data),
2443 m->mf_timeout[SMFTO_WRITE], e, "negotiate");
2445 if (m->mf_state == SMFS_ERROR)
2448 if (tTd(64, 5))
2450 m->mf_name, (unsigned long) ntohl(fvers),
2454 response = milter_read(m, &rcmd, &rlen, m->mf_timeout[SMFTO_READ], e,
2456 if (m->mf_state == SMFS_ERROR)
2464 if (tTd(64, 5))
2466 m->mf_name, rcmd, SMFIC_OPTNEG);
2470 m->mf_name, rcmd, SMFIC_OPTNEG);
2472 milter_error(m, e);
2479 if (tTd(64, 5))
2481 m->mf_name);
2485 m->mf_name);
2487 milter_error(m, e);
2497 if (tTd(64, 5))
2499 m->mf_name);
2503 m->mf_name);
2505 milter_error(m, e);
2514 m->mf_fvers = ntohl(fvers);
2515 m->mf_fflags = ntohl(fflags);
2516 m->mf_pflags = ntohl(pflags);
2519 if (m->mf_fvers == 1 ||
2520 m->mf_fvers > SMFI_VERSION)
2522 if (tTd(64, 5))
2524 m->mf_name, m->mf_fvers, SMFI_VERSION);
2528 m->mf_name, m->mf_fvers, SMFI_VERSION);
2529 milter_error(m, e);
2534 if ((m->mf_fflags & mta_actions) != m->mf_fflags)
2536 if (tTd(64, 5))
2538 m->mf_name, m->mf_fflags,
2543 m->mf_name, m->mf_fflags,
2545 milter_error(m, e);
2555 (unsigned long) MilterMaxDataSize, m->mf_name, sz); \
2560 if (bitset(SMFIP_MDS_1M, m->mf_pflags))
2565 else if (bitset(SMFIP_MDS_256K, m->mf_pflags))
2573 ** - milter requested 64K
2580 m->mf_pflags &= ~SMFI_INTERNAL;
2584 if ((m->mf_pflags & mta_prot_flags) != m->mf_pflags)
2586 if (tTd(64, 5))
2588 m->mf_name, m->mf_pflags,
2593 m->mf_name, m->mf_pflags,
2595 milter_error(m, e);
2599 if (m->mf_fvers <= 2)
2600 m->mf_pflags |= SMFIP_NOUNKNOWN;
2601 if (m->mf_fvers <= 3)
2602 m->mf_pflags |= SMFIP_NODATA;
2606 milter_getsymlist(m, response, rlen, MILTER_OPTLEN);
2609 if (bitset(SMFIF_DELRCPT, m->mf_fflags))
2611 if (!bitset(SMFIP_NORCPT, m->mf_pflags) &&
2612 !bitset(SMFIP_NR_RCPT, m->mf_pflags))
2615 if (tTd(64, 5))
2617 m->mf_name, m->mf_fvers, m->mf_fflags, m->mf_pflags);
2647 struct milter *m = InputFilters[i]; local
2649 if (m->mf_state == SMFS_CLOSABLE)
2650 milter_quit_filter(m, e);
2658 ** m -- the broken filter.
2666 milter_error(m, e) in milter_error() argument
2667 struct milter *m; in milter_error()
2675 if (m->mf_sock >= 0)
2677 (void) close(m->mf_sock);
2678 m->mf_sock = -1;
2680 m->mf_state = SMFS_ERROR;
2684 m->mf_name);
2691 ** m -- current filter.
2700 milter_headers(m, e, state) in milter_headers() argument
2701 struct milter *m; in milter_headers()
2710 m->mf_name);
2729 if (tTd(64, 10))
2734 m->mf_name, h->h_field);
2736 if (bitset(SMFIP_HDR_LEADSPC, m->mf_pflags)
2760 response = milter_send_command(m, SMFIC_HEADER, buf,
2763 if (m->mf_state == SMFS_ERROR ||
2764 m->mf_state == SMFS_DONE ||
2770 m->mf_name);
2778 ** m -- current filter.
2787 milter_body(m, e, state) in milter_body() argument
2788 struct milter *m; in milter_body()
2799 if (tTd(64, 10))
2814 m->mf_name);
2848 response = milter_send_command(m, SMFIC_BODY, buf,
2859 if (m->mf_state == SMFS_ERROR ||
2860 m->mf_state == SMFS_DONE ||
2861 m->mf_state == SMFS_SKIP ||
2872 m->mf_state == SMFS_SKIP)
2889 m->mf_state != SMFS_ERROR &&
2890 m->mf_state != SMFS_DONE &&
2891 m->mf_state != SMFS_SKIP &&
2895 response = milter_send_command(m, SMFIC_BODY, buf, bp - buf,
2901 m->mf_name);
2902 if (m->mf_state == SMFS_SKIP)
2905 m->mf_state = SMFS_READY;
2950 ** m -- current filter.
2960 milter_addheader(m, response, rlen, e) in milter_addheader() argument
2961 struct milter *m; in milter_addheader()
2970 if (tTd(64, 10))
2976 if (tTd(64, 10))
2983 if (tTd(64, 10))
2995 if (tTd(64, 10))
3002 if (tTd(64, 10))
3023 if (tTd(64, 10))
3029 m->mf_name, h->h_field, mh_value);
3030 if (bitset(SMFIP_HDR_LEADSPC, m->mf_pflags))
3041 if (tTd(64, 10))
3046 m->mf_name, response, mh_value);
3048 !bitset(SMFIP_HDR_LEADSPC, m->mf_pflags));
3057 ** m -- current filter.
3072 milter_insheader(m, response, rlen, e) in milter_insheader() argument
3073 struct milter *m; in milter_insheader()
3082 if (tTd(64, 10))
3088 if (tTd(64, 10))
3095 if (tTd(64, 10))
3110 if (tTd(64, 10))
3117 if (tTd(64, 10))
3125 if (tTd(64, 10))
3130 m->mf_name, idx, field, val);
3134 !bitset(SMFIP_HDR_LEADSPC, m->mf_pflags));
3142 ** m -- current filter.
3152 milter_changeheader(m, response, rlen, e) in milter_changeheader() argument
3153 struct milter *m; in milter_changeheader()
3163 if (tTd(64, 10))
3169 if (tTd(64, 10))
3176 if (tTd(64, 10))
3191 if (tTd(64, 10))
3198 if (tTd(64, 10))
3240 if (tTd(64, 10))
3245 , m->mf_name, field);
3250 if (tTd(64, 10))
3255 , m->mf_name, field, mh_value);
3257 !bitset(SMFIP_HDR_LEADSPC, m->mf_pflags));
3263 if (tTd(64, 10))
3288 m->mf_name,
3297 m->mf_name,
3335 if (bitset(SMFIP_HDR_LEADSPC, m->mf_pflags))
3376 if (tTd(64, 10))
3409 if (tTd(64, 10))
3443 if (tTd(64, 10))
3449 if (tTd(64, 10))
3457 if (tTd(64, 10))
3463 if (tTd(64, 10))
3471 if (tTd(64, 10))
3522 if (tTd(64, 10))
3528 if (tTd(64, 10))
3533 if (tTd(64, 10))
3542 if (tTd(64, 10))
3597 if (tTd(64, 10))
3603 if (tTd(64, 10))
3611 if (tTd(64, 10))
3617 if (tTd(64, 10))
3650 if (tTd(64, 10))
3656 if (tTd(64, 10))
3664 if (tTd(64, 10))
3670 if (tTd(64, 10))
3704 if (tTd(64, 10))
3858 if (tTd(64, 10))
3873 struct milter *m = InputFilters[i]; local
3875 m->mf_sock = milter_open(m, false, e);
3876 if (m->mf_state == SMFS_ERROR)
3882 if (m->mf_sock < 0 ||
3883 milter_negotiate(m, e, milters) < 0 ||
3884 m->mf_state == SMFS_ERROR)
3886 if (tTd(64, 5))
3888 m->mf_name,
3889 m->mf_sock < 0 ? "open" :
3894 m->mf_name,
3895 m->mf_sock < 0 ? "open" :
3899 milter_error(m, e);
3906 m->mf_name,
3907 m->mf_sock < 0 ? "open" : "negotiate");
3952 if (tTd(64, 10))
4085 if (tTd(64, 10))
4091 struct milter *m = InputFilters[i]; local
4093 switch (m->mf_state)
4097 milter_abort_filter(m, e);
4102 m->mf_state = SMFS_OPEN;
4136 if (tTd(64, 10))
4157 struct milter *m = InputFilters[i]; local
4159 switch (m->mf_state)
4163 milter_abort_filter(m, e);
4168 m->mf_state = SMFS_OPEN;
4237 if (tTd(64, 10))
4299 if (tTd(64, 10))
4325 if (m->mf_state == SMFS_ERROR && *state == SMFIR_CONTINUE) \
4330 m->mf_state == SMFS_DONE || \
4331 m->mf_state == SMFS_ERROR) \
4333 if (m->mf_state != SMFS_ERROR) \
4334 m->mf_state = SMFS_DONE; \
4339 m->mf_state = SMFS_DONE; \
4360 if (tTd(64, 10))
4376 struct milter *m = InputFilters[i]; local
4394 if (m->mf_state == SMFS_ERROR)
4401 if (m->mf_sock < 0 ||
4402 (m->mf_state != SMFS_OPEN && m->mf_state != SMFS_INMSG))
4405 m->mf_state = SMFS_INMSG;
4408 if (!bitset(SMFIP_NOHDRS, m->mf_pflags))
4410 response = milter_headers(m, e, state);
4415 if (!bitset(SMFIP_NOEOH, m->mf_pflags))
4417 if (tTd(64, 10))
4420 if ((m->mf_lflags & MI_LFLAGS_SYM(SMFIM_EOH)) != 0)
4421 idx = m->mf_idx;
4429 milter_send_macros(m, macros, SMFIC_EOH, e);
4434 response = milter_send_command(m, SMFIC_EOH, NULL, 0,
4440 if (!bitset(SMFIP_NOBODY, m->mf_pflags) &&
4444 response = milter_body(m, e, state);
4448 if ((m->mf_lflags & MI_LFLAGS_SYM(SMFIM_EOH)) != 0)
4449 idx = m->mf_idx;
4456 milter_send_macros(m, macros, SMFIC_BODYEOB, e);
4461 (void) milter_write(m, SMFIC_BODYEOB, NULL, 0,
4462 m->mf_timeout[SMFTO_WRITE], e, "eom");
4471 if (m->mf_timeout[SMFTO_EOM] > 0 &&
4472 curtime() - eomsent >= m->mf_timeout[SMFTO_EOM])
4474 if (tTd(64, 5))
4476 m->mf_name);
4480 m->mf_name);
4481 milter_error(m, e);
4486 response = milter_read(m, &rcmd, &rlen,
4487 m->mf_timeout[SMFTO_READ], e,
4489 if (m->mf_state == SMFS_ERROR)
4492 if (tTd(64, 10))
4494 m->mf_name, (char) rcmd);
4502 m->mf_name, response);
4504 m->mf_state = SMFS_DONE;
4510 m->mf_name);
4512 m->mf_state = SMFS_DONE;
4518 m->mf_name);
4520 m->mf_state = SMFS_DONE;
4526 m->mf_name);
4528 m->mf_state = SMFS_DONE;
4538 m->mf_state = SMFS_DONE;
4545 if (!bitset(SMFIF_QUARANTINE, m->mf_fflags))
4550 m->mf_name);
4557 m->mf_name, response);
4565 if (!bitset(SMFIF_ADDHDRS, m->mf_fflags))
4570 m->mf_name);
4572 milter_addheader(m, response, rlen, e);
4576 if (!bitset(SMFIF_ADDHDRS, m->mf_fflags))
4581 m->mf_name);
4583 milter_insheader(m, response, rlen, e);
4587 if (!bitset(SMFIF_CHGHDRS, m->mf_fflags))
4592 m->mf_name);
4594 milter_changeheader(m, response, rlen, e);
4598 if (!bitset(SMFIF_CHGFROM, m->mf_fflags))
4603 m->mf_name);
4605 milter_chgfrom(response, rlen, e, m->mf_name);
4609 if (!bitset(SMFIF_ADDRCPT, m->mf_fflags))
4614 m->mf_name);
4616 milter_addrcpt(response, rlen, e, m->mf_name);
4620 if (!bitset(SMFIF_ADDRCPT_PAR, m->mf_fflags))
4625 m->mf_name);
4627 milter_addrcpt_par(response, rlen, e, m->mf_name);
4631 if (!bitset(SMFIF_DELRCPT, m->mf_fflags))
4636 m->mf_name);
4638 milter_delrcpt(response, rlen, e, m->mf_name);
4642 if (!bitset(SMFIF_MODBODY, m->mf_fflags))
4647 m->mf_name);
4668 e, m->mf_name) < 0)
4679 m->mf_name, rcmd);
4680 milter_error(m, e);
4689 if (m->mf_state == SMFS_ERROR)
4696 milter_replbody(NULL, 0, !replbody, e, m->mf_name);
4700 if (m->mf_state == SMFS_ERROR)
4776 if (tTd(64, 10))
4799 if (tTd(64, 10))
4822 if (tTd(64, 10))
4827 struct milter *m = InputFilters[i]; local
4830 if (m->mf_sock < 0 || m->mf_state != SMFS_INMSG)
4833 milter_abort_filter(m, e);