Group: netwin.surgemail
Subject: [SurgeMail List] external message filter
Date: Mon, 26 Jun 2017 21:07:39 -0700

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: Tue, 27 Jun 2017 11:39:49 +0000

--_000_777367BEC28E478DAFA324D4D2791BD8n2netnet_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

http://netwinsite.com/surgemail/help/global.htm#g_spam_cmd

On Jun 27, 2017, at 12:08 AM, John Wilkes <john@wilkes.com<mailto:john@wilk=
es.com>> wrote:

Is there a way to pass incoming and messages to a command-line external fil=
ter? 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.

Thanks,
John

--
John Wilkes
john@wilkes.com<mailto:john@wilkes.com>

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






--_000_777367BEC28E478DAFA324D4D2791BD8n2netnet_
Content-Type: text/html; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DWindows-1=
252">
</head>
<body dir=3D"auto">
<div></div>
<div><a href=3D"http://netwinsite.com/surgemail/help/global.htm#g_spam_cmd"=
>http://netwinsite.com/surgemail/help/global.htm#g_spam_cmd</a></div>
<div><br>
On Jun 27, 2017, at 12:08 AM, John Wilkes &lt;<a href=3D"mailto:john@wilkes=
..com">john@wilkes.com</a>&gt; wrote:<br>
<br>
</div>
<blockquote type=3D"cite">
<div><span>Is there a way to pass incoming and messages to a command-line e=
xternal 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 a=
ll headers to the command line.</span><br>
<span></span><br>
<span>Thanks,</span><br>
<span>John</span><br>
<span></span><br>
<span>-- </span><br>
<span>John Wilkes</span><br>
<span><a href=3D"mailto:john@wilkes.com">john@wilkes.com</a></span><br>
<span></span><br>
<span>One of the advantages of being disorderly is that</span><br>
<span>one is constantly making interesting discoveries.</span><br>
<span></span><br>
<span></span><br>
<span></span><br>
<span></span><br>
<span></span><br>
</div>
</blockquote>
</body>
</html>

--_000_777367BEC28E478DAFA324D4D2791BD8n2netnet_--


From: surgemail-support <surgemail-support@netwinsite.com>
Date: Wed, 28 Jun 2017 09:41:30 +1200

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

Oh yes, that's a better answer ;-)

     ChrisP.



On 27/06/2017 11:39 p.m., Jim Lohiser wrote:
> http://netwinsite.com/surgemail/help/global.htm#g_spam_cmd
>
> On Jun 27, 2017, at 12:08 AM, John Wilkes <john@wilkes.com 
> <mailto:john@wilkes.com>> wrote:
>
>> Is there a way to pass incoming and messages to a command-line 
>> external filter? Im looking for something like g_virus_cmd that 
>> doesnt 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 <mailto: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.

--------------29163311E892D42B651EAD6E
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>Oh yes, that's a better answer ;-)</p>
    <p> ChrisP.</p>
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 27/06/2017 11:39 p.m., Jim Lohiser
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:777367BE-C28E-478D-AFA3-24D4D2791BD8@n2net.net">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <div><a
          href="http://netwinsite.com/surgemail/help/global.htm#g_spam_cmd"
          moz-do-not-send="true">http://netwinsite.com/surgemail/help/global.htm#g_spam_cmd</a></div>
      <div><br>
        On Jun 27, 2017, at 12:08 AM, John Wilkes &lt;<a
          href="mailto:john@wilkes.com" moz-do-not-send="true">john@wilkes.com</a>&gt;
        wrote:<br>
        <br>
      </div>
      <blockquote type="cite">
        <div><span>Is there a way to pass incoming and messages to a
            command-line external filter? Im looking for something like
            g_virus_cmd that doesnt require a multi-part message and
            passes the entire raw message including all headers to the
            command line.</span><br>
          <span></span><br>
          <span>Thanks,</span><br>
          <span>John</span><br>
          <span></span><br>
          <span>-- </span><br>
          <span>John Wilkes</span><br>
          <span><a href="mailto:john@wilkes.com" moz-do-not-send="true">john@wilkes.com</a></span><br>
          <span></span><br>
          <span>One of the advantages of being disorderly is that</span><br>
          <span>one is constantly making interesting discoveries.</span><br>
          <span></span><br>
          <span></span><br>
          <span></span><br>
          <span></span><br>
          <span></span><br>
        </div>
      </blockquote>
    </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>

--------------29163311E892D42B651EAD6E--


From: surgemail-support <surgemail-support@netwinsite.com>
Date: Wed, 28 Jun 2017 09:37:35 +1200

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

You can use g_virus_filter, but it doesn't act as a command line, 
instead it reads commands from stdin with the file name to scan..

Or for a simple command line g_filter_pipe.

     ChrisP.




On 27/06/2017 4:07 p.m., surgemail-list@netwinsite.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
>

-- 
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.

--------------1899A24E441D02B462F0A5FA
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>You can use g_virus_filter, but it doesn't act as a command line,
      instead it reads commands from stdin with the file name to scan..</p>
    <p>Or for a simple command line g_filter_pipe. <br>
    </p>
        ChrisP.
    <p><br>
    </p>
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 27/06/2017 4:07 p.m.,
      <a class="moz-txt-link-abbreviated" href="mailto:surgemail-list@netwinsite.com">surgemail-list@netwinsite.com</a> wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:8D879F92-2191-4EA5-9AF3-06709AF9D6B1@wilkes.com">
      <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

</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>

--------------1899A24E441D02B462F0A5FA--


From: John Wilkes <john@wilkes.com>
Date: Wed, 5 Jul 2017 13:39:34 -0700

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


> 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 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
>> john@wilkes.com
>>=20
>> One of the advantages of being disorderly is that
>> one is constantly making interesting discoveries.
>>=20
>>=20
>>=20
>>=20
>>=20



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 recipients 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? Im looking for something like g_virus_cmd that doesnt 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 recipients 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? Im looking for something like g_virus_cmd that doesnt 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 recipients public key, but that requires something like g_filter_cmd at a later stage, before delivery to a single recipients 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 recipients public key, but that requires something like g_filter_cmd at a later stage, before delivery to a single recipients 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.