Re: change subject of emails on ISP's IMAP server

2014-12-17 Thread Mart van de Wege
Curt cu...@free.fr writes:

 On 2014-12-16, Rob Owens row...@ptd.net wrote:

 Apparently, this is what imapfilter will do. You'll need to write a lua
 script to tell it what to do, but it looks like it comes with some
 hackable examples.

 Thanks.  I see the following example in some of the imapfilter docs.  I'll

 The problem I see is that once imapfilter fetches the message, processes
 it, and uploads it to the same mailbox, what is to prevent your ISP from
 prepending ***UNCHECKED*** to the header of the message once again,
 seeing that it will be just as unscannable as before?

 Or will it not be scanned a second time or something?

It depends on where in the process the ISP does the scanning.

From experience, they usually do that in the delivery process, either up
front at the start of the SMTP transaction, or in the delivery phase
(with either LMTP, or an MDA).

I've not heard of ISPs who scan mail in IMAP transactions.

Mart


-- 
We will need a longer wall when the revolution comes.
--- AJS, quoting an uncertain source.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/86siged0wz@gaheris.avalon.lan



Re: change subject of emails on ISP's IMAP server

2014-12-16 Thread Rob Owens
On Mon, Dec 15, 2014 at 05:38:03PM +, Darac Marjal wrote:
 On Fri, Dec 12, 2014 at 08:53:51PM -0500, Rob Owens wrote:
  When my ISP encounters an email that it cannot scan for viruses, it
  prepends ***UNCHECKED*** to the subject.  This occurs on every encrypted
  email I receive.  It's highly annoying, and the ISP refuses to fix this.
  
  What tools can I use to detect this tag and delete it?  I'd prefer to
  modify the subject of the email as it resides on my ISP's IMAP server.
  But if I have to rely on my email client (mutt) to do that, that's ok
  too I guess.
  
  Any suggestions would be welcome.  
 
 Apparently, this is what imapfilter will do. You'll need to write a lua
 script to tell it what to do, but it looks like it comes with some
 hackable examples.

Thanks.  I see the following example in some of the imapfilter docs.  I'll have
to stare at it until it makes sense.  If anybody can offer any assistance, 
please chime in.  Until then, I will be reading lua documentation.

-- Messages can be appended to a mailbox.  One can fetch a message from a
-- mailbox, optionally process it, and then upload it to the same or different
-- mailbox, at the same or different mail servers.  In the following example a
-- header field is added to all messages, and the processed messages are then
-- appended to a different mailbox.

all = myaccount.mymailbox:select_all()

for _, mesg in ipairs(all) do
mbox, uid = table.unpack(all)
header = mbox[uid]:fetch_header()
body = mbox[uid]:fetch_body()
message = header:gsub('[\r\n]+$', '\r\n') ..
  'My-Header: My-Content\r\n' .. '\r\n' .. body
myaccount.myothermaibox:append_message(message)
end



signature.asc
Description: Digital signature


Re: change subject of emails on ISP's IMAP server

2014-12-16 Thread Curt
On 2014-12-16, Rob Owens row...@ptd.net wrote:

 Apparently, this is what imapfilter will do. You'll need to write a lua
 script to tell it what to do, but it looks like it comes with some
 hackable examples.

 Thanks.  I see the following example in some of the imapfilter docs.  I'll

The problem I see is that once imapfilter fetches the message, processes
it, and uploads it to the same mailbox, what is to prevent your ISP from
prepending ***UNCHECKED*** to the header of the message once again,
seeing that it will be just as unscannable as before?

Or will it not be scanned a second time or something?

Otherwise, maybe someone can help you lua regular expressions (not my
case) in order to delete ***UNCHECKED*** from the header field.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/slrnm911vn.240.cu...@einstein.electron.org



Re: change subject of emails on ISP's IMAP server

2014-12-15 Thread Darac Marjal
On Fri, Dec 12, 2014 at 08:53:51PM -0500, Rob Owens wrote:
 When my ISP encounters an email that it cannot scan for viruses, it
 prepends ***UNCHECKED*** to the subject.  This occurs on every encrypted
 email I receive.  It's highly annoying, and the ISP refuses to fix this.
 
 What tools can I use to detect this tag and delete it?  I'd prefer to
 modify the subject of the email as it resides on my ISP's IMAP server.
 But if I have to rely on my email client (mutt) to do that, that's ok
 too I guess.
 
 Any suggestions would be welcome.  

Apparently, this is what imapfilter will do. You'll need to write a lua
script to tell it what to do, but it looks like it comes with some
hackable examples.

 
 -Rob




signature.asc
Description: Digital signature


Re: change subject of emails on ISP's IMAP server

2014-12-13 Thread Rob Owens
On Fri, Dec 12, 2014 at 09:47:55PM -0500, The Wanderer wrote:
 On 12/12/2014 at 08:53 PM, Rob Owens wrote:
 
  When my ISP encounters an email that it cannot scan for viruses, it
  prepends ***UNCHECKED*** to the subject.  This occurs on every
  encrypted email I receive.  It's highly annoying, and the ISP refuses
  to fix this.
  
  What tools can I use to detect this tag and delete it?  I'd prefer
  to modify the subject of the email as it resides on my ISP's IMAP
  server. But if I have to rely on my email client (mutt) to do that,
  that's ok too I guess.
  
  Any suggestions would be welcome.
 
 The last time I mentioned wanting to do something like this, what was
 recommended to me was procmail, which would sit between the upstream
 server and your mail client.
 
I thought procmail wouldn't work, because the mail doesn't actually
reside on my system.  But I'll look into it.  Like you said, it may lead
me down the path to alternatives.

-Rob


signature.asc
Description: Digital signature


Re: change subject of emails on ISP's IMAP server

2014-12-13 Thread Paul E Condon
On 20141213_1034-0500, Rob Owens wrote:
 On Fri, Dec 12, 2014 at 09:47:55PM -0500, The Wanderer wrote:
  On 12/12/2014 at 08:53 PM, Rob Owens wrote:
  
   When my ISP encounters an email that it cannot scan for viruses, it
   prepends ***UNCHECKED*** to the subject.  This occurs on every
   encrypted email I receive.  It's highly annoying, and the ISP refuses
   to fix this.
   
   What tools can I use to detect this tag and delete it?  I'd prefer
   to modify the subject of the email as it resides on my ISP's IMAP
   server. But if I have to rely on my email client (mutt) to do that,
   that's ok too I guess.
   
   Any suggestions would be welcome.
  
  The last time I mentioned wanting to do something like this, what was
  recommended to me was procmail, which would sit between the upstream
  server and your mail client.
  
 I thought procmail wouldn't work, because the mail doesn't actually
 reside on my system.  But I'll look into it.  Like you said, it may lead
 me down the path to alternatives.
 
 -Rob

In addition to procmail, you need a remote login account on which you
can execute command line programs on your ISP's computer.

(It is very unlikely that they offer this service given their attitude
about messing with the headers in your email.)

You can run procmail on your ISP's computer. In the procmailrc, write
a filter that passes the incoming email through program, formail,
which is a general purpose email reformatter, which you use to send
each email through the program, sed, the stream editor and have sed
apply the 'sed s command', 's|***UNCHECKED***||' to each email.

If you can string all this together on your ISP's computer, it will
delete *all* instances of ***UNCHECKED*** wherever thet occur in
emails. 

In theory, it can be done but it seems like an awful lot of work with
very little payoff ;-)


-- 
Paul E Condon   
pecon...@mesanetworks.net


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141214042814.gb1...@big.lan.gnu



change subject of emails on ISP's IMAP server

2014-12-12 Thread Rob Owens
When my ISP encounters an email that it cannot scan for viruses, it
prepends ***UNCHECKED*** to the subject.  This occurs on every encrypted
email I receive.  It's highly annoying, and the ISP refuses to fix this.

What tools can I use to detect this tag and delete it?  I'd prefer to
modify the subject of the email as it resides on my ISP's IMAP server.
But if I have to rely on my email client (mutt) to do that, that's ok
too I guess.

Any suggestions would be welcome.  

-Rob


signature.asc
Description: Digital signature


Re: change subject of emails on ISP's IMAP server

2014-12-12 Thread The Wanderer
On 12/12/2014 at 08:53 PM, Rob Owens wrote:

 When my ISP encounters an email that it cannot scan for viruses, it
 prepends ***UNCHECKED*** to the subject.  This occurs on every
 encrypted email I receive.  It's highly annoying, and the ISP refuses
 to fix this.
 
 What tools can I use to detect this tag and delete it?  I'd prefer
 to modify the subject of the email as it resides on my ISP's IMAP
 server. But if I have to rely on my email client (mutt) to do that,
 that's ok too I guess.
 
 Any suggestions would be welcome.

The last time I mentioned wanting to do something like this, what was
recommended to me was procmail, which would sit between the upstream
server and your mail client.

I never investigated (my circumstances at the time didn't lend
themselves to its being a practical solution), so I don't know what the
mechanics of the whole thing would be or how the mail flow would look,
but it could certainly do that type of filtering.

It may not be ideally suited to use with IMAP, but Googling on 'procmail
IMAP' (without quotes) finds a couple of hits which look like they might
be decent leads - either on how to do it with procmail, or on possible
alternative solutions.

If you find a solid solution, please let me know, as I'd be interested
in something like that myself; it's just never been important enough for
me to make a project out of it.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw



signature.asc
Description: OpenPGP digital signature