In this post I'll show you how to install an anti-spam smart host relay server, based on Ubuntu 12.04 LTS, that will include:
Postfix w/Bayesian Filtering and Anti-Backscatter (Relay Recipients via look-ahead), Apache2, Mysql, Dnsmasq, MailScanner (Spamassassin, ClamAV, Pyzor, Razor, DCC-Client), Baruwa, SPF Checks, FuzzyOcr, Sanesecurity Signatures, PostGrey, KAM, Scamnailer, FireHOL (Iptables Firewall) and Relay Recipients Script.
Continue reading for the instructions.
Showing posts with label Postfix. Show all posts
Showing posts with label Postfix. Show all posts
Tuesday, 4 September 2012
Anti-Spam Email server
Labels:
baruwa,
email,
firehole,
Linux,
mailscanner,
Postfix,
PostGrey,
spamassassin,
Ubuntu
Possibly Related Posts
Saturday, 21 May 2011
Postfix Queue Management
Again some very useful one liners but this time to manage the Postfix mail queue.
Release messages from hold
Release messages from hold
mailq | awk '{if($1 ~ /[A-F0-9]+!$/) {gsub(/!/, "", $1); print($1); system(sprintf("postsuper -H%s", $1)); } }'
postqueue -f
Requeue hold messages to force delivery
mailq | awk '{if($1 ~ /[A-F0-9]+!$/) {gsub(/!/, "", $1); print($1); system(sprintf("postsuper -H%s", $1)); } }'
Flush the queue
postqueue -f
Clean all MAILER-DAEMON error messages
Normal Messages
mailq | tail +2 | awk '{ if ($7 == "MAILER-DAEMON") print $1 } ' | postsuper -d -
for me mailq returns the message id with a trailing ! so I use:
mailq | awk '{ if ($7 == "MAILER-DAEMON") print substr ($1, 1, length($1)-1) } ' | postsuper -d -
Messages with errors
mailq | grep MAILER-DAEMON | sed -e 's/!$//' | cut -d " " -f 1 | postsuper -d -
or
mailq | tail +2 | awk '{ if ($7 == "MAILER-DAEMON") print $1 } ' | sed -e 's/!$//' | postsuper -d -
If you want to delete messages with the ! sign on the end, use
mailq | tail +2 | awk '{ if ($7 == "MAILER-DAEMON") print $1 } ' | cut -d! -f 1 | postsuper -d -
NOTE: Sometimes, you may need to omit the:
tail +2
Labels:
Command Line,
Postfix
Possibly Related Posts
Reading message content on postfix queue
Get the id of the message by
Then
mailq | grep "search something"
Then
postcat -q MESSAGE_ID
Labels:
Postfix
Possibly Related Posts
Subscribe to:
Comments (Atom)