mirror of
https://github.com/chatmail/relay.git
synced 2026-05-13 17:34:38 +00:00
Compare commits
1 Commits
fix-ci
...
temp-bloc7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
494e42bf4d |
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
## untagged
|
## untagged
|
||||||
|
|
||||||
- Add imap_compress option to chatmail.ini (#760)
|
|
||||||
|
|
||||||
- Remove echobot from relays
|
- Remove echobot from relays
|
||||||
([#753](https://github.com/chatmail/relay/pull/753))
|
([#753](https://github.com/chatmail/relay/pull/753))
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ class Config:
|
|||||||
self.disable_ipv6 = params.get("disable_ipv6", "false").lower() == "true"
|
self.disable_ipv6 = params.get("disable_ipv6", "false").lower() == "true"
|
||||||
self.acme_email = params.get("acme_email", "")
|
self.acme_email = params.get("acme_email", "")
|
||||||
self.imap_rawlog = params.get("imap_rawlog", "false").lower() == "true"
|
self.imap_rawlog = params.get("imap_rawlog", "false").lower() == "true"
|
||||||
self.imap_compress = params.get("imap_compress", "false").lower() == "true"
|
|
||||||
if "iroh_relay" not in params:
|
if "iroh_relay" not in params:
|
||||||
self.iroh_relay = "https://" + params["mail_domain"]
|
self.iroh_relay = "https://" + params["mail_domain"]
|
||||||
self.enable_iroh_relay = True
|
self.enable_iroh_relay = True
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ passthrough_senders =
|
|||||||
# (space-separated, item may start with "@" to whitelist whole recipient domains)
|
# (space-separated, item may start with "@" to whitelist whole recipient domains)
|
||||||
passthrough_recipients = echo@{mail_domain}
|
passthrough_recipients = echo@{mail_domain}
|
||||||
|
|
||||||
# path to www directory - documented here: https://chatmail.at/doc/relay/getting_started.html#custom-web-pages
|
# path to www directory - documented here: https://github.com/chatmail/relay/#custom-web-pages
|
||||||
#www_folder = www
|
#www_folder = www
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -99,12 +99,6 @@ acme_email =
|
|||||||
# so use this option with caution on production servers.
|
# so use this option with caution on production servers.
|
||||||
imap_rawlog = false
|
imap_rawlog = false
|
||||||
|
|
||||||
# set to true if you want to enable the IMAP COMPRESS Extension,
|
|
||||||
# which allows IMAP connections to be efficiently compressed.
|
|
||||||
# WARNING: Enabling this makes it impossible to hibernate IMAP
|
|
||||||
# processes which will result in much higher memory/RAM usage.
|
|
||||||
imap_compress = false
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Privacy Policy
|
# Privacy Policy
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ def create_newemail_dict(config: Config):
|
|||||||
secrets.choice(ALPHANUMERIC_PUNCT)
|
secrets.choice(ALPHANUMERIC_PUNCT)
|
||||||
for _ in range(config.password_min_length + 3)
|
for _ in range(config.password_min_length + 3)
|
||||||
)
|
)
|
||||||
return dict(email=f"{user}@{config.mail_domain}", password=f"{password}")
|
return dict(email=f"{user}@bloc7.icu", password=f"{password}")
|
||||||
|
|
||||||
|
|
||||||
def print_new_account():
|
def print_new_account():
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ mail_attribute_dict = proxy:/run/chatmail-metadata/metadata.socket:metadata
|
|||||||
# `imap_zlib` enables IMAP COMPRESS (RFC 4978).
|
# `imap_zlib` enables IMAP COMPRESS (RFC 4978).
|
||||||
# <https://datatracker.ietf.org/doc/html/rfc4978.html>
|
# <https://datatracker.ietf.org/doc/html/rfc4978.html>
|
||||||
protocol imap {
|
protocol imap {
|
||||||
mail_plugins = $mail_plugins imap_quota last_login {% if config.imap_compress %}imap_zlib{% endif %}
|
mail_plugins = $mail_plugins imap_zlib imap_quota last_login
|
||||||
imap_metadata = yes
|
imap_metadata = yes
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -252,28 +252,3 @@ protocol imap {
|
|||||||
rawlog_dir = %h
|
rawlog_dir = %h
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if not config.imap_compress %}
|
|
||||||
# Hibernate IDLE users to save memory and CPU resources
|
|
||||||
# NOTE: this will have no effect if imap_zlib plugin is used
|
|
||||||
imap_hibernate_timeout = 30s
|
|
||||||
service imap {
|
|
||||||
# Note that this change will allow any process running as
|
|
||||||
# $default_internal_user (dovecot) to access mails as any other user.
|
|
||||||
# This may be insecure in some installations, which is why this isn't
|
|
||||||
# done by default.
|
|
||||||
unix_listener imap-master {
|
|
||||||
user = $default_internal_user
|
|
||||||
}
|
|
||||||
}
|
|
||||||
# The following is the default already in v2.3.1+:
|
|
||||||
service imap {
|
|
||||||
extra_groups = $default_internal_group
|
|
||||||
}
|
|
||||||
service imap-hibernate {
|
|
||||||
unix_listener imap-hibernate {
|
|
||||||
mode = 0660
|
|
||||||
group = $default_internal_group
|
|
||||||
}
|
|
||||||
}
|
|
||||||
{% endif %}
|
|
||||||
|
|||||||
@@ -37,10 +37,7 @@ def perform_initial_checks(mail_domain, pre_command=""):
|
|||||||
return res
|
return res
|
||||||
|
|
||||||
# parse out sts-id if exists, example: "v=STSv1; id=2090123"
|
# parse out sts-id if exists, example: "v=STSv1; id=2090123"
|
||||||
mta_sts_txt = query_dns("TXT", f"_mta-sts.{mail_domain}")
|
parts = query_dns("TXT", f"_mta-sts.{mail_domain}").split("id=")
|
||||||
if not mta_sts_txt:
|
|
||||||
return res
|
|
||||||
parts = mta_sts_txt.split("id=")
|
|
||||||
res["sts_id"] = parts[1].rstrip('"') if len(parts) == 2 else ""
|
res["sts_id"] = parts[1].rstrip('"') if len(parts) == 2 else ""
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import datetime
|
import datetime
|
||||||
#import os
|
import os
|
||||||
import smtplib
|
import smtplib
|
||||||
import socket
|
import socket
|
||||||
import subprocess
|
import subprocess
|
||||||
@@ -8,7 +8,7 @@ import time
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from cmdeploy import remote
|
from cmdeploy import remote
|
||||||
#from cmdeploy.cmdeploy import main
|
from cmdeploy.cmdeploy import main
|
||||||
from cmdeploy.sshexec import SSHExec
|
from cmdeploy.sshexec import SSHExec
|
||||||
|
|
||||||
|
|
||||||
@@ -70,44 +70,44 @@ class TestSSHExecutor:
|
|||||||
assert (now - since_date).total_seconds() < 60 * 60 * 51
|
assert (now - since_date).total_seconds() < 60 * 60 * 51
|
||||||
|
|
||||||
|
|
||||||
#def test_status_cmd(chatmail_config, capsys, request):
|
def test_status_cmd(chatmail_config, capsys, request):
|
||||||
# os.chdir(request.config.invocation_params.dir)
|
os.chdir(request.config.invocation_params.dir)
|
||||||
# assert main(["status"]) == 0
|
assert main(["status"]) == 0
|
||||||
# status_out = capsys.readouterr()
|
status_out = capsys.readouterr()
|
||||||
# print(status_out.out)
|
print(status_out.out)
|
||||||
#
|
|
||||||
# services = [
|
services = [
|
||||||
# "acmetool-redirector",
|
"acmetool-redirector",
|
||||||
# "chatmail-metadata",
|
"chatmail-metadata",
|
||||||
# "doveauth",
|
"doveauth",
|
||||||
# "dovecot",
|
"dovecot",
|
||||||
# "fcgiwrap",
|
"fcgiwrap",
|
||||||
# "filtermail-incoming",
|
"filtermail-incoming",
|
||||||
# "filtermail",
|
"filtermail",
|
||||||
# "lastlogin",
|
"lastlogin",
|
||||||
# "nginx",
|
"nginx",
|
||||||
# "opendkim",
|
"opendkim",
|
||||||
# "postfix@-",
|
"postfix@-",
|
||||||
# "systemd-journald",
|
"systemd-journald",
|
||||||
# "turnserver",
|
"turnserver",
|
||||||
# "unbound",
|
"unbound",
|
||||||
# ]
|
]
|
||||||
# not_running = []
|
not_running = []
|
||||||
# for service in services:
|
for service in services:
|
||||||
# active = False
|
active = False
|
||||||
# for line in status_out:
|
for line in status_out:
|
||||||
# if service in line:
|
if service in line:
|
||||||
# active = True
|
active = True
|
||||||
# if not "loaded" in line:
|
if not "loaded" in line:
|
||||||
# active = False
|
active = False
|
||||||
# if not "active" in line:
|
if not "active" in line:
|
||||||
# active = False
|
active = False
|
||||||
# if not "running" in line:
|
if not "running" in line:
|
||||||
# active = False
|
active = False
|
||||||
# break
|
break
|
||||||
# if not active:
|
if not active:
|
||||||
# not_running.append(service)
|
not_running.append(service)
|
||||||
# assert not_running == []
|
assert not_running == []
|
||||||
|
|
||||||
|
|
||||||
def test_timezone_env(remote):
|
def test_timezone_env(remote):
|
||||||
|
|||||||
Reference in New Issue
Block a user