if (addr) {
rh->addr = addr;
- rh->real_ip = rspamd_inet_address_to_string (addr);
+ rh->real_ip = rspamd_mempool_strdup (task->task_pool,
+ rspamd_inet_address_to_string (addr));
rh->from_ip = rh->real_ip;
}
}
comment->dlen, task->task_pool);
if (addr) {
rh->addr = addr;
- rh->real_ip = rspamd_inet_address_to_string (addr);
+ rh->real_ip = rspamd_mempool_strdup (task->task_pool,
+ rspamd_inet_address_to_string (addr));
rh->from_ip = rh->real_ip;
}
}
if (addr) {
rh->addr = addr;
- rh->real_ip = rspamd_inet_address_to_string (addr);
+ rh->real_ip = rspamd_mempool_strdup (task->task_pool,
+ rspamd_inet_address_to_string (addr));
rh->from_ip = rh->real_ip;
/* Process with rDNS */
if (addr) {
seen_ip_in_data = TRUE;
rh->addr = addr;
- rh->real_ip = rspamd_inet_address_to_string (addr);
+ rh->real_ip = rspamd_mempool_strdup (task->task_pool,
+ rspamd_inet_address_to_string (addr));
rh->from_ip = rh->real_ip;
}
}
if (addr) {
seen_ip_in_data = TRUE;
rh->addr = addr;
- rh->real_ip = rspamd_inet_address_to_string (addr);
+ rh->real_ip = rspamd_mempool_strdup (task->task_pool,
+ rspamd_inet_address_to_string (addr));
rh->from_ip = rh->real_ip;
}
}
continue;
}
else if (t1.len == t2.len + 2) {
- if (t1.begin[t2.len - 1] == 's' &&
- t1.begin[t2.len] == 'a') {
+ if (t1.begin[t2.len] == 's' &&
+ t1.begin[t2.len + 1] == 'a') {
rh->type = RSPAMD_RECEIVED_ESMTPSA;
rh->flags |= RSPAMD_RECEIVED_FLAG_AUTHENTICATED;
rh->flags |= RSPAMD_RECEIVED_FLAG_SSL;