mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-07-17 00:01:18 -04:00
Compare commits
No commits in common. "b06da30f9dc6c84261cf84f0c9bcad84c631d646" and "77ca0ecb246b72c669f7d48977e650a0966a1847" have entirely different histories.
b06da30f9d
...
77ca0ecb24
@ -10,7 +10,7 @@ jobs:
|
|||||||
if: github.event.pull_request.base.ref != 'staging' #check if the target branch is not staging
|
if: github.event.pull_request.base.ref != 'staging' #check if the target branch is not staging
|
||||||
steps:
|
steps:
|
||||||
- name: Send message
|
- name: Send message
|
||||||
uses: thollander/actions-comment-pull-request@v2.4.2
|
uses: thollander/actions-comment-pull-request@v2.4.0
|
||||||
with:
|
with:
|
||||||
GITHUB_TOKEN: ${{ secrets.CHECKIFPRISSTAGING_ACTION_PAT }}
|
GITHUB_TOKEN: ${{ secrets.CHECKIFPRISSTAGING_ACTION_PAT }}
|
||||||
message: |
|
message: |
|
||||||
|
@ -221,16 +221,6 @@ rspamd_config:register_symbol({
|
|||||||
local tagged_rcpt = task:get_symbol("TAGGED_RCPT")
|
local tagged_rcpt = task:get_symbol("TAGGED_RCPT")
|
||||||
local mailcow_domain = task:get_symbol("RCPT_MAILCOW_DOMAIN")
|
local mailcow_domain = task:get_symbol("RCPT_MAILCOW_DOMAIN")
|
||||||
|
|
||||||
local function remove_moo_tag()
|
|
||||||
local moo_tag_header = task:get_header('X-Moo-Tag', false)
|
|
||||||
if moo_tag_header then
|
|
||||||
task:set_milter_reply({
|
|
||||||
remove_headers = {['X-Moo-Tag'] = 0},
|
|
||||||
})
|
|
||||||
end
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
if tagged_rcpt and tagged_rcpt[1].options and mailcow_domain then
|
if tagged_rcpt and tagged_rcpt[1].options and mailcow_domain then
|
||||||
local tag = tagged_rcpt[1].options[1]
|
local tag = tagged_rcpt[1].options[1]
|
||||||
rspamd_logger.infox("found tag: %s", tag)
|
rspamd_logger.infox("found tag: %s", tag)
|
||||||
@ -239,7 +229,6 @@ rspamd_config:register_symbol({
|
|||||||
|
|
||||||
if action ~= 'no action' and action ~= 'greylist' then
|
if action ~= 'no action' and action ~= 'greylist' then
|
||||||
rspamd_logger.infox("skipping tag handler for action: %s", action)
|
rspamd_logger.infox("skipping tag handler for action: %s", action)
|
||||||
remove_moo_tag()
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -254,7 +243,6 @@ rspamd_config:register_symbol({
|
|||||||
local function tag_callback_subfolder(err, data)
|
local function tag_callback_subfolder(err, data)
|
||||||
if err or type(data) ~= 'string' then
|
if err or type(data) ~= 'string' then
|
||||||
rspamd_logger.infox(rspamd_config, "subfolder tag handler for rcpt %s returned invalid or empty data (\"%s\") or error (\"%s\")", body, data, err)
|
rspamd_logger.infox(rspamd_config, "subfolder tag handler for rcpt %s returned invalid or empty data (\"%s\") or error (\"%s\")", body, data, err)
|
||||||
remove_moo_tag()
|
|
||||||
else
|
else
|
||||||
rspamd_logger.infox("Add X-Moo-Tag header")
|
rspamd_logger.infox("Add X-Moo-Tag header")
|
||||||
task:set_milter_reply({
|
task:set_milter_reply({
|
||||||
@ -273,7 +261,6 @@ rspamd_config:register_symbol({
|
|||||||
)
|
)
|
||||||
if not redis_ret_subfolder then
|
if not redis_ret_subfolder then
|
||||||
rspamd_logger.infox(rspamd_config, "cannot make request to load tag handler for rcpt")
|
rspamd_logger.infox(rspamd_config, "cannot make request to load tag handler for rcpt")
|
||||||
remove_moo_tag()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
@ -281,10 +268,7 @@ rspamd_config:register_symbol({
|
|||||||
local sbj = task:get_header('Subject')
|
local sbj = task:get_header('Subject')
|
||||||
new_sbj = '=?UTF-8?B?' .. tostring(util.encode_base64('[' .. tag .. '] ' .. sbj)) .. '?='
|
new_sbj = '=?UTF-8?B?' .. tostring(util.encode_base64('[' .. tag .. '] ' .. sbj)) .. '?='
|
||||||
task:set_milter_reply({
|
task:set_milter_reply({
|
||||||
remove_headers = {
|
remove_headers = {['Subject'] = 1},
|
||||||
['Subject'] = 1,
|
|
||||||
['X-Moo-Tag'] = 0
|
|
||||||
},
|
|
||||||
add_headers = {['Subject'] = new_sbj}
|
add_headers = {['Subject'] = new_sbj}
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
@ -300,7 +284,6 @@ rspamd_config:register_symbol({
|
|||||||
)
|
)
|
||||||
if not redis_ret_subject then
|
if not redis_ret_subject then
|
||||||
rspamd_logger.infox(rspamd_config, "cannot make request to load tag handler for rcpt")
|
rspamd_logger.infox(rspamd_config, "cannot make request to load tag handler for rcpt")
|
||||||
remove_moo_tag()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@ -312,7 +295,6 @@ rspamd_config:register_symbol({
|
|||||||
if #rcpt_split == 2 then
|
if #rcpt_split == 2 then
|
||||||
if rcpt_split[1] == 'postmaster' then
|
if rcpt_split[1] == 'postmaster' then
|
||||||
rspamd_logger.infox(rspamd_config, "not expanding postmaster alias")
|
rspamd_logger.infox(rspamd_config, "not expanding postmaster alias")
|
||||||
remove_moo_tag()
|
|
||||||
else
|
else
|
||||||
rspamd_http.request({
|
rspamd_http.request({
|
||||||
task=task,
|
task=task,
|
||||||
@ -325,8 +307,7 @@ rspamd_config:register_symbol({
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
|
||||||
remove_moo_tag()
|
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
priority = 19
|
priority = 19
|
||||||
|
@ -189,7 +189,7 @@ if [[ ${SKIP_BRANCH} != y ]]; then
|
|||||||
done
|
done
|
||||||
|
|
||||||
git fetch --all
|
git fetch --all
|
||||||
git checkout -f $MAILCOW_BRANCH
|
git checkout -f $git_branch
|
||||||
|
|
||||||
elif [[ ${SKIP_BRANCH} == y ]]; then
|
elif [[ ${SKIP_BRANCH} == y ]]; then
|
||||||
echo -e "\033[33mEnabled Dev Mode.\033[0m"
|
echo -e "\033[33mEnabled Dev Mode.\033[0m"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user