On Thu, Feb 23, 2017 at 3:45 PM, Zhang Huangbin <zhb at iredmail.org> wrote:> > > On Feb 24, 2017, at 6:08 AM, Mark Moseley <moseleymark at gmail.com> wrote: > > > > * Do you use the perl poolmon script or something else? The perl script > was > > being weird for me, so I rewrote it in python but it basically does the > > exact same things. > > Would you mind sharing it? :) > > ---- > Zhang Huangbin, founder of iRedMail project: http://www.iredmail.org/ > Time zone: GMT+8 (China/Beijing). > Available on Telegram: https://t.me/iredmail > >Attached. No claims are made on the quality of my code :) -------------- next part -------------- A non-text attachment was scrubbed... Name: poolmon Type: application/octet-stream Size: 8595 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20170224/cc9d2f4d/attachment-0001.obj>
> On Feb 25, 2017, at 3:28 AM, Mark Moseley <moseleymark at gmail.com> wrote: > > Attached. No claims are made on the quality of my code :)Thank you for sharing. :) Some suggestions: - should replace log() by the standard logging module like "logging.debug(xx)? - add managesieve support - add lmtp support - how about store command line options in a config file? remove the ?optparse? module. - email notification support when server is up/down - lots of PEP8 style issue :) Would you like to publish this code in github/bitbucket/?? ---- Zhang Huangbin, founder of iRedMail project: http://www.iredmail.org/ Time zone: GMT+8 (China/Beijing). Available on Telegram: https://t.me/iredmail
> On 24 Feb 2017, at 21.28, Mark Moseley <moseleymark at gmail.com> wrote: > Attached. No claims are made on the quality of my code :) > <poolmon>With recent dovecots you probably should not use set_host_weight( server, '0? ) to mark backend down but instead should use director commands HOST-DOWN and HOST-UP in combination with HOST-FLUSH. Sami
On 2017-02-27 10:40, Sami Ketola wrote:>> On 24 Feb 2017, at 21.28, Mark Moseley <moseleymark at gmail.com> wrote: >> Attached. No claims are made on the quality of my code :) >> <poolmon> > > > With recent dovecots you probably should not use set_host_weight( > server, '0? ) to mark backend > down but instead should use director commands HOST-DOWN and HOST-UP in > combination with HOST-FLUSH.This is already the case in the latest version of Poolmon