Group: netwin.surgemail
From: John Wilkes <john@wilkes.com>
Subject: Re: [SurgeMail List] external message filter
Date: Wed, 5 Jul 2017 13:39:34 -0700

Is there something like $FILE$ to pass the message recipientís email address as a command parameter?


> On Jun 27, 2017, at 4:39 AM, Jim Lohiser <JimL@n2net.net> wrote:
> 
> http://netwinsite.com/surgemail/help/global.htm#g_spam_cmd
> 
> On Jun 27, 2017, at 12:08 AM, John Wilkes <john@wilkes.com> wrote:
> 
>> Is there a way to pass incoming and messages to a command-line external filter? Iím looking for something like g_virus_cmd that doesnít require a multi-part message and passes the entire raw message including all headers to the command line.
>> 
>> Thanks,
>> John
>> 
>> -- 
>> John Wilkes
>> john@wilkes.com
>> 
>> One of the advantages of being disorderly is that
>> one is constantly making interesting discoveries.
>> 
>> 
>> 
>> 
>> 



From: Jim Lohiser <JimL@n2net.net>
Date: Wed, 5 Jul 2017 22:01:09 +0000

John,

Your probably better off parsing the message header for that information. T=
hen you can get the exact information you desire. For example, an email can=
 have multiple recipients. All that info is in the header so you are able t=
o select the information that best suits your particular circumstance.

Jim L

> On Jul 5, 2017, at 4:40 PM, John Wilkes <john@wilkes.com> wrote:
>=20
> Is there something like $FILE$ to pass the message recipient=92s email ad=
dress as a command parameter?
>=20
>=20
>> On Jun 27, 2017, at 4:39 AM, Jim Lohiser <JimL@n2net.net> wrote:
>>=20
>> http://netwinsite.com/surgemail/help/global.htm#g_spam_cmd
>>=20
>>> On Jun 27, 2017, at 12:08 AM, John Wilkes <john@wilkes.com> wrote:
>>>=20
>>> Is there a way to pass incoming and messages to a command-line external=
 filter? I=92m looking for something like g_virus_cmd that doesn=92t requir=
e a multi-part message and passes the entire raw message including all head=
ers to the command line.
>>>=20
>>> Thanks,
>>> John
>>>=20
>>> --=20
>>> John Wilkes
>>> john@wilkes.com
>>>=20
>>> One of the advantages of being disorderly is that
>>> one is constantly making interesting discoveries.
>>>=20
>>>=20
>>>=20
>>>=20
>>>=20
>=20
>=20


From: surgemail-support <surgemail-support@netwinsite.com>
Date: Thu, 6 Jul 2017 10:21:29 +1200

This is a multi-part message in MIME format.
--------------D78F9503F134D7C936553DE6
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit

No, it's sent to that process once for all recipients so there isn't a 
single recipient at that stage currently.

     ChrisP.



On 6/07/2017 8:39 a.m., John Wilkes wrote:
> Is there something like $FILE$ to pass the message recipientís email address as a command parameter?
>
>
>> On Jun 27, 2017, at 4:39 AM, Jim Lohiser <JimL@n2net.net> wrote:
>>
>> http://netwinsite.com/surgemail/help/global.htm#g_spam_cmd
>>
>> On Jun 27, 2017, at 12:08 AM, John Wilkes <john@wilkes.com> wrote:
>>
>>> Is there a way to pass incoming and messages to a command-line external filter? Iím looking for something like g_virus_cmd that doesnít require a multi-part message and passes the entire raw message including all headers to the command line.
>>>
>>> Thanks,
>>> John
>>>
>>> -- 
>>> John Wilkes
>>> john@wilkes.com
>>>
>>> One of the advantages of being disorderly is that
>>> one is constantly making interesting discoveries.
>>>
>>>
>>>
>>>
>>>
>

-- 
I'd really appreciate it if you could take a moment to like us on 
FaceBook <https://www.facebook.com/SurgeMail-194672027239873>, thanks 
heaps! ChrisP.

--------------D78F9503F134D7C936553DE6
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>No, it's sent to that process once for all recipients so there
      isn't a single recipient at that stage currently.</p>
    ††† ChrisP.
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 6/07/2017 8:39 a.m., John Wilkes
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:027BC226-0B53-46CD-B73C-C25E39F622C1@wilkes.com">
      <pre wrap="">Is there something like $FILE$ to pass the message recipientís email address as a command parameter?


</pre>
      <blockquote type="cite">
        <pre wrap="">On Jun 27, 2017, at 4:39 AM, Jim Lohiser <a class="moz-txt-link-rfc2396E" href="mailto:JimL@n2net.net">&lt;JimL@n2net.net&gt;</a> wrote:

<a class="moz-txt-link-freetext" href="http://netwinsite.com/surgemail/help/global.htm#g_spam_cmd">http://netwinsite.com/surgemail/help/global.htm#g_spam_cmd</a>

On Jun 27, 2017, at 12:08 AM, John Wilkes <a class="moz-txt-link-rfc2396E" href="mailto:john@wilkes.com">&lt;john@wilkes.com&gt;</a> wrote:

</pre>
        <blockquote type="cite">
          <pre wrap="">Is there a way to pass incoming and messages to a command-line external filter? Iím looking for something like g_virus_cmd that doesnít require a multi-part message and passes the entire raw message including all headers to the command line.

Thanks,
John

-- 
John Wilkes
<a class="moz-txt-link-abbreviated" href="mailto:john@wilkes.com">john@wilkes.com</a>

One of the advantages of being disorderly is that
one is constantly making interesting discoveries.





</pre>
        </blockquote>
      </blockquote>
      <pre wrap="">

</pre>
    </blockquote>
    <br>
    <div class="moz-signature">-- <br>
      I'd really appreciate it if you could take a moment to <a
        href="https://www.facebook.com/SurgeMail-194672027239873">
        like us on FaceBook</a>, thanks heaps! ChrisP.
    </div>
  </body>
</html>

--------------D78F9503F134D7C936553DE6--


From: John Wilkes <john@wilkes.com>
Date: Wed, 5 Jul 2017 22:37:20 -0700

I was hoping to implement encryption of incoming messages with a filter =
that encrypts the message body with the recipient=92s public key, but =
that requires something like g_filter_cmd at a later stage, before =
delivery to a single recipient=92s inbox.

I imagine that this has been discussed in the past...

--=20
John Wilkes


> On Jul 5, 2017, at 3:21 PM, surgemail-support =
<surgemail-support@netwinsite.com> wrote:
>=20
> No, it's sent to that process once for all recipients so there isn't a =
single recipient at that stage currently.
>=20
>     ChrisP.
>=20
>=20
> On 6/07/2017 8:39 a.m., John Wilkes wrote:
>> Is there something like $FILE$ to pass the message recipient=92s =
email address as a command parameter?
>>=20
>>=20
>>=20
>>> On Jun 27, 2017, at 4:39 AM, Jim Lohiser <JimL@n2net.net>
>>>  wrote:
>>>=20
>>>=20
>>> http://netwinsite.com/surgemail/help/global.htm#g_spam_cmd
>>>=20
>>>=20
>>> On Jun 27, 2017, at 12:08 AM, John Wilkes=20
>>> <john@wilkes.com>
>>>  wrote:
>>>=20
>>>=20
>>>> Is there a way to pass incoming and messages to a command-line =
external filter? I=92m looking for something like g_virus_cmd that =
doesn=92t require a multi-part message and passes the entire raw message =
including all headers to the command line.
>>>>=20
>>>> Thanks,
>>>> John
>>>>=20
>>>> --=20
>>>> John Wilkes
>>>>=20
>>>> john@wilkes.com
>>>>=20
>>>>=20
>>>> One of the advantages of being disorderly is that
>>>> one is constantly making interesting discoveries.
>>>>=20
>>>>=20
>>>>=20
>>>>=20
>>>>=20
>>>>=20
>>=20
>=20
> --=20
> I'd really appreciate it if you could take a moment to like us on =
FaceBook, thanks heaps! ChrisP.



From: surgemail-support <surgemail-support@netwinsite.com>
Date: Fri, 7 Jul 2017 10:10:15 +1200

This is a multi-part message in MIME format.
--------------39A1D98D1A2A2EE73C9A9CD8
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit

We will look into adding a setting to allow something like that at the 
delivery stage.



ChrisP.

On 6/07/2017 5:37 p.m., John Wilkes wrote:
> I was hoping to implement encryption of incoming messages with a filter that encrypts the message body with the recipientís public key, but that requires something like g_filter_cmd at a later stage, before delivery to a single recipientís inbox.
>
> I imagine that this has been discussed in the past...
>

-- 
I'd really appreciate it if you could take a moment to like us on 
FaceBook <https://www.facebook.com/SurgeMail-194672027239873>, thanks 
heaps! ChrisP.

--------------39A1D98D1A2A2EE73C9A9CD8
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    We will look into adding a setting to allow something like that at
    the delivery stage.<br>
    <br>
    <br>
    <br>
    ChrisP.<br>
    <br>
    <div class="moz-cite-prefix">On 6/07/2017 5:37 p.m., John Wilkes
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:323BCC5B-38FA-438A-9B3D-9FB2602E240E@wilkes.com">
      <pre wrap="">I was hoping to implement encryption of incoming messages with a filter that encrypts the message body with the recipientís public key, but that requires something like g_filter_cmd at a later stage, before delivery to a single recipientís inbox.

I imagine that this has been discussed in the past...

</pre>
    </blockquote>
    <br>
    <div class="moz-signature">-- <br>
      I'd really appreciate it if you could take a moment to <a
        href="https://www.facebook.com/SurgeMail-194672027239873">
        like us on FaceBook</a>, thanks heaps! ChrisP.
    </div>
  </body>
</html>

--------------39A1D98D1A2A2EE73C9A9CD8--


From: John Wilkes <john@wilkes.com>
Date: Thu, 6 Jul 2017 17:22:06 -0700

You might want to look at existing GPG solutions for postfix, Exim, etc. =
The gpgit perl script is a filter that encrypts the message body with =
the public key of the sender. I think it would =93just work=94 with a =
filter hook at the delivery stage and the ability to pass the =
recipient=92s email address on the command line.

https://www.grepular.com/Automatically_Encrypting_all_Incoming_Email

http://kacangbawang.com/encrypting-stored-email-with-postfix/

https://gitlab.com/mikecardwell/gpgit

--=20
John Wilkes

One of the advantages of being disorderly is that
one is constantly making interesting discoveries.


On Jul 6, 2017, at 3:10 PM, surgemail-support =
<surgemail-support@netwinsite.com> wrote:
>=20
> We will look into adding a setting to allow something like that at the =
delivery stage.
>=20
>=20
>=20
> ChrisP.
>=20
> On 6/07/2017 5:37 p.m., John Wilkes wrote:
>> I was hoping to implement encryption of incoming messages with a =
filter that encrypts the message body with the recipient=92s public key, =
but that requires something like g_filter_cmd at a later stage, before =
delivery to a single recipient=92s inbox.
>>=20
>> I imagine that this has been discussed in the past...
>>=20
>>=20
>=20
> --=20
> I'd really appreciate it if you could take a moment to like us on =
FaceBook, thanks heaps! ChrisP.