20#define WHO "srsreverse"
43static int srserror_str(
int code) {
70 stralloc cookie = {0};
72 char srsrecipient[512];
79 logmsg(
WHO,100,FATAL,
"RECIPIENT not set");
80 dtline = env_get(
"DTLINE");
82 logmsg(
WHO,100,FATAL,
"DTLINE not set");
83 host = env_get(
"HOST");
85 logmsg(
WHO,100,FATAL,
"HOST not set");
99 for (i = 0; i <=
j; ++i)
100 if ((i == 0) || (
host[i] ==
'.')) {
138 if (separator ==
'-' || separator ==
'+' || separator ==
'=') {
143 for (
j = 0, i = 0;
j < cookie.len;
j++) {
144 if (cookie.s[
j] ==
' ' || cookie.s[
j] ==
'\0' ) {
149 if (cookie.s[i] ==
' ') {
j++;
continue; }
158 logmsg(
WHO,111,FATAL,
"unable to fork: ");
160 if (buffer_copy(&
bo,&
bi) != 0)
161 logmsg(
WHO,111,FATAL,
"unable to read message: ");
169 if (*qqx) logmsg(
WHO,*qqx ==
'D' ? 100 : 111,FATAL,qqx + 1);
170 logmsg(
WHO,0,LOG,B(srsrecipient,
": qp ",
num));
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 *)
int srs_set_separator(srs_t *srs, char value)
int srs_add_secret(srs_t *, const char *)
int srs_reverse(srs_t *, char *, int, const char *)
const char * srs_strerror(int)
ssize_t mywrite(int fd, char *buf, int len)
char inbuf[BUFFER_INSIZE]
struct constmap mapvdomains
struct constmap mapsrsdomains