On 25/11/2013 13:51, Wietse Venema wrote:
No need to restart Postfix. Use an indexed file and let smtpd(8) auto-detect that the file has changed.Run this from cron: #!/bin/sh # Configure smtpd(8) to query $TYPE:real-file TYPE=cdb # or hash or lmdb SUFF=cdb # or db or lmdb URL=http://example.com/file.txt test -f old-file || touch old-file wget -O new-file $URL && test -s new-file && { cmp -s old-file new-file || { postmap $TYPE:new-file && mv new-file.$SUFF real-file.$SUFF mv new-file old-file } } In particular, LMDB as of postfix-2.11-20131122 no longer restarts a daemon and picks up changes immediately. With cdb and hash, the changes are detected at the start of a new SMTP session and then smtpd(8) restarts.
Thanks. I'll have a play with that later. Mark -- My blog: http://mark.goodge.co.uk
