Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-13 23:57 UTC

Message

Re: {Disarmed} Re: [milter-greylist] Milter-Greylist Dump Problem

2016-07-26 by Mauricio Teixeira

Use dumpfreq 1. Zero is too little, and most likely will cause file creation clashes.

On Tue, Jul 26, 2016 at 5:15 AM, Can Şirin sirincan@... [milter-greylist] <milter-greylist@yahoogroups.com> wrote:

Thanks for your replies. But the directory has the proper permissions
for grmilter user to write the temporary dump file.
On the other hand, in my greylist.conf, dumpfreq option has already
been set to 0. But still dump file is empty.

The version that I try to use is : milter-greylist-4.5.16-3.el7.x86_64
It has been installed from the epel repo.
I am very sure that the problem is not related with the permissions.
It could be probably a compilation problem, bug or missing
configuration.

This is my conf file:
##############################################################
socket "/run/milter-greylist/milter-greylist.sock"
dumpfile "/var/lib/milter-greylist/db/greylist.db" 640
geoipdb "/usr/share/GeoIP/GeoIP.dat"
dumpfreq 0
user "grmilter"
quiet
list "my network" addr { 127.0.0.1/8 }
ratelimit "high_limit" rcpt 6 / 1h key "%M{auth_authen}"
sm_macro "user1_macro" "{auth_authen}" "user1"
racl blacklist \
sm_macro "user1_macro" \
ratelimit "high_limit" \
msg "You are in the exception list but limit exceeded."
ratelimit "standart_limit" rcpt 2 / 1h key "%M{auth_authen}"
sm_macro "null" "{auth_authen}" unset
racl blacklist \
not sm_macro "null" \
not sm_macro "user1_macro" \
ratelimit "standart_limit" msg "Ratelimit exceeded."
list "server_ip" addr { \
160.75.150.0/25 \
160.75.170.0/24 \
}
ratelimit "server_limit" rcpt 5 / 1h key "%i %M{auth_authen}"
racl blacklist \
sm_macro "null" \
list "server_ip" \
ratelimit "server_limit" \
msg "Ratelimit for internal servers exceeded."
racl continue from /.*/ addheader "X-Greylist: inspected by %V for
IP:'%i' DOMAIN:'%d' HELO:'%h' FROM:'%f' RCPT:'%r'"
racl whitelist list "my network"
racl whitelist default
noauth
timeout 6h
##############################################################

Is there anyone else issuing the same problem?

Thank
Can

Quoting "manu@... [milter-greylist]" <milter-greylist@yahoogroups.com>:

> Mauricio Teixeira mauricio.teixeira@gmail.com [milter-greylist]
> <milter-greylist@yahoogroups.com> wrote:
>
>> It's possible that the database API is trying to create a temporary file on
>> that directory, and the permissions are blocking it.
>
> Indeed it does. dump.c says;
>
> /*
> * Dump the database in a temporary file and
> * then replace the old one by the new one.
> * On decent systems, rename(2) garantees that
> * even if the machine crashes, we will not
> * loose both files.
> */
> mkparentdir(conf.c_dumpfile, 0755);
> snprintf(newdumpfile, MAXPATHLEN,
> "%s-XXXXXXXX", conf.c_dumpfile);
>
> if ((dumpfd = mkstemp(newdumpfile)) == -1) {
> mg_log(LOG_ERR, "mkstemp(\"%s\") failed: %s",
> newdumpfile, strerror(errno));
> close(dumpfd);
> unlink(newdumpfile); /* clean up ... */
> exit(EX_OSERR);
> }
>
>
>
> --
> Emmanuel Dreyfus
> http://hcpnet.free.fr/pubz
> manu@...




--
Mauricio Teixeira
Sao Paulo/SP/BR
http://mteixeira.wordpress.com
mauricio.teixeira{at}gmail.com
(irc: netmask on freenode)

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.