[Rspamd-Users] custom mail info logging

Gerald Galster list+rspamd at gcore.biz
Sun Aug 6 18:26:55 UTC 2023


> As mime_from/mime_rcpts? log variables logs only pure mail address and
> there is no variable for Subject, I tried to use lua script.
> Unfortunately I don't know anything about lua.
> Now I have in /etc/rspamd/local.d/logging.inc something as:
> 
> log_format =<<EOD
> ...
> $lua{
>  return function(task)
>    return ' From:' .. task:get_header('From') .. ' To: ' .. task:get_header('To') .. ' Cc:' .. task:get_header('Cc') .. ' Subj:' .. task:get_header('Subject')
>  end
> }
> ...
> EOD

Try tostring(task:get_header('Subject')) or tostring(task:get_subject()) etc.

Best regards,
Gerald



More information about the Users mailing list