[Rspamd-Users] Rspamd 2.1 has been released

Aste aste at sveiks.lv
Tue Nov 5 12:19:31 UTC 2019


Hi!

Monday, November 4, 2019, 4:50:40 PM, you wrote:
VS> On 04/11/2019 14:26, Aste wrote:
>> Hi!
>> 
>> Monday, November 4, 2019, 3:06:55 PM, you wrote:
>>>>> VS> It cannot be.
>>>>> After that modification smtp started worked again
>>>>>
>>>>>     -- DATA stage
>>>>>     local function data_done_cb(merr, mdata)
>>>>>       if no_error_read(merr, mdata, '3') then
>>>>>         if type(message) == 'string' then
>>>>>           conn:add_write(pre_quit_cb, {message, CRLF.. '.' .. CRLF})
>>>>>         else
>>>>> --          table.insert(message, CRLF.. '.' .. CRLF)
>>>>> --          conn:add_write(pre_quit_cb, message)
>>>>>           conn:add_write(pre_quit_cb, {message, CRLF.. '.' .. CRLF})
>>>>>         end
>>>>>       end
>>>>>     end
>>>>>
>>>>
>>>> This modification is apparently wrong. I have no ideas about how that
>>>> could happen in your case: there are no `rspamd{text}` anywhere in
>>>> lua_smtp callers.
>>>>
>> 
>> VS> Is it your own invocation or invocation by some Rspamd modules? I'm
>> VS> supposing the first...
>> e-mail  sending  is  initiated  by  metadata exporter module, and also
>> DMARC module (report sending).
>> 
>> Problem  was mentioned in list before (subject "metadata exporter with
>> default formatter") and also in git
>> https://github.com/rspamd/rspamd/issues/3110
>> 
>> Seams my previous post was lost...
>> Probably is better check for table, not string, and process table case
>> first only if taple is presented.
>> if type(message) == 'table'
>> 

VS> metadata_exporter uses `task:get_content` indeed that returns
VS> `rspamd{text}` userdata. DMARC reports code uses table. Please bear in
VS> mind that I'm not the author of neither of these two modules (I have
VS> rewritten DMARC checks but not reporting), so they are actually
VS> unsupported so far.
The  reason  of  DMARC  report  problem  probaly  was  lot  of  broken
connections because of metadata explorer.
Anyway  check fort "table" type didn't work properly so there is final
code, which work well for both DMARC and metadata exporter.


   -- DATA stage
    local function data_done_cb(merr, mdata)
      if no_error_read(merr, mdata, '3') then
        if type(message) == 'string' then
          conn:add_write(pre_quit_cb, {message, CRLF.. '.' .. CRLF})
        else
           if type(message) == 'userdata' then
           conn:add_write(pre_quit_cb, {message, CRLF.. '.' .. CRLF})
           else
              table.insert(message, CRLF.. '.' .. CRLF)
              conn:add_write(pre_quit_cb, message)
            end
        end
      end
    end



-- 
Aste



More information about the Users mailing list