On Tue, Feb 09, 2021 at 04:58:00PM +0800, Wu Fengguang wrote:
TO ALL.
On Sun, Feb 07, 2021 at 05:42:43PM +0800, Luan Shengde wrote:
[why] the mail robot will enable forwarded emails from security admins. the mail subject may 'apply account', 'Fw: apply account', .etc.
请精确匹配两种情况。这样代码逻辑更明确和清晰。 凡是涉及大量用户的,现在太permissive,以后为了保持兼容性,会失控。
OK, I will optimize it.
Thanks, Luan Shengde
Thanks, Fengguang
Signed-off-by: Luan Shengde shdluan@163.com
container/mail-robot/mail-robot.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/container/mail-robot/mail-robot.rb b/container/mail-robot/mail-robot.rb index a809eae..c3bc943 100755 --- a/container/mail-robot/mail-robot.rb +++ b/container/mail-robot/mail-robot.rb @@ -32,7 +32,7 @@ def handle_new_email(mail_file, mail_drafts) end
def apply_account(mail_content)
- return unless mail_content.subject == 'apply account'
return unless mail_content.subject.match?(/apply account/i)
assign_uuid = ApplyAccount.new(mail_content) assign_uuid.check_to_send_account
-- 2.23.0