POSTFIX Script
Guys - I was reading the "Postfix" book and found this following script below but I ran it and it showed the following on my server after I ran it...
Code:
[root@mail ~]# delete-from-mailq MAILER-DAEMON Here is the script: #!/usr/bin/perl $REGEXP = shift || die "no email-address given (regexp-style, e.g. bl.*\@yahoo.com)!"; @data = qx</usr/sbin/postqueue -p>; for (@data) { if (/^(\w+)(\*|\!)?\s/) { $queue_id = $1; } if($queue_id) { if (/$REGEXP/i) { $Q{$queue_id} = 1; $queue_id = ""; } } } #open(POSTSUPER,"|cat") || die "couldn't open postsuper" ; open(POSTSUPER,"|postsuper -d -") || die "couldn't open postsuper" ; foreach (keys %Q) { print POSTSUPER "$_\n"; }; close(POSTSUPER); |
MAILER-DAEMON is an internal name used by postfix to tell you about failures of mail delivery. by email. so you can easily have failing emails to tell you about other emails failing... which is nice.
thanks for the script btw, i actually needed it yesterday... bizarre coincidence. |
So I am still confused. Should I or should I not be removing emails stuck or queued from MAILER-D?
|
You probably need to have a look at some of the messages and make up your own mind.
My guess is that you're bouncing spam to undeliverable addresses that were spoofed in the first place, in which case you would get rid of them and also consider you settings that are causing the bounces |
All times are GMT -5. The time now is 06:31 AM. |