Remove users from suspension list
Hi,
How to remove users email from suspensions list immediately. Right now it says it will get removed after 30 days. Please help ASAP...
You can remove someone from the suspension list by manually releasing an email to them as the suppression list means emails to that person will be held automatically.
If you need to remove lots of people, it may be easier to clear from the database directly.
How can I access the database and what command do I need to run to remove the users from it.
You will have entered all the details into the postal.yml file so if you don't have the technical knowledge to access the database, its probably safer that you don't.
If you get into the databases, you should see that each server you have set up in the Postal UI has its own database and each of those databases has a table called suppressions. You should be able to remove the rows from that table with whatever software you're using to connect to the database.
I got the table name and it is "suppressions". Thanks!
great, feel free to close if you don't have any more questions
If you use a unique Postal database server and need to clear the suppression list on all mail servers, here's my bash-one-line tip:
export DB_PASS=mypassword; \
for j in `echo 'show databases like "postal-server-%" ' |mysql -u root -p$DB_PASS \
|grep 'postal-server-' |awk '(NR>1)'`; \
do mysql -u root -p$DB_PASS $j -e "truncate suppressions"; done
I'd definitely argue against having your root password in your terminal history, you could use something similar with the Postal database user details from the config file which would be slightly less risky.
If you use a unique Postal database server and need to clear the suppression list on all mail servers, here's my bash-one-line tip:
export DB_PASS=mypassword; \ for j in `echo 'show databases like "postal-server-%" ' |mysql -u root -p$DB_PASS \ |grep 'postal-server-' |awk '(NR>1)'`; \ do mysql -u root -p$DB_PASS $j -e "truncate suppressions"; done
I made a python script to clean all held messages, on a specific mail server:
https://gist.github.com/cinco/1e2efe4d67dc69b2a26704378ef358ae
Attention to the necessary environment variables:
POSTAL_LOGIN=your-email
POSTAL_PASSWORD=your-pass
POSTAL_URL=http://your-postal-domain
POSTAL_ORGANIZATION=slug-of-your-organization
POSTAL_MAIL_SERVER=slug-of-mail-server