Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 50fef3c9be | |||
| 7bb3bd389e | |||
| 176ac83684 | |||
| ca87d7a828 |
@@ -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,7 +1,10 @@
|
|||||||
An SMTPUTF8-compliant fork of dkimpy-milter
|
An SMTPUTF8-approved version of dkimpy-milter
|
||||||
|
|
||||||
Please switch to `smtputf8` branch for an actual update. Thank you.
|
Please do note that there might be some mistakes along the way... No warranty is provided!
|
||||||
(I was trying to be organized)
|
|
||||||
|
This implements support for internationalized email address (RFC 8616)
|
||||||
|
|
||||||
|
Cheatsheet.txt is a file for my (diskette@dailitation.xyz) personal note taking.
|
||||||
|
|
||||||
# OVERVIEW
|
# OVERVIEW
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import tempfile
|
|||||||
import io
|
import io
|
||||||
import re
|
import re
|
||||||
import codecs
|
import codecs
|
||||||
|
import idna
|
||||||
from Milter.utils import parse_addr, parseaddr
|
from Milter.utils import parse_addr, parseaddr
|
||||||
import dkimpy_milter.config as config
|
import dkimpy_milter.config as config
|
||||||
from dkimpy_milter.util import drop_privileges
|
from dkimpy_milter.util import drop_privileges
|
||||||
@@ -149,7 +150,7 @@ class dkimMilter(Milter.Base):
|
|||||||
syslog.syslog("{0}: {1}".format(name, val))
|
syslog.syslog("{0}: {1}".format(name, val))
|
||||||
self.has_dkim += 1
|
self.has_dkim += 1
|
||||||
if lname == 'from':
|
if lname == 'from':
|
||||||
fname, self.author = parseaddr(val)
|
fname, self.author = parseaddr(idna.alabel(val))
|
||||||
try:
|
try:
|
||||||
self.fdomain = self.author.split('@')[1].lower()
|
self.fdomain = self.author.split('@')[1].lower()
|
||||||
except IndexError as er:
|
except IndexError as er:
|
||||||
|
|||||||
Reference in New Issue
Block a user