Hi, ich möchte gerne das Problem lösen das man ManageSieve nutzen kann, ohne das der Autoresponder überschrieben wird.
Dies ist mir auch schon gelungen, nur aktuell habe ich die dovecot.lua geändert, was natürlich nicht so geschickt ist, daher bräuchte ich hilfe dies in die custom.lua zu übernehmen
Code
#/usr/lib/liveconfig/lua/dovecot.lua
...
-- pattern for "userdb_sieve" setting in /etc/dovecot/passwd
if USERDB_SIEVE == nil then
USERDB_SIEVE = "userdb_sieve=/var/mail/%C/%I/default.sieve"
end
-- pattern for "userdb_sieve_storage" setting in /etc/dovecot/passwd
if USERDB_SIEVE_STORAGE == nil then
USERDB_SIEVE_STORAGE = "userdb_sieve_storage=/var/mail/%C/%I/sieve/"
end
-- pattern for "userdb_sieve_before" setting in /etc/dovecot/passwd
if USERDB_SIEVE_BEFORE == nil then
USERDB_SIEVE_BEFORE = "userdb_sieve_before=/var/mail/%C/%I/dovecot.sieve"
end
...
function addMailbox(cfg, opts, data)
...
-- check if sieve directory already exists, otherwise create it:
if not LC.fs.is_dir('/var/mail/' .. data.contract .. '/' .. data.id .. '/sieve') then
LC.fs.mkdir_rec('/var/mail/' .. data.contract .. '/' .. data.id .. '/sieve')
LC.fs.setperm('/var/mail/' .. data.contract .. '/' .. data.id .. '/sieve', "2700", "mail", "mail")
end
...
local p_sieve = replace_pattern(USERDB_SIEVE, data)
local p_sieve_storage = replace_pattern(USERDB_SIEVE_STORAGE, data)
local p_sieve_before = replace_pattern(USERDB_SIEVE_BEFORE, data)
...
if p_sieve ~= "" then
-- userdb_sieve:
new_line = new_line .. " " .. p_sieve
end
if p_sieve_storage ~= "" then
-- userdb_sieve_storage:
new_line = new_line .. " " .. p_sieve_storage
end
if p_sieve_before ~= "" then
-- userdb_sieve_before:
new_line = new_line .. " " .. p_sieve_before
end
...
return true
end
Alles anzeigen