From 2744175998e587862ca3cbb621940845d6846712 Mon Sep 17 00:00:00 2001 From: "Stuart D. Gathman" Date: Wed, 14 Jul 2021 08:39:58 -0400 Subject: [PATCH] Use a more generally runnable socketname --- template.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/template.py b/template.py index 0f8679e..c3d0df0 100644 --- a/template.py +++ b/template.py @@ -17,6 +17,7 @@ except: import time import email import sys +import os from socket import AF_INET, AF_INET6 from Milter.utils import parse_addr if True: @@ -157,7 +158,9 @@ def background(): def main(): bt = Thread(target=background) bt.start() - socketname = "/home/stuart/pythonsock" + # This is NOT a good socket location for production, it is for + # playing around. I suggest /var/run/milter/myappnamesock for production. + socketname = os.path.expanduser('~/pythonsock') timeout = 600 # Register to have the Milter factory create instances of your class: Milter.factory = myMilter