Hello!
I want to block the delivery of emails from any addresses by the sender's name.
For example:
"Webmaster" <name1@mail1.com>;
"Webmaster" <name2@mail2.com>;
"Webmaster" <name3@mail3.com>;
That is, regardless of the sender's mailbox address, the sender's name "webmaster" should be blocked.
As I understand it, there is no configurable spam filter for the domain in Zimbra. There is only the possibility to configure the filter directly in the users ' mailboxes. Apparently, this problem will have to be solved through configuring SpamAssasin. Tell me how to write a SA rule (in which file, the syntax of the rule, preferably with an example).
How can I block an email by the sender's name?
- porokh
- Posts: 17
- Joined: Tue May 14, 2019 10:02 am
- Location: Ukraine
- ZCS/ZD Version: 8.8.15 RHEL7 FOSS
Re: How can I block an email by the sender's name?
Hello!
If you really want to block incoming emails by sender's name, maybe the better way to do this is a Postfix Header Checks? Something like this:
Messages will be discarded during SMTP stage (i.e. without actual receiving a tons of garbage).
If you really want to block incoming emails by sender's name, maybe the better way to do this is a Postfix Header Checks? Something like this:
Code: Select all
echo "/^From:.*Webmaster.*/ DISCARD" >>/opt/zimbra/conf/postfix_header_custom
zmprov mcf zimbraMtaHeaderChecks 'pcre:/opt/zimbra/conf/postfix_header_checks pcre:/opt/zimbra/conf/postfix_header_custom'
zmmtactl restart
Re: How can I block an email by the sender's name?
Hello porokh,
does it works also for outgoing email filtering? I need to discard outgoing emails based on "Reply-to:" email header.
Tnx & br
does it works also for outgoing email filtering? I need to discard outgoing emails based on "Reply-to:" email header.
Tnx & br
porokh wrote:Hello!
If you really want to block incoming emails by sender's name, maybe the better way to do this is a Postfix Header Checks? Something like this:Messages will be discarded during SMTP stage (i.e. without actual receiving a tons of garbage).Code: Select all
echo "/^From:.*Webmaster.*/ DISCARD" >>/opt/zimbra/conf/postfix_header_custom zmprov mcf zimbraMtaHeaderChecks 'pcre:/opt/zimbra/conf/postfix_header_checks pcre:/opt/zimbra/conf/postfix_header_custom' zmmtactl restart
Re: How can I block an email by the sender's name?
Hi Porokh!porokh wrote:Hello!
If you really want to block incoming emails by sender's name, maybe the better way to do this is a Postfix Header Checks? Something like this:Messages will be discarded during SMTP stage (i.e. without actual receiving a tons of garbage).Code: Select all
echo "/^From:.*Webmaster.*/ DISCARD" >>/opt/zimbra/conf/postfix_header_custom zmprov mcf zimbraMtaHeaderChecks 'pcre:/opt/zimbra/conf/postfix_header_checks pcre:/opt/zimbra/conf/postfix_header_custom' zmmtactl restart
Thank you very much! In fact, I don't care what kind of tool to implement the blocking. The fact of blocking is important to me. Postfix Header Checks are absolutely fine for me. Tell me, will your example ("/^From:.*Webmaster.*/ DISCARD") work for a different word format? For example, Webmaster, webmaster, WEBMASTER?
- porokh
- Posts: 17
- Joined: Tue May 14, 2019 10:02 am
- Location: Ukraine
- ZCS/ZD Version: 8.8.15 RHEL7 FOSS
Re: How can I block an email by the sender's name?
Hello, simred!simred wrote:Hello porokh,
does it works also for outgoing email filtering? I need to discard outgoing emails based on "Reply-to:" email header.
Yes, postfix header checks works for outgoing messages too; I use it for hiding my internal IP, like this:
Code: Select all
/^Received: .*192\.168\.\123\.\d+\.*/ IGNORE
- porokh
- Posts: 17
- Joined: Tue May 14, 2019 10:02 am
- Location: Ukraine
- ZCS/ZD Version: 8.8.15 RHEL7 FOSS
Re: How can I block an email by the sender's name?
Hello, GlooM!GlooM wrote:Thank you very much! In fact, I don't care what kind of tool to implement the blocking. The fact of blocking is important to me. Postfix Header Checks are absolutely fine for me. Tell me, will your example ("/^From:.*Webmaster.*/ DISCARD") work for a different word format? For example, Webmaster, webmaster, WEBMASTER?
As stated in header_checks man (http://www.postfix.org/header_checks.5.html): "By default, regexp: and pcre: patterns are case insensitive." so any case combinations will be matched.
- barrydegraaff
- Zimbra Employee
- Posts: 242
- Joined: Tue Jun 17, 2014 3:31 am
- Contact:
Re: How can I block an email by the sender's name?
You can also do this with Sieve:
https://github.com/Zimbra-Community/zim ... r/Sieve.md
https://github.com/Zimbra-Community/zim ... r/Sieve.md
--
Barry de Graaff
Email: barry.degraaff [at] synacor [dot] com
Admin of Zimbra-Community Github: https://github.com/orgs/Zimbra-Community/ and the
Zimlet Gallery https://gallery.zetalliance.org/extend/
Barry de Graaff
Email: barry.degraaff [at] synacor [dot] com
Admin of Zimbra-Community Github: https://github.com/orgs/Zimbra-Community/ and the
Zimlet Gallery https://gallery.zetalliance.org/extend/