11static char *binqqargs[2] = { 0, 0 } ;
13static void setup_qqargs()
16 binqqargs[0] = env_get(
"QMAILQUEUE");
18 binqqargs[0] =
"bin/qmail-queue";
28 if (pipe(pim) == -1)
return -1;
29 if (pipe(pie) == -1) { close(pim[0]); close(pim[1]);
return -1; }
31 switch (
qq->
pid = vfork()) {
33 close(pim[0]); close(pim[1]);
34 close(pie[0]); close(pie[1]);
39 if (fd_move(0,pim[0]) == -1) _exit(120);
40 if (fd_move(1,pie[0]) == -1) _exit(120);
42 execv(*binqqargs,binqqargs);
46 qq->
fdm = pim[1]; close(pim[0]);
47 qq->
fde = pie[1]; close(pie[0]);
100 return "Zqq waitpid surprise (#4.3.0)";
101 if (wait_crashed(wstat))
102 return "Zqq crashed (#4.3.0)";
103 exitcode = wait_exitcode(wstat);
107 case 11:
return "Denvelope address too long for qq (#5.1.3)";
108 case 31:
return "Dmail server permanently rejected message (#5.3.0)";
109 case 32:
return "Vmail server does not accept message (#5.3.0)";
110 case 33:
return "Smail server does not accept message (#5.3.0)";
111 case 34:
return "Amail server does not accept message (#5.3.0)";
112 case 51:
return "Zqq out of memory (#4.3.0)";
113 case 52:
return "Zqq timeout (#4.3.0)";
114 case 53:
return "Zqq write error or disk full (#4.3.0)";
116 case 54:
return "Zqq read error (#4.3.0)";
117 case 55:
return "Zqq unable to read configuration (#4.3.0)";
118 case 56:
return "Zqq trouble making network connection (#4.3.0)";
119 case 61:
return "Zqq trouble in home directory (#4.3.0)";
124 case 62:
return "Zqq trouble creating files in queue (#4.3.0)";
125 case 71:
return "Zmail server temporarily rejected message (#4.3.0)";
126 case 72:
return "Zconnection to mail server timed out (#4.4.1)";
127 case 73:
return "Zconnection to mail server rejected (#4.4.1)";
128 case 74:
return "Zcommunication with mail server failed (#4.4.2)";
130 case 81:
return "Zqq internal bug (#4.3.0)";
131 case 120:
return "Zunable to exec qq (#4.3.0)";
133 if ((exitcode >= 11) && (exitcode <= 40))
134 return "Dqq permanent problem (#5.3.0)";
135 return "Zqq temporary problem (#4.3.0)";
void qmail_to(struct qmail *qq, char *s)
void qmail_from(struct qmail *qq, char *s)
char * qmail_close(struct qmail *qq)
int qmail_open(struct qmail *qq)
void qmail_fail(struct qmail *qq)
unsigned long qmail_qp(struct qmail *qq)
void qmail_put(struct qmail *qq, char *s, int len)
void qmail_puts(struct qmail *qq, char *s)