address is lowercased to start with, unless it begins with
"*", which it does for error messages. */
address is lowercased to start with, unless it begins with
"*", which it does for error messages. */
-dest_item *find_dest(queue_item *q, uschar *name, int action, BOOL caseless)
+dest_item *
+find_dest(queue_item *q, uschar *name, int action, BOOL caseless)
Ustrcpy(node->name, name);
node->data.ptr = NULL;
(void)tree_insertnode(root, node);
Ustrcpy(node->name, name);
node->data.ptr = NULL;
(void)tree_insertnode(root, node);
we can recover the store into which the header is read. All data read by
spool_read_header that is to be preserved is copied into malloc store. */
we can recover the store into which the header is read. All data read by
spool_read_header that is to be preserved is copied into malloc store. */
message_size = 0;
message_subdir[0] = dir_char;
sprintf(CS buffer, "%s-H", name);
message_size = 0;
message_subdir[0] = dir_char;
sprintf(CS buffer, "%s-H", name);
struct stat statbuf;
sprintf(CS big_buffer, "%s/input/%s", spool_directory, buffer);
if (Ustat(big_buffer, &statbuf) == 0)
struct stat statbuf;
sprintf(CS big_buffer, "%s/input/%s", spool_directory, buffer);
if (Ustat(big_buffer, &statbuf) == 0)
/* If a lot of messages have been removed at the bottom, we may not
have got the index all filled in yet. Make sure all the pointers
are legal. */
while (indexptr < queue_index_size - 1)
/* If a lot of messages have been removed at the bottom, we may not
have got the index all filled in yet. Make sure all the pointers
are legal. */
while (indexptr < queue_index_size - 1)
/* Get the contents of the header file; if any problem, just give up.
Arrange to recover the dynamic store afterwards. */
/* Get the contents of the header file; if any problem, just give up.
Arrange to recover the dynamic store afterwards. */
sprintf(CS buffer, "%s-H", p->name);
if (spool_read_header(buffer, FALSE, TRUE) != spool_read_OK)
{
sprintf(CS buffer, "%s-H", p->name);
if (spool_read_header(buffer, FALSE, TRUE) != spool_read_OK)
{
been delivered, and removing visible names. In the nonrecipients tree,
domains are lower cased. */
been delivered, and removing visible names. In the nonrecipients tree,
domains are lower cased. */
- if (node == NULL)
- {
- uschar temp[256];
- uschar *rr = temp;
- Ustrcpy(temp, r);
- while (*rr != 0 && *rr != '@') rr++;
- while (*rr != 0) { *rr = tolower(*rr); rr++; }
- node = tree_search(tree_nonrecipients, temp);
- }
+ if (!(node = tree_search(tree_nonrecipients, r)))
+ node = tree_search(tree_nonrecipients, string_copylc(r));
- if ((pp = strstric(r+1, qualify_domain, FALSE)) != NULL &&
- *(--pp) == '@') *pp = 0;
- if (node == NULL)
+ if ((pp = strstric(r+1, qualify_domain, FALSE)) && *(--pp) == '@')
+ *pp = 0;
+ if (!node)
(void)find_dest(p, r, dest_add, FALSE);
else
(void)find_dest(p, r, dest_remove, FALSE);
}
(void)find_dest(p, r, dest_add, FALSE);
else
(void)find_dest(p, r, dest_remove, FALSE);
}
/* We also need to scan the tree of non-recipients, which might
contain child addresses that are not in the recipients list, but
/* We also need to scan the tree of non-recipients, which might
contain child addresses that are not in the recipients list, but