sms_code.sieve 753 B

1234567891011121314151617181920
  1. require ["vnd.dovecot.pipe", "copy", "body"];
  2. # Forward Extranet challenge codes to the room-cal SMS endpoint.
  3. # The pipe target script (sms_code_filter.sh) does the extraction and POST.
  4. #
  5. # Dovecot config required in /etc/dovecot/conf.d/90-sieve.conf:
  6. # plugin {
  7. # sieve_plugins = sieve_extprograms
  8. # sieve_pipe_socket_dir = /var/run/dovecot/sieve-pipe
  9. # # or use sieve_pipe_bin_dir for direct binary execution:
  10. # sieve_pipe_bin_dir = /etc/dovecot/sieve-pipe
  11. # }
  12. #
  13. # Place (or symlink) sms_code_filter.sh in sieve_pipe_bin_dir and make it
  14. # executable. Set SMS_API_URL and SMS_GATEWAY_SECRET in the script or via
  15. # the environment Dovecot inherits.
  16. if body :text :contains "Extranet code:" {
  17. pipe :copy "sms_code_filter.sh";
  18. }