Linux: Change default IP address on host with multiple IP address
If you have a host with multiple IP address on it, and you need to change witch IP address it present it with on the Internet, you can change the Default IP address, by...
Kenneth Qvistgaard Dalbjerg, IT Konsulent i århus
If you have a host with multiple IP address on it, and you need to change witch IP address it present it with on the Internet, you can change the Default IP address, by...
If you want to delete all mails from a specific mails from a sender / recieptment domain You can use this command:
1 |
mailq | tail -n +2 | grep -v '^ *(' | gawk 'BEGIN {RS = ""} /@kennethdalbjerg.dk/ {print $1}' | tr -d '*!' | postsuper -d - |
This will delete all mails sent to or from kennethdalbjerg.dk domain.
To show the queue of postfix, just run postqueue -p But if you will like to show the total number of mails in the postfix queue, you can run this streng.
1 |
postqueue -p | tail -n 1 | cut -d' ' -f5 |
Here is a simple script “pfdel” that can be use to delete a mail from a sender or recipient address. Save the perl script as pfdel in /usr/local/bin and chmod +x /usr/local/bin/pfdel Then you...
1 |
To show the number of mail in a Postfix queue, you can use this command: |
1 |
postqueue -p | tail -n 1 | cut -d' ' -f5 |
Sidste kommentar