Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 50fef3c9be | |||
| 7bb3bd389e | |||
| 176ac83684 | |||
| ca87d7a828 | |||
| b1b7fea4d2 | |||
| 96b8738af5 |
@@ -0,0 +1,25 @@
|
||||
Welcome to Cheatsheet.txt, licensed under CC-0. No attribution required.
|
||||
But it is writen by Diskette (diskette@dailitation.xyz)
|
||||
|
||||
Information regarding the [] flags are in dkimpy repository.
|
||||
|
||||
[__init__.py]
|
||||
Initialization file,
|
||||
|
||||
class dkimMilter, a milter for dkim
|
||||
|
||||
What are those
|
||||
self.fp localpart
|
||||
self.fdomain domain part
|
||||
self.iequals i still have no idea
|
||||
|
||||
def header
|
||||
|
||||
|
||||
define check_dkim, I assume that this checks dkim, how?
|
||||
|
||||
def sign_dkim
|
||||
d = dkim.DKIM(txt)
|
||||
|
||||
[dnsplyug.py]
|
||||
File for interfacing with DNS
|
||||
@@ -1,3 +1,11 @@
|
||||
An SMTPUTF8-approved version of dkimpy-milter
|
||||
|
||||
Please do note that there might be some mistakes along the way... No warranty is provided!
|
||||
|
||||
This implements support for internationalized email address (RFC 8616)
|
||||
|
||||
Cheatsheet.txt is a file for my (diskette@dailitation.xyz) personal note taking.
|
||||
|
||||
# OVERVIEW
|
||||
|
||||
This is a DKIM signing and verification milter. It has been tested with both
|
||||
@@ -320,7 +328,7 @@ Dkimpy-milter.conf:
|
||||
|
||||
...
|
||||
Mode sv
|
||||
MacroList dameon_name|ORIGINATING
|
||||
MacroList daemon_name|ORIGINATING
|
||||
MacroListVerify daemon_name|VERIFYING
|
||||
...
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import tempfile
|
||||
import io
|
||||
import re
|
||||
import codecs
|
||||
import idna
|
||||
from Milter.utils import parse_addr, parseaddr
|
||||
import dkimpy_milter.config as config
|
||||
from dkimpy_milter.util import drop_privileges
|
||||
@@ -149,7 +150,7 @@ class dkimMilter(Milter.Base):
|
||||
syslog.syslog("{0}: {1}".format(name, val))
|
||||
self.has_dkim += 1
|
||||
if lname == 'from':
|
||||
fname, self.author = parseaddr(val)
|
||||
fname, self.author = parseaddr(idna.alabel(val))
|
||||
try:
|
||||
self.fdomain = self.author.split('@')[1].lower()
|
||||
except IndexError as er:
|
||||
|
||||
Reference in New Issue
Block a user