procmail
[Top] [All Lists]

Re: filter based on "From: " content

2020-11-18 02:26:29

On 2020-11-18 00:33, Zhiliang Hu wrote:
To catch mail to self could be an overkill as someone could copy mail to self (multiple addresses in "To:") when people tend not to manage "Sent" box these days.

I was thinking a recipe to parse out the 2 parts in "From:" line:
  "joe(_at_)mysite(_dot_)org" <extusr(_at_)water(_dot_)ne(_dot_)jp>
which obviously is not legitimate. That's why I mentioned using 'formail'..

See (for example) H_vars.inc in
https://rvtol.home.xs4all.nl/procmail/basic/pm/
on how to match and capture parts of the message into variables.

In there, $H_From_ and $H_From are separate captures:
the envelope-from and the header-from.

In https://rvtol.home.xs4all.nl/procmail/basic/
there is a gl_demo.rc that shows some usage.

-- Ruud
____________________________________________________________
procmail mailing list -- procmail(_at_)lists(_dot_)rwth-aachen(_dot_)de   
Procmail homepage: http://www.procmail.org/
To unsubscribe send an email to 
procmail-leave(_at_)lists(_dot_)rwth-aachen(_dot_)de
https://lists.rwth-aachen.de/postorius/lists/procmail.lists.rwth-aachen.de

<Prev in Thread] Current Thread [Next in Thread>