-- this should fix sending mail remotely which was broken. hopefully soon we can re-work this section of code

This commit is contained in:
pfelt
2008-01-21 22:20:10 +00:00
parent 2b25b587cd
commit 061df4c051
2 changed files with 16 additions and 5 deletions
+15 -4
View File
@@ -907,6 +907,7 @@ StartOver:
/* alias this user */
unsigned char buffer[1024]; /* FIXME: is this too big? */
unsigned char *addrptr;
unsigned char *flags = strchr(ptr2+1,' '); /* the original flags */
int cnt;
aliasing(cur+1, &cnt, buffer);
@@ -916,14 +917,24 @@ StartOver:
addrptr++;
switch(atoi(buffer)) {
case 1000:
/* this is a local user, change the envelope to reflect that */
fprintf(newFH, QUEUES_RECIP_LOCAL"%s %s\r\n", addrptr, cur+1);
/* this is a local user, change the envelope to reflect that
* in this case ptr2+1 is the orecip which will also include the flags */
fprintf(newFH, QUEUES_RECIP_LOCAL"%s %s\r\n", addrptr, ptr2+1);
break;
case 1002:
fprintf(newFH, QUEUES_RECIP_REMOTE"%s %s\r\n", addrptr, cur+1);
/* in this case ptr2+1 is the orecip which will also contain the flags */
fprintf(newFH, QUEUES_RECIP_REMOTE"%s %s\r\n", addrptr, ptr2+1);
break;
default:
fprintf(newFH, "%c%s %s %d\r\n", *cur, addrptr, cur+1, DSN_FAILURE);
/* in this case we need to chop the flags off so that we can replace them
* with DSN_FAILURE */
if (flags) {
*flags = '\0';
}
fprintf(newFH, "%c%s %s %d\r\n", *cur, addrptr, ptr2+1, DSN_FAILURE);
if (flags) {
*flags = ' ';
}
break;
}
if (ptr) {
+1 -1
View File
@@ -679,7 +679,7 @@ XplServiceMain(int argc, char *argv[])
/* Initialize the Bongo libraries */
startupOpts = BA_STARTUP_CONNIO | BA_STARTUP_NMAP | BA_STARTUP_MSGLIB | BA_STARTUP_MSGAUTH;
ccode = BongoAgentInit(&Agent.agent, AGENT_NAME, MSGSRV_AGENT_QUEUE, DEFAULT_CONNECTION_TIMEOUT, startupOpts);
ccode = BongoAgentInit(&Agent.agent, AGENT_NAME, DEFAULT_CONNECTION_TIMEOUT, startupOpts);
if (ccode == -1) {
Log(LOG_ERROR, "Initialization failed exiting.");
return -1;