20#define WHO "srsreverse"
74 logmsg(
WHO,100,FATAL,
"RECIPIENT not set");
75 sender = env_get(
"SENDER");
77 logmsg(
WHO,100,FATAL,
"SENDER not set");
78 dtline = env_get(
"DTLINE");
80 logmsg(
WHO,100,FATAL,
"DTLINE not set");
81 host = env_get(
"HOST");
83 logmsg(
WHO,100,FATAL,
"HOST not set");
97 for (i = 0; i <=
j; ++i)
98 if ((i == 0) || (
host[i] ==
'.')) {
136 if (separator ==
'-' || separator ==
'+' || separator ==
'=') {
140 for (
j = 0, i = 0;
j <
cookie.len;
j++) {
145 if (
cookie.s[i] ==
' ') {
j++;
continue; }
152 logmsg(
WHO,99,INFO,B(
"unable to reverse and mail bounced to: ",
sender));
break;
157 logmsg(
WHO,111,FATAL,
"unable to fork: ");
159 if (buffer_copy(&
bo,&
bi) != 0)
160 logmsg(
WHO,111,FATAL,
"unable to read message: ");
168 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 *)
const char * srs_errorstr(int)
int srs_reverse(srs_ctx *, stralloc *, char *)
#define SRS_ENOTSRSADDRESS
struct constmap mapvdomains
char outbuf[BUFSIZE_LINE]
ssize_t mywrite(int fd, char *buf, size_t len)
struct constmap mapsrsdomains