20#define WHO "srsforward"
59int main(
int argc,
char *
const argv[])
69 int alwaysrewrite = 0;
74 sender = env_get(
"NEWSENDER");
76 logmsg(
WHO,100,FATAL,
"NEWSENDER not set");
77 host = env_get(
"HOST");
79 logmsg(
WHO,100,FATAL,
"HOST not set");
80 dtline = env_get(
"DTLINE");
82 logmsg(
WHO,100,FATAL,
"DTLINE not set");
98 else alwaysrewrite = 1;
130 while ((opt = getoptb(argc,(
char **)argv,
"pP")) != opteof)
146 if (separator ==
'-' || separator ==
'+' || separator ==
'=')
163 logmsg(
WHO,111,FATAL,
"unable to fork: ");
165 if (buffer_copy(&
bo,&
bi) != 0)
166 logmsg(
WHO,111,FATAL,
"unable to read message: ");
174 if (*qqx) logmsg(
WHO,*qqx ==
'D' ? 100 : 111,FATAL,qqx + 1);
int constmap_init(struct constmap *cm, char *s, int len, int flagcolon)
int control_readfile(stralloc *sa, char *fn, int flagme)
int stralloc_copys(stralloc *, char const *)
void qmail_to(struct qmail *, char *)
void qmail_from(struct qmail *, char *)
void qmail_put(struct qmail *, char *, int)
char * qmail_close(struct qmail *)
unsigned long qmail_qp(struct qmail *)
void qmail_puts(struct qmail *, char *)
int qmail_open(struct qmail *)
char outbuf[BUFSIZE_LINE]
ssize_t mywrite(int fd, char *buf, size_t len)
struct constmap mapsrsdomains
const char * srs_errorstr(int)
int srs_forward(srs_ctx *, stralloc *, const char *, const char *)