On 8/14/2017 5:28 AM, soumi...@iitk.ac.in wrote: > Hello, > > In Postfix, I want > > 1) Copy all emails containing specific pattern in body to another > email id, but all recipients in that will get the mails as usual. > > 2) Redirect all emails containing specific pattern in body to > another mail relay.
Postfix header_checks and/or body_checks can probably do what you what. See the BCC, FILTER, and REDIRECT actions to decide what you need. http://www.postfix.org/header_checks.5.html Be aware that header_checks and body_checks only sees the "raw" email; there is no decoding of HTML or quoted-printable or base64 text. For more complete control, use a milter. > I also want to know > > 3) The best practices with postfix, any URL will help. http://www.postfix.org/documentation.html > 4) Any recent postfix version 3 book in English with . I'm not aware of any books specifically covering postfix version 3. However, there are good books on postfix version 2 that are still excellent for a beginner. "The Book of Postfix" by Hildebrandt and Koetter is a great place to start if you can find it. "Postfix: The Definitive Guide" by Dent is also good. Unfortunately for writers, postfix evolves pretty quickly. This makes it impossible to keep a print copy anywhere close to current. The best documentation is the postfix web site, which Wietse spends a great deal of effort keeping current and correct. http://www.postfix.org/documentation.html > 5) Best external mail filtering open source software for postfix. This is a very subjective question. "Best" varies based on your goals and skill level. I like amavisd-new running pre-queue with smtpd_proxy_filter or amavisd-milter, but some people are overwhelmed by the great number of config options. https://www.ijs.si/software/amavisd/ Good Luck! -- Noel Jones