Re: [exim] How to Flush mails older than 4 days...help !!

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Sachin Sharma
Ημερομηνία:  
Προς: Sachin Sharma
Υ/ο: exim-users
Αντικείμενο: Re: [exim] How to Flush mails older than 4 days...help !!
Hi,

Finally Got Solution First, With exiqgrep

# exiqgrep -o 345600 -i | xargs exim -Mrm



Sometime exiqgrep exit with error Line mismatch: There one can use
these script . Modify 4d with Day of your concern.

#!/usr/bin/perl -w
system(`/usr/exim/bin/exim -bp | grep "4d " > /tmp/exim`);
open (AB,"/tmp/exim");
while(<AB>) {
if (/(1G.*?\s)/) {
system("/usr/exim4/bin/exim -Mrm $1");
print "$1\n";
}}

Or. With following commands.

/usr/exim/bin/exim -bpru |grep " 4d" | awk '{print $3}' | xargs -n 1 -P
20 /usr/exim/bin/exim -Mrm
/usr/exim/bin/exim -bpru |grep " 4d" | awk '{print $2}' | xargs -n 1 -P
20 /usr/exim/bin/exim -Mrm







Sachin Sharma
Sr. Engineer Systems (Linux)
Net4India Ltd.

D-25
Sector 3
Noida-201301
INDIA

Tel: 0120-5323500
Fax: 0120-5323520
URL: http://www.net4.in
------------------------------------------------------------------------
This message may contain confidential and/or privileged information. If
you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose or take any action based on
this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.
------------------------------------------------------------------------




Sachin Sharma wrote:

>Hi,
>
>Exim queue keeps mails 7 days older. These are not frozen messages. My
>retry rules are allows to keep upto 4 days.
>I want Exim Queue should not keep mails older than 4 days. Please help...
>
># Address or Domain    Error       Retries
># -----------------    -----       -------

>
>*                      *           F,2h,15m; G,16h,1h,1.5; F,4d,6h

>
>
>