Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 18bba2e7 authored by rswindell's avatar rswindell

Fix a couple of issues with external mail processors:

- Since rev 1.556, mailproc_to_match[] would only ever contain one mail
  processor (index) value, even if the RCPT TO address matched multiple
  mail processor "To" keys in mailproc.ini, so only the first-matching
  mail processor (with a "To" key) would be executed for the msg.
- mailproc_match, meaning the destination was a non-passthrough
  external mail processor, in which case the destination (RCPT TO) address
  may *not* match a valid local user account, would be set for *passthru*
  mail processors potentially resulting in the following error (and an
  undelivered mail message): !SMTP can't deliver mail to user #0
  only set mailproc_match to a valid mail proc index if the recipient matches a
  non-passthru mail processor.
parent 3886bf3a
......@@ -4445,7 +4445,8 @@ static void smtp_thread(void* arg)
lprintf(LOG_DEBUG,"%04d SMTP NAME ALIAS: %s (for %s)"
,socket,p,rcpt_addr);
/* Check if message is to be processed by an external mail processor */
/* Check if message is to be processed by one or more external mail processors */
mailproc_match = INT_MAX; // no match, by default
for(i=0;i<mailproc_count;i++) {
if(!mailproc_list[i].process_dnsbl && dnsbl_result.s_addr)
......@@ -4459,10 +4460,10 @@ static void smtp_thread(void* arg)
if(findstr_in_list(p, mailproc_list[i].to) || findstr_in_list(rcpt_addr, mailproc_list[i].to)) {
mailproc_to_match[i]=TRUE;
break;
if(!mailproc_list[i].passthru)
mailproc_match = i;
}
}
mailproc_match=i;
if(!strnicmp(p,"sub:",4)) { /* Post on a sub-board */
p+=4;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment