block smtp connection by subject and delete specific messages by console

emper0r

New Member
Dec 16, 2022
19
0
1
Hi. have som questioins related

1- what's steps have to follow to block smtp connection dialog if the sender put specific subject to not accept that message and not fill disks.??

2- if I use WebGUI to select delete all messages. i see the result to 0 but usage disk still remain high.. and not descend to recover those messages deleted... exist some tool to sync after delete messages to recover that space???

3- the WebGUI. If i have mixed mails.. and have to select specifics mail.. i can't select for example 1,4,9,20 at time.... have to delete 1 by 1.. so if i have a mixed mail where have the same problem 1000 times repeated ... 1 by 1 is very hard to delete it.... the only solution is going to console to make a

mailq | tail -n +2 | head -n -2 | grep -v '^ *(' | awk 'BEGIN { RS = "" } { if (($7 == "sender@example.com") && ($8 ~ "somedomain.com")) print $1 }' | tr -d '*!' | postsuper -d -

??? this not impact in some databse internal from pmg software becase was deleted by hand and not managed by pmg it self or pmg in someway can sync real queue ?

in the logs have this files

root@pmg:/var/log# du -hs journal/29a9e02bdd6948789590c06b8f90a879/*
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000bebd22-0005f0899b12338f.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000c00fcb-0005f089c3fe8d0a.journal
105M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000c160ed-0005f089e0b8a0ab.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000c2b42c-0005f089e9e48817.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000c405a5-0005f089f681353a.journal
105M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000c55753-0005f08a030a514a.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000c6a905-0005f08a11331e6f.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000c7fa03-0005f08a2176b4a5.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000c94c6d-0005f08a29f0b8e3.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000ca9f64-0005f08a339c3313.journal
105M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000cbf484-0005f08a603005cf.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000cd4826-0005f08a954dd622.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000ce9b7d-0005f08add312287.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000cfeeea-0005f08aef033454.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000d14279-0005f08af66a4293.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000d295b8-0005f08b00817370.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000d3e948-0005f08b0a05bbff.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000d53c78-0005f08b16719536.journal
105M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000d68fbe-0005f08b58446050.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000d7e333-0005f08bc3c4f43a.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000d93669-0005f08be0959ac6.journal
105M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000da89df-0005f08bf05183e2.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000dbdd59-0005f08c0074c261.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000dd3094-0005f08c122e5ca5.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000de83b6-0005f08c7819d755.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000dfd71a-0005f08cd1776e88.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000e12abf-0005f08ce34cc349.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000e27e5e-0005f08cf076defb.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000e3d1d4-0005f08d000c2d59.journal
105M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000e52515-0005f08d19764892.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000e677cb-0005f08da5af8aee.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000e7d2db-0005f08dd1da0713.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000e925d5-0005f08ddef93ca1.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000ea7e3e-0005f08de7535202.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000ebd24a-0005f08def69f714.journal
113M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000ed2991-0005f08df8bb028e.journal
105M journal/29a9e02bdd6948789590c06b8f90a879/system@60217b453588493e97082a04c647c9ac-0000000000ee7d7e-0005f08e0292568b.journal
81M journal/29a9e02bdd6948789590c06b8f90a879/system.journal


taking many spaces on disk usages... exist some tool to rotate this journal files to keep my partition in some way to avoid block pmg ???
 
Last edited:
1- what's steps have to follow to block smtp connection dialog if the sender put specific subject to not accept that message and not fill disks.??
create a rule with 'Match Field' What object (the field is subject) and action Block

but disks in a PMG very seldomly fill due to mail - check what exactly is using the diskspace in your installation (e.g. using `ncdu`)

3- the WebGUI. If i have mixed mails.. and have to select specifics mail.. i can't select for example 1,4,9,20 at time.... have to delete 1 by 1.. so if i have a
see https://bugzilla.proxmox.com/show_bug.cgi?id=3450 - this is the enhancement request for this feature. - you can subscribe to it and will get notified when/if we implement it

??? this not impact in some databse internal from pmg software becase was deleted by hand and not managed by pmg it self or pmg in someway can sync real queue ?
the postfix queue can be administered with postfix utilities - this usually does not create any problems for PMG (PMG does not store the postfix
queue data additionally somewhere else)

in the logs have this files
see `man journald.conf` (SystemMaxUse parameter)

I hope this helps!