How can limit the number of recipients in a single message?

kaelthasmanu

New Member
Mar 22, 2023
3
0
1
Hello
Is there an option in proxmox mail gateway to limit the number of recipients in a single message? I've searched but I can't find it
 
Hello friend, I tried the solution that gave me adding that parameter to main.cf.in and it didn't work for me, I don't know if I did it wrong
Yes, it isn't work as expected.
So you can try block this e-mail via spamassassin like in this topic
You can add to file/create file /etc/mail/spamassassin/custom.cf
Code:
header __COUNT_RCPTS To =~ /(?:[^@,\s]+@[^@,\s]+)/
tflags __COUNT_RCPTS multiple
meta RCPTS_10_PLUS (__COUNT_RCPTS > 10)
describe RCPTS_10_PLUS block e-mail with more, than 10 recipients
score RCPTS_10_PLUS 2
and after reload smtp filters
Code:
systemctl reload pmg-smtp-filter
This rule wll add score 2 to e-mail with more than 10 recipients.
1680050961215.png
So custom rule with high spam score (30+) and mail filter to block e-mail with high spam score (30+) will block incoming e-mails with high count of recipients.
 
  • Like
Reactions: kaelthasmanu
Yes, it isn't work as expected.
So you can try block this e-mail via spamassassin like in this topic
You can add to file/create file /etc/mail/spamassassin/custom.cf
Code:
header __COUNT_RCPTS To =~ /(?:[^@,\s]+@[^@,\s]+)/
tflags __COUNT_RCPTS multiple
meta RCPTS_10_PLUS (__COUNT_RCPTS > 10)
describe RCPTS_10_PLUS block e-mail with more, than 10 recipients
score RCPTS_10_PLUS 2
and after reload smtp filters
Code:
systemctl reload pmg-smtp-filter
This rule wll add score 2 to e-mail with more than 10 recipients.
View attachment 48600
So custom rule with high spam score (30+) and mail filter to block e-mail with high spam score (30+) will block incoming e-mails with high count of recipients.
thank you very much friend it worked for me that way
 
Hello everyone. This rule worked fine to me when i receive a message send to multiple mailboxes on "normal mode", but when the sender uses cc or cco the rule doesnt get de message. Any ideas? I tried to modify "To =" using "cc =" and "cco =" but didint work.
 
Hello everyone. This rule worked fine to me when i receive a message send to multiple mailboxes on "normal mode", but when the sender uses cc or cco the rule doesnt get de message. Any ideas? I tried to modify "To =" using "cc =" and "cco =" but didint work.
Hello... if anyone has the same problem: change it to ToCc and works fine. About bcc (cco), nothing to do. This kind of message is delivered one by one for the email system and there is no information about multiple mailboxes in the head.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!