[SOLVED] Unable to add items to blacklist

oliwel

Well-Known Member
Feb 11, 2018
38
1
48
48
Hi,

I am trying to blacklist a domain but regardsless of what I am entering into the fields I get

Parameter verification failed. (400)
pmail: parameter required with role 'root'

Any help is appreciated..

Oliver
 
pmgversion -v
proxmox-mailgateway: 5.0-9 (API: 5.0-71/a0907ff5, running kernel: 4.13.16-3-pve)
pmg-api: 5.0-71
pmg-gui: 1.0-38
proxmox-spamassassin: 3.4.1-55
proxmox-widget-toolkit: 1.0-18
pve-kernel-4.13.16-3-pve: 4.13.16-49
pve-kernel-4.13: 5.1-45
pve-kernel-4.13.13-5-pve: 4.13.13-38
libpve-http-server-perl: 2.0-9
lvm2: 2.02.168-2
pve-firmware: 2.0-4
libpve-common-perl: 5.0-32
pmg-docs: 5.0-14
pve-xtermjs: 1.0-5
libarchive-perl: 3.2.1-1
libxdgmime-perl: 0.01-3
zfsutils-linux: 0.7.9-pve1~bpo9
libpve-apiclient-perl: 2.0-2
 
Please can you update to latest version and test again (work here).
Hi Dietmar,

I already using Promox Mail Gateway v5.2.1 and i recently just doin apt-get upgrade from the console.
After the upgrade is finish, am i need to restart the Proxmox Mail Gateway?

Best Regards,
Raihan
 
I already using Promox Mail Gateway v5.2.1 and i recently just doin apt-get upgrade from the console.
After the upgrade is finish, am i need to restart the Proxmox Mail Gateway?

Only If the update installs a new kernel.
 
Good Evening,
I have recently setup a Mail gateway. I am having the exact same issue no matter what I try to blacklist. The blacklist page suggests I can blacklist *@test.com but I only receive the same error as in the first post above. The same error is presented when I try to whitelist any email address or domain.

Running pmgversion -v
proxmox-mailgateway: 5.2-1 (API: 5.2-7/9943bd5d, running kernel: 4.15.18-20-pve)
pmg-api: 5.2-7
pmg-gui: 1.0-45
pve-kernel-4.15: 5.4-8
pve-kernel-4.15.18-20-pve: 4.15.18-46
pve-kernel-4.15.18-12-pve: 4.15.18-36
libarchive-perl: 3.2.1-1
libjs-extjs: 6.0.1-2
libjs-framework7: 4.0.5-1
libpve-apiclient-perl: 2.0-5
libpve-common-perl: 5.0-54
libpve-http-server-perl: 2.0-14
libxdgmime-perl: 0.01-3
lvm2: 2.02.168-2
pmg-docs: 5.2-3
proxmox-mini-journalreader: 1.0-1
proxmox-spamassassin: 3.4.2-3
proxmox-widget-toolkit: 1.0-28
pve-firmware: 2.0-5
pve-xtermjs: 3.10.1-2
zfsutils-linux: 0.7.13-pve1~bpo1

I am logged in as root. Up to this point the proxmox box has been working wonderfully. Any advice would be greatly appreciated.
Blacklisting is required even if I would prefer not to have to.

Thanks Very Much.

Ok..ps.. Very weird trying to blacklist *@s7.exacttarget.com works.. trying to blacklist *@bounce.s7.exacttarget.com fails... with the error in the first post..

thoughts?

Since I am doing this on the latest version with all of the updates installed, the problem is most certainly not solved....
Just saying....
 
Last edited:
  • Like
Reactions: pietroaretino
I am having the exact same issue.

I am attempting to add a single email address to the blacklist: spameri@tiscali.it

However I receive the same error.

I am logged in as root.

Here is my current version of PMG:

proxmox-mailgateway: 6.0-1 (API: 6.1-3/1975aa1f, running kernel: 5.0.21-1-pve)
pmg-api: 6.1-3
pmg-gui: 2.1-4
pve-kernel-helper: 6.0-12
pve-kernel-5.0: 6.0-7
pve-kernel-5.0.21-1-pve: 5.0.21-1
libarchive-perl: 3.3.3-1
libjs-extjs: 6.0.1-10
libjs-framework7: 4.4.7-1
libpve-apiclient-perl: 3.0-2
libpve-common-perl: 6.0-9
libpve-http-server-perl: 3.0-3
libxdgmime-perl: 0.01-5
lvm2: 2.03.02-3
pmg-docs: 6.1-2
proxmox-mini-journalreader: 1.1-1
proxmox-spamassassin: 3.4.2-13
proxmox-widget-toolkit: 2.1-1
pve-firmware: 3.0-4
pve-xtermjs: 3.13.2-1
zfsutils-linux: 0.8.2-pve2
 
HI,
Ok here is what I have found out on my own. There are three whitelists. At the top there are "who" objects.. This is where you would blacklist spameri@tiscali.it or just tiscali.it This part is really useful.

The second whitelist is under mail proxy. This is where you would whitelist IP's that send you mail. So a client IP block if they have IPs that are frequently blocked..

The third is the user whitelist/ User blacklist. This is for the users to be able to block idiots on their own.
The first part you put in the users email address, then you click add and put in the spammers email. Normally you don't touch this spot as it is for the users and will be added as they block people.

It was super confusing for me, till i figurd out in a different thread this is how it was setup. Now.. everything works as its supposed to. The who objects allow you to block right away...

..ex
 
  • Like
Reactions: pietroaretino
Hi.. yes..

I did it for bit coin spam and then top level domains...

##body Bitcoin_rule
body __BTC1 /\b[13][a-km-zA-HJ-NP-Z1-9]{25,34}\b/
body __BTC2 /\b\W*b\W*i\W*t\W*c\W*o\W*i\W*n\W*\b/i
body __BTC3 /\b\W*b\W*t\W*c\W*\b/i
body __BTC4 /bt[c\x{0441}]/i
body __BTC5 /b[i\x{0456}]t[c\x{0441}][o\x{043E}][i\x{0456}]n/i
meta LOCAL_BITCOIN ( __BTC1 && ( __BTC2 || __BTC3 || __BTC4 || __BTC5 ) )
score LOCAL_BITCOIN 10.2
describe LOCAL_BITCOIN This is to stop bitcoin ransomware idiots
##Stop bitcoin spam

##Block spam from certain top level domains###
header __FROM_TLDFROM From =~ /\.(bid|vn|tech|rs|sg|icu|best|book|top|monster|click|cricket|date|democrat|directory|download|faith|help|host|link|ninja|online|party|press|pro|racing|reviews?|rocks|science|site|social|space|stream|top|webcam|website|work|win|xyz)\>/i

header __FROM_TLDFROMA From:address =~ /\.(bid|vn|tech|rs|sg|icu|best|book|top|monster|click|cricket|date|democrat|directory|download|faith|help|host|link|ninja|online|party|press|pro|racing|reviews?|rocks|science|site|social|space|stream|top|webcam|website|work|win|xyz)\>/i

meta FROM_TLD ( __FROM_TLDFROM + __FROM_TLDFROMA >= 1 )
score FROM_TLD 10.2
describe FROM_TLD Forbiden TLDs

# ends TLDs blocked rule

After you edit or create the custom.cf you need to restart the proxmox... i think you could just restart spamassassin, but i find it easier to just restart. (also all the tld's should be on one line.

In the old days you could do it like this... pain in the butt really.. the above works better in my opinion..
If you are blocking domains, use the "Who" blacklist. so this below.. is no longer relevant.

blacklist_from *@sowhaitit.me
blacklist_from *@mybizmailer.com
blacklist_from *.party
blacklist_from *.xyz
blacklist_from *.science
blacklist_from *.webcam
blacklist_from *.faith
blacklist_from *.date
blacklist_from *.review
blacklist_from *.help
blacklist_from *.download
blacklist_from *.accountant


..ex
 
Hi.. yes..

I did it for bit coin spam and then top level domains...

##body Bitcoin_rule
body __BTC1 /\b[13][a-km-zA-HJ-NP-Z1-9]{25,34}\b/
body __BTC2 /\b\W*b\W*i\W*t\W*c\W*o\W*i\W*n\W*\b/i
body __BTC3 /\b\W*b\W*t\W*c\W*\b/i
body __BTC4 /bt[c\x{0441}]/i
body __BTC5 /b[i\x{0456}]t[c\x{0441}][o\x{043E}][i\x{0456}]n/i
meta LOCAL_BITCOIN ( __BTC1 && ( __BTC2 || __BTC3 || __BTC4 || __BTC5 ) )
score LOCAL_BITCOIN 10.2
describe LOCAL_BITCOIN This is to stop bitcoin ransomware idiots
##Stop bitcoin spam

##Block spam from certain top level domains###
header __FROM_TLDFROM From =~ /\.(bid|vn|tech|rs|sg|icu|best|book|top|monster|click|cricket|date|democrat|directory|download|faith|help|host|link|ninja|online|party|press|pro|racing|reviews?|rocks|science|site|social|space|stream|top|webcam|website|work|win|xyz)\>/i

header __FROM_TLDFROMA From:address =~ /\.(bid|vn|tech|rs|sg|icu|best|book|top|monster|click|cricket|date|democrat|directory|download|faith|help|host|link|ninja|online|party|press|pro|racing|reviews?|rocks|science|site|social|space|stream|top|webcam|website|work|win|xyz)\>/i

meta FROM_TLD ( __FROM_TLDFROM + __FROM_TLDFROMA >= 1 )
score FROM_TLD 10.2
describe FROM_TLD Forbiden TLDs

# ends TLDs blocked rule

After you edit or create the custom.cf you need to restart the proxmox... i think you could just restart spamassassin, but i find it easier to just restart. (also all the tld's should be on one line.

In the old days you could do it like this... pain in the butt really.. the above works better in my opinion..
If you are blocking domains, use the "Who" blacklist. so this below.. is no longer relevant.

blacklist_from *@sowhaitit.me
blacklist_from *@mybizmailer.com
blacklist_from *.party
blacklist_from *.xyz
blacklist_from *.science
blacklist_from *.webcam
blacklist_from *.faith
blacklist_from *.date
blacklist_from *.review
blacklist_from *.help
blacklist_from *.download
blacklist_from *.accountant


..ex

Excellent.

in theory it should work the old way of spamassassin, I'm going to do tests.
 
HI,
Ok here is what I have found out on my own. There are three whitelists. At the top there are "who" objects.. This is where you would blacklist spameri@tiscali.it or just tiscali.it This part is really useful.

The second whitelist is under mail proxy. This is where you would whitelist IP's that send you mail. So a client IP block if they have IPs that are frequently blocked..

The third is the user whitelist/ User blacklist. This is for the users to be able to block idiots on their own.
The first part you put in the users email address, then you click add and put in the spammers email. Normally you don't touch this spot as it is for the users and will be added as they block people.

It was super confusing for me, till i figurd out in a different thread this is how it was setup. Now.. everything works as its supposed to. The who objects allow you to block right away...

..ex

Christ! Thanks man, I could not wrap my head around that. I was getting so confused when near the drop down it said "Could not find any entries in the database", and I figured it stored email addresses that passed through the proxy and my mailserver has been up and running by sometime, so I couldn't figure out why there weren't any entries. Now i know! Its not email addresses but local users.

Thanks for saving me a headache!
 
Hi.. yes..

I did it for bit coin spam and then top level domains...

##body Bitcoin_rule
body __BTC1 /\b[13][a-km-zA-HJ-NP-Z1-9]{25,34}\b/
body __BTC2 /\b\W*b\W*i\W*t\W*c\W*o\W*i\W*n\W*\b/i
body __BTC3 /\b\W*b\W*t\W*c\W*\b/i
body __BTC4 /bt[c\x{0441}]/i
body __BTC5 /b[i\x{0456}]t[c\x{0441}][o\x{043E}][i\x{0456}]n/i
meta LOCAL_BITCOIN ( __BTC1 && ( __BTC2 || __BTC3 || __BTC4 || __BTC5 ) )
score LOCAL_BITCOIN 10.2
describe LOCAL_BITCOIN This is to stop bitcoin ransomware idiots
##Stop bitcoin spam

##Block spam from certain top level domains###
header __FROM_TLDFROM From =~ /\.(bid|vn|tech|rs|sg|icu|best|book|top|monster|click|cricket|date|democrat|directory|download|faith|help|host|link|ninja|online|party|press|pro|racing|reviews?|rocks|science|site|social|space|stream|top|webcam|website|work|win|xyz)\>/i

header __FROM_TLDFROMA From:address =~ /\.(bid|vn|tech|rs|sg|icu|best|book|top|monster|click|cricket|date|democrat|directory|download|faith|help|host|link|ninja|online|party|press|pro|racing|reviews?|rocks|science|site|social|space|stream|top|webcam|website|work|win|xyz)\>/i

meta FROM_TLD ( __FROM_TLDFROM + __FROM_TLDFROMA >= 1 )
score FROM_TLD 10.2
describe FROM_TLD Forbiden TLDs

# ends TLDs blocked rule

After you edit or create the custom.cf you need to restart the proxmox... i think you could just restart spamassassin, but i find it easier to just restart. (also all the tld's should be on one line.

In the old days you could do it like this... pain in the butt really.. the above works better in my opinion..
If you are blocking domains, use the "Who" blacklist. so this below.. is no longer relevant.

blacklist_from *@sowhaitit.me
blacklist_from *@mybizmailer.com
blacklist_from *.party
blacklist_from *.xyz
blacklist_from *.science
blacklist_from *.webcam
blacklist_from *.faith
blacklist_from *.date
blacklist_from *.review
blacklist_from *.help
blacklist_from *.download
blacklist_from *.accountant


..ex

I think the big problem of using Who blacklist, is when you have about 800 domains to block, do you imagine being putting one by one, so I asked if it is possible to add it to the custom.cf file, what other alternative is there to make it faster?
 
I think the big problem of using Who blacklist, is when you have about 800 domains to block, do you imagine being putting one by one, so I asked if it is possible to add it to the custom.cf file, what other alternative is there to make it faster?

Hi, Sorry I have been busy with other things.
Yes you can create a custom.cf and add your list there. Use the regular spamassassin format for your list... they have a wiki that helps with syntax.
Once you are finished, restart the daemon with:

systemctl restart pmg-smtp-filter

and then

systemctl status pmg-smtp-filter

to make sure its all working.
 

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!