cur_port = NULL;
}
- if ((r = getaddrinfo (cur_tok, cur_port, &hints, &res)) == 0) {
+ if ((r = getaddrinfo (tokens[0], cur_port, &hints, &res)) == 0) {
memcpy (&addr_holder, res->ai_addr,
MIN (sizeof (addr_holder), res->ai_addrlen));
if (res->ai_family == AF_INET) {
rspamd_check_smtp_data (struct rspamd_task *task, GList * args, void *unused)
{
struct expression_argument *arg;
- GList *cur, *rcpt_list = NULL;
- gchar *type, *what = NULL;
+ InternetAddressList *ia;
+ const gchar *type, *what = NULL;
if (args == NULL) {
msg_warn ("no parameters to function");
case 'f':
case 'F':
if (g_ascii_strcasecmp (type, "from") == 0) {
- what = task->from;
+ what = rspamd_task_get_sender (task);
}
else {
msg_warn ("bad argument to function: %s", type);
case 'r':
case 'R':
if (g_ascii_strcasecmp (type, "rcpt") == 0) {
- rcpt_list = task->rcpt;
+ ia = task->rcpt_mime;
}
else {
msg_warn ("bad argument to function: %s", type);
}
}
- if (what == NULL && rcpt_list == NULL) {
+ if (what == NULL && ia == NULL) {
/* Not enough data so regexp would NOT be found anyway */
return FALSE;
}