Block sending servers by name

MaPf

Member
Apr 5, 2020
5
0
6
45
Hi there,

is it possible to block servers by hostname?
I know it can be done with IP/network, but since I don't know the size of the sending network, I'd like to block only the servers hostname(s) , ideally with regex
e.g. from
Code:
Received: from smtp-b-126.online-marketing-mail.de (smtp-b-126.online-marketing-mail.de [136.243.52.126])

I'd block
Code:
.*marketing-mail.*

I tried with regex in WHO and in WHAT objects, no success
 
Hi MaPf.

I had a similar issue, but I wanted to WHITELIST instead. You can see ticket https://forum.proxmox.com/threads/unable-to-whitelist-servers-for-bad-spf.99745/ where I got a lot of help from Stoiko (thanks again man).
I think that if you change :
Code:
/^.+\.smtp-out\.videotron\.ca$/ OK
/^.+\.sendgrid\.net$/ OK
to :
Code:
/^.+\.marketing-mail\..+$/ REJECT
it should work.

The problem, as I understood it, was that black and whitelisting you see in the PMG GUI are based on the FROM address (with the @), not the SERVER address itself.

Can you try and get back with the result?
 
Hi MaPf.

I had a similar issue, but I wanted to WHITELIST instead. You can see ticket https://forum.proxmox.com/threads/unable-to-whitelist-servers-for-bad-spf.99745/ where I got a lot of help from Stoiko (thanks again man).
I think that if you change :
Code:
/^.+\.smtp-out\.videotron\.ca$/ OK
/^.+\.sendgrid\.net$/ OK
to :
Code:
/^.+\.marketing-mail\..+$/ REJECT
it should work.

The problem, as I understood it, was that black and whitelisting you see in the PMG GUI are based on the FROM address (with the @), not the SERVER address itself.

Can you try and get back with the result?
Thank you, I'll give it a try.
I guess there is no way to do that in the GUI?
 
I guess there is no way to do that in the GUI?
No there isn't.
Good luck and come back with your feedback and don't forget to change the status of this thread to RESOLVED if it work.
 

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!