@@ -12,21 +12,21 @@ import agent
1212# Try to parse the stdin as JSON.
1313# If parsing fails, output everything to stderr
1414data = json .load (sys .stdin )
15- host = data .get (' host' )
15+ host = data .get (" host" )
1616h2hs = data .get ("http2https" , True )
1717PROTOCOL = "https" if h2hs else "http"
18- #This is specific to you module, so you need to change it accordingly.
18+ # This is specific to you module, so you need to change it accordingly.
1919
2020# EMAIL
2121rdb = agent .redis_connect (use_replica = True )
2222smtp_settings = agent .get_smarthost_settings (rdb )
2323
24- SMTP_HOST = smtp_settings [' host' ]
25- SMTP_PORT = smtp_settings [' port' ]
26- SMTP_USER = smtp_settings [' username' ]
27- SMTP_PASS = smtp_settings [' password' ]
28- SMTP_ENCRYPTION = smtp_settings [' encrypt_smtp' ]
29- SMTP_TLSVERIFY = ' true' if smtp_settings [' tls_verify' ] else ' false'
24+ SMTP_HOST = smtp_settings [" host" ]
25+ SMTP_PORT = smtp_settings [" port" ]
26+ SMTP_USER = smtp_settings [" username" ]
27+ SMTP_PASS = smtp_settings [" password" ]
28+ SMTP_ENCRYPTION = smtp_settings [" encrypt_smtp" ]
29+ SMTP_TLSVERIFY = " true" if smtp_settings [" tls_verify" ] else " false"
3030
3131
3232password_pusher = {
@@ -42,15 +42,16 @@ password_pusher = {
4242 "PWP__MAIL__SMTP_READ_TIMEOUT" : "10" ,
4343 "PWP__HOST_DOMAIN" : host ,
4444 "PWP__HOST_PROTOCOL" : PROTOCOL ,
45- "PWP__MAIL__MAILER_SENDER" : f' Password Pusher <{ SMTP_USER } >' ,
45+ "PWP__MAIL__MAILER_SENDER" : f" Password Pusher <{ SMTP_USER } >" ,
4646 "PWP__ENABLE_FILE_PUSHES" : "true" ,
4747 "PWP__FILES__STORAGE" : "local" ,
4848 "PWP__FILES__EXPIRE_AFTER_DAYS_DEFAULT" : "2" ,
4949 "PWP__FILES__EXPIRE_AFTER_DAYS_MAX" : "7" ,
5050 "PWP__FILES__EXPIRE_AFTER_VIEWS_DEFAULT" : "5" ,
5151 "PWP__FILES__EXPIRE_AFTER_VIEWS_MAX" : "10" ,
5252 "PWP__FILES__RETRIEVAL_STEP_DEFAULT" : "true" ,
53- "PWP__ENABLE_URL_PUSHES" : "true"
53+ "PWP__ENABLE_URL_PUSHES" : "true" ,
54+ "PWP__ALLOW_ANONYMOUS" : "false" ,
5455}
5556agent .write_envfile ("password-pusher.env" , password_pusher )
56- #agent.dump_env()
57+ # agent.dump_env()
0 commit comments