Block sending servers by name

MaPf

Active Member
Apr 5, 2020
14
3
43
47
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.