# Postgrey delay and reports



## xy16644 (Sep 22, 2012)

I have just installed mail/postgrey to help reduce the amount of Spam my server has to process. I have been running it for a couple of hours and already I can see the amount of emails that have been rejected (using Mailgraph) has increased substantially. It'll be even more interesting to see how the stats look after a few weeks/months.

I have a couple questions I couldn't find the answers to though:

1) The default delay value is 300 seconds (5 minutes). How do I change this to a lower value? Can anyone recommend what I should set this to? I was thinking of using 120 or 180 seconds (2 or 3 minutes)

2) Besides digging around in the /var/log/maillog, is there any better way of getting any stats out of what Postgrey is doing, logs or reports? So far I have only tried this:

```
/usr/local/sbin/postgreyreport --dbdir=/var/db/postgrey < /var/log/postfix/maillog
```

Which brings back a bunch of email addresses but no explanation.

Appreciate any help!


----------



## jasiu (Dec 16, 2019)

> 1)
add --delay=120 option to:
command_args="-d --pidfile=${pidfile} --dbdir=${postgrey_dbdir}"
in startup script:
( /usr/local/etc/rc.d/postgrey)

cheers!


----------



## SirDice (Dec 17, 2019)

Don't edit the rc(8) files please. There's no need for it. Add to rc.conf:

```
postgrey_flags="--delay=120 --inet=10023"
```


----------

