X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/2d564054d3ad157320ae0a24256ab27fb979f987..12aa14e5e0b32bb76a18b5ac7e27210f7b19c0ea:/procmail/eqdomains

diff --git a/procmail/eqdomains b/procmail/eqdomains
index 45e66e4..b5e434d 100644
--- a/procmail/eqdomains
+++ b/procmail/eqdomains
@@ -12,13 +12,22 @@
   {
     :0
     * ORIG_LOCAL ?? ^\/[^=]+
-    { EQ_LOCAL="$MATCH" }
+    {
+      EQ_LOCAL="$MATCH"
+      EQ_TO="$MATCH"
+    }
 
     :0
     * ORIG_LOCAL ?? .+=\/.+
-    { EQ_DOMAIN="$MATCH" }
+    {
+      EQ_DOMAIN="$MATCH"
 
-    LOG="eqdomain:    message to $EQ_LOCAL@$EQ_DOMAIN via $ORIG_DOMAIN$NL"
+      :0
+      * EQ_LOCAL ?? .
+      { EQ_TO="$EQ_TO@$EQ_DOMAIN" }
+    }
+
+    LOG="eqdomain:    message to $EQ_TO via $ORIG_DOMAIN$NL"
   }
 }