diff --git a/seed/applicationservice/2022.03.08/postfix-relay/dictionaries/20_postfix.xml b/seed/applicationservice/2022.03.08/postfix-relay/dictionaries/30_postfix.xml
similarity index 95%
rename from seed/applicationservice/2022.03.08/postfix-relay/dictionaries/20_postfix.xml
rename to seed/applicationservice/2022.03.08/postfix-relay/dictionaries/30_postfix.xml
index a9ff87f..72c6201 100644
--- a/seed/applicationservice/2022.03.08/postfix-relay/dictionaries/20_postfix.xml
+++ b/seed/applicationservice/2022.03.08/postfix-relay/dictionaries/30_postfix.xml
@@ -11,7 +11,7 @@
/etc/postfix/master.cf
/etc/pki/ca-trust/source/anchors/ca_MailServer.crt
/etc/pki/tls/certs/postfix.crt
- postfix_pem_files
+ postfix_pem_files
/etc/pki/tls/private/postfix.key
@@ -32,6 +32,9 @@
+
+ 25
+
diff --git a/seed/applicationservice/2022.03.08/postfix-relay/funcs/opendkim.py b/seed/applicationservice/2022.03.08/postfix-relay/funcs/opendkim.py
index d907bf2..b222ea8 100644
--- a/seed/applicationservice/2022.03.08/postfix-relay/funcs/opendkim.py
+++ b/seed/applicationservice/2022.03.08/postfix-relay/funcs/opendkim.py
@@ -16,14 +16,16 @@ _DKIM_DIR = _join(_HERE, 'pki/dkim')
def get_dkim_key(domain_name_eth0, domain):
dkim_dir = _join(_DKIM_DIR, domain_name_eth0, domain)
- dkim_file_src = _join(dkim_dir, f'{domain}')
+# dkim_file_src = _join(dkim_dir, f'{domain}')
dkim_file_key = _join(dkim_dir, f'{domain}.key')
dkim_file = _join(dkim_dir, f'{domain}.dns')
if not _isfile(dkim_file):
if _isdir(dkim_dir):
_rmtree(dkim_dir)
_makedirs(dkim_dir)
- priv_key = _dknewkey.GenEd25519Keys(dkim_file_src)
- _dknewkey.ExtractEd25519PublicKey(dkim_file_key, priv_key)
+ priv_key = _dknewkey.GenRSAKeys(dkim_file_key)
+ _dknewkey.ExtractRSADnsPublicKey(dkim_file_key, dkim_file)
+# priv_key = _dknewkey.GenEd25519Keys(dkim_file_key)
+# _dknewkey.ExtractEd25519PublicKey(dkim_file_src, priv_key)
with open(dkim_file_key, 'r') as fh:
return fh.read().strip()
diff --git a/seed/applicationservice/2022.03.08/postfix-relay/templates/SigningTable b/seed/applicationservice/2022.03.08/postfix-relay/templates/SigningTable
index bf0df9d..2def8dd 100644
--- a/seed/applicationservice/2022.03.08/postfix-relay/templates/SigningTable
+++ b/seed/applicationservice/2022.03.08/postfix-relay/templates/SigningTable
@@ -24,5 +24,5 @@
#example.com default._domainkey.example.com
%for %%domain in %%postfix_relay_domains
-%%domain default._domainkey.%%domain
+*@%%domain default._domainkey.%%domain
%end for
diff --git a/seed/applicationservice/2022.03.08/postfix-relay/templates/main.cf b/seed/applicationservice/2022.03.08/postfix-relay/templates/main.cf
index e383cda..070470c 100644
--- a/seed/applicationservice/2022.03.08/postfix-relay/templates/main.cf
+++ b/seed/applicationservice/2022.03.08/postfix-relay/templates/main.cf
@@ -350,6 +350,17 @@ mynetworks = 172.0.0.0/8
#
#relay_domains = $mydestination
#>GNUNUX
+%set %%relay = %%set()
+%for %%domain in %%lmtp.server_lmtp
+ %set %%name=%%normalize_family(%%domain)
+ %for %%lst in %%lmtp['lmtp_' + name]['criteria_' + %%name]
+ %if '@' in %%lst
+ %set %%lst = %%lst.split('@')[1]
+ %end if
+%%relay.add(%%lst)%slurp
+ %end for
+%end for
+relay_domains = %echo ', '.join(%%relay)
%if %%lmtp.server_lmtp
transport_maps = hash:/etc/postfix/lmtp
%end if