Forwarding a false positive classified message

2024-01-04 Thread Kai Weber
>From time to time I have to report a falsly classified message to my mail 
>provider so that they can adjust their filters. I am looking for a way to 
>automate that:

1. Forward selected mail as attachement to x...@foo.com
2. Set Subject to "reporting false positive -- [original subject]"
3. open editor with a prefilled message "Hello there, ..."
4. save message to my inbox

I am unsure how to achieve 1-3 with a macro. Is a macro the correct way to do 
that?


Re: Forwarding a false positive classified message

2024-01-04 Thread Todd Zullinger
Hi,

Kai Weber wrote:
> From time to time I have to report a falsly classified
> message to my mail provider so that they can adjust their
> filters. I am looking for a way to automate that:
> 
> 1. Forward selected mail as attachement to x...@foo.com
> 2. Set Subject to "reporting false positive -- [original subject]"
> 3. open editor with a prefilled message "Hello there, ..."
> 4. save message to my inbox
> 
> I am unsure how to achieve 1-3 with a macro. Is a macro
> the correct way to do that?

I have one which reports missed spam messages.  It looks
roughly like this (edited a bit to remove unrelated parts
and wrap it -- hopefully I haven't broken the syntax in the
process):

macro index ,s "spam-rep...@example.com\
Missed spam\
" "Report missed spam"
macro pager ,s ",s" "Report missed spam"

You would want to replace `Missed spam` with
something like `reporting false positive -- []`.

You would not need `` for non-spam. ;)

I'm sure others here have better macros.  But this works
for me.  Hopefully this gives you some ideas for how to
create something which works for you.

-- 
Todd


signature.asc
Description: PGP signature


Re: Forwarding a false positive classified message

2024-01-04 Thread Michael Kjörling
On 4 Jan 2024 18:42 +0800, from kai.we...@glorybox.de (Kai Weber):
> From time to time I have to report a falsly classified message to my
> mail provider so that they can adjust their filters. I am looking
> for a way to automate that:
> 
> 1. Forward selected mail as attachement to x...@foo.com
> 2. Set Subject to "reporting false positive -- [original subject]"
> 3. open editor with a prefilled message "Hello there, ..."
> 4. save message to my inbox
> 
> I am unsure how to achieve 1-3 with a macro. Is a macro the correct way to do 
> that?

You can set $editor to a script (it will be invoked with as its only
parameter the path to a file containing the message, including headers
if $edit_headers is set) which makes the adjustments you want and then
launches your normal editor or exits with an appropriate status.

formail is useful for reading and modifying mail headers from within a
script.

On another note, please don't use someone's real domain name (like
foo.com) as an example. It's better to use one of the domains reserved
for the purpose; for example, example.com or isp.example. You might
find https://michael.kjorling.se/internet-reserved-names-and-networks/
helpful.

-- 
Michael Kjörling 🔗 https://michael.kjorling.se
“Remember when, on the Internet, nobody cared that you were a dog?”