Monday, December 17, 2012

Find Files By Date

If you need a specific date range, than consider using the find command.

In this example find files modified between 15 December 2012 and 16 December 2012, in /var directory:
touch --date "2012-12-15" /tmp/start
touch --date "2012-12-16" /tmp/end
find /var -type f -newer /tmp/start -not -newer /tmp/end

Thursday, December 13, 2012

Forcing qmail to process the queue

Run this command:

kill -ALRM `ps ax | grep qmail-send | grep -v grep | awk '{print $1}'`

Adjusting qmail queue time / lifetime

if you want to adjust how long e-mails will spend in the qmail queue before they're bounced, simple set the queuelifetime:

# echo "86400" > /var/qmail/control/queuelifetime
# /etc/init.d/qmail restart

The above example is for 1 day (qmail needs the time length in seconds). Just take the days and multiply by 86,400 seconds to get your result.