[Remail] Triggering welcome emails on list.yaml changes

Konstantin Ryabitsev konstantin at linuxfoundation.org
Fri Sep 18 22:53:46 CEST 2020


On Sun, Sep 13, 2020 at 10:57:09PM +0200, Thomas Gleixner wrote:
> Seomthing like the completely untested below should allow you to just
> invoke:
> 
>         remail_pipe -c ... site.yaml
> 
> after any of the configuration files has been updated.

I found one simple mistake in it, but once it's fixed, it does what's 
intended and sends the welcome emails.

Thanks!

Tested-by: Konstantin Ryabitsev <konstantin at linuxfoundation.org>

> diff --git a/remail_pipe b/remail_pipe
> index 4e4c1b437bf5..9d8e2d936560 100755
> --- a/remail_pipe
> +++ b/remail_pipe
> @@ -19,6 +19,8 @@ def exit_daemon(logger, res):
>  if __name__ == '__main__':
>      parser = ArgumentParser(description='remail pipe')
>      parser.add_argument('config', help='Config file')
> +    parser.add_argument('--cfgupdate', '-c', dest='update', action='store_true',
                                                ^^^^^^^^^^^^^
                                                dest='cfgupdate'

> +                        help='Handle config file update. No mail processing.')
>      parser.add_argument('--syslog', '-s', dest='syslog', action='store_true',
>                          help='Use syslog for logging. Default is stderr')
>      parser.add_argument('--verbose', '-v', dest='verbose', action='store_true',
> @@ -46,7 +48,7 @@ if __name__ == '__main__':
>          exit_daemon(logger, 11)
>  
>      try:
> -        res = rd.handle_pipe()
> +        res = rd.handle_pipe(args.cfgupdate)
>      except Exception as ex:
>          '''
>          Exceptions which reach here are fatal
> 


More information about the Remail mailing list