Commits

Zhang Huangbin committed 44e227c

Add sample usage in plugins/sql_user_restrictions.py.

Comments (0)

Files changed (1)

plugins/sql_user_restrictions.py

 #   - @domain.com:      single domain
 #   - @.domain.com:     single domain and its all sub-domains
 #   - user@domain.com:  single email address
+#
+# Multiple senders/recipients must be separated by comma (,).
+#
+# Sample: allow local mail user 'user@example.com' to send to and receive
+#         from the same domain and 'gmail.com', but not others.
+#
+#         sql> USE vmail;
+#         sql> UPDATE mailbox \
+#              SET \
+#                 rejectedsenders='@.', \
+#                 allowedsenders='@example.com,@gmail.com', \
+#                 rejectedrecipients='@.' \
+#                 allowedrecipients='@example.com,@gmail.com', \
+#             WHERE username='user@example.com';
+#
 
 import logging
 from libs import SMTP_ACTIONS