Old 9th May 2008, 22:25
getrav getrav is offline
Junior Member
Join Date: May 2008
Posts: 19
Thanks: 1
Thanked 1 Time in 1 Post
Default SpamSnake Greylisting Crontab

I didn't understand the instructions so clearly:

You can set up a cron job to keep your database clean. Below is what I'm using in crontab -e running at midnight.

@daily /usr/bin/mysql -ugld_user -pgld_password -e 'USE gld_db; DELETE FROM greylist WHERE n > 0;' &> /dev/null
Reply With Quote
Sponsored Links
Old 9th May 2008, 23:02
Rocky Rocky is offline
Senior Member
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts

Since greylisting is a way of making emails reject temporarily and then come back after a set amount of time, I wanted a way of cleaning out the database. After the mail returns, be it ham or spam, then it hits the gld_db 2 times, which means if it comes back again, it will be allowed to pass through without any checks. My cronjob is a measure to refresh my gld_db daily to ensure that mails get checked daily.

@daily /usr/bin/mysql -ugld_user -pgld_password -e 'USE gld_db; DELETE FROM greylist WHERE n > 0;' &> /dev/null

I did crontab -e and entered the above exactly as you see it, changing the gld_user and gld_password according for my setup. It cleans out the database every night at midnight. It basically deletes everything out of the greylist table and does not touch the whitelist table. The whitelist table basically contains all those domains/email addresses that you want to allow. They will be skipped by the greylist daemon.

I hope this helps.
Home of the SpamSnake
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Killing that spam with greylisting using Postfix and Postgrey erk Tips/Tricks/Mods 11 18th June 2008 06:09
crontab in detail sysconfig Suggest HOWTO 0 4th November 2006 11:38
Crontab issue, 2 questions jang Installation/Configuration 2 20th September 2006 20:39
Nothing in crontab punto Installation/Configuration 8 1st August 2006 01:01
crontab entries... zokahn General 2 23rd April 2006 11:55

All times are GMT +2. The time now is 18:36.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.