Not receiving alarm emails

I can receive emails from /manage/status/mail/ and /settings/account/emails/,but can not receive alarm when a new issue is created.
Where in the code the email alert is triggered?Where I can interrupt to debug?

Can you share your worker logs?

02:50:06 [INFO] celery.worker.strategy: Received task: sentry.tasks.store.symbolicate_event[268b25e8-fe74-4882-b613-5bae6845ff86]  
02:50:06 [DEBUG] celery.pool: TaskPool: Apply <function _trace_task_ret at 0x10cb73378> (args:('sentry.tasks.store.symbolicate_event', '268b25e8-fe74-4882-b613-5bae6845ff86', {'lang': None, 'task': 'sentry.tasks.store.symbolicate_event', 'id': '268b25e8-fe74-4882-b613-5bae6845ff86', 'root_id': None, 'parent_id': None, 'group': None, 'meth': None, 'shadow': None, 'eta': None, 'expires': None, 'retries': 0, 'timelimit': (630, 620), 'argsrepr': None, 'kwargsrepr': None, 'origin': None, 'reply_to': '83b130f5-82ba-323d-99ef-8530b6b74136', 'correlation_id': '268b25e8-fe74-4882-b613-5bae6845ff86', 'hostname': 'celery@hedong.local', 'delivery_info': {'exchange': '', 'routing_key': 'events.symbolicate_event', 'priority': 0, 'redelivered': None}, 'args': (), 'kwargs': {'cache_key': 'e:23b3811d6dd642828906c56de349aa60:7', 'start_time': 1615431003.0, 'event_id': '23b3811d6dd642828906c56de349aa60'}, 'headers': {'sentry-trace': 'c76bf6ea14634f01bb1c6fffd25930c5-9e059beb58ba4af1-0', 'headers': {'sentry-trace': 'c76bf6ea14634f01bb1c6fffd25930c5-9e059beb58ba4af1-0'}}}, ((), {'cache_key':... kwargs:{})
02:50:06 [DEBUG] celery.worker.request: Task accepted: sentry.tasks.store.symbolicate_event[268b25e8-fe74-4882-b613-5bae6845ff86] pid:40078
Traceback (most recent call last):
  File "/Users/dongzi/Worksapce/sentry_kuaishou/sentry-fresh/src/sentry/options/manager.py", line 95, in lookup_key
    return self.registry[key]
KeyError: 'sentry:system-token'
02:50:06 [DEBUG] sentry: Using legacy key: sentry:system-token
02:50:06 [INFO] celery.app.trace: Task sentry.tasks.store.symbolicate_event[268b25e8-fe74-4882-b613-5bae6845ff86] succeeded in 0.046639679989311844s: None (data={'id': '268b25e8-fe74-4882-b613-5bae6845ff86', 'name': 'sentry.tasks.store.symbolicate_event', 'return_value': 'None', 'runtime': 0.046639679989311844})
02:50:06 [INFO] celery.worker.strategy: Received task: sentry.tasks.store.save_event[61f6f21d-00f8-4058-8b5b-92cb28601cec]  
02:50:06 [DEBUG] celery.pool: TaskPool: Apply <function _trace_task_ret at 0x10cb73378> (args:('sentry.tasks.store.save_event', '61f6f21d-00f8-4058-8b5b-92cb28601cec', {'lang': None, 'task': 'sentry.tasks.store.save_event', 'id': '61f6f21d-00f8-4058-8b5b-92cb28601cec', 'root_id': None, 'parent_id': None, 'group': None, 'meth': None, 'shadow': None, 'eta': None, 'expires': None, 'retries': 0, 'timelimit': (65, 60), 'argsrepr': None, 'kwargsrepr': None, 'origin': None, 'reply_to': '41e2fc0e-e2b4-3312-9279-4b30c3845051', 'correlation_id': '61f6f21d-00f8-4058-8b5b-92cb28601cec', 'hostname': 'celery@hedong.local', 'delivery_info': {'exchange': '', 'routing_key': 'events.save_event', 'priority': 0, 'redelivered': None}, 'args': (), 'kwargs': {'cache_key': 'e:23b3811d6dd642828906c56de349aa60:7', 'data': None, 'start_time': 1615431003.0, 'event_id': '23b3811d6dd642828906c56de349aa60', 'project_id': 7}, 'headers': {'sentry-trace': '0a4f818b561e4b0a9c41831ac74d63d0-9ad577b24c2f5d3c-0', 'headers': {'sentry-trace': '0a4f818b561e4b0a9c41831ac74d63d0-9ad577b24c2f5d3c-0'}}}, ((), {'cache_key':... kwargs:{})
02:50:06 [DEBUG] celery.worker.request: Task accepted: sentry.tasks.store.save_event[61f6f21d-00f8-4058-8b5b-92cb28601cec] pid:40078
02:50:06 [INFO] celery.app.trace: Task sentry.tasks.store.save_event[61f6f21d-00f8-4058-8b5b-92cb28601cec] succeeded in 0.13976304398966022s: None (data={'id': '61f6f21d-00f8-4058-8b5b-92cb28601cec', 'name': 'sentry.tasks.store.save_event', 'return_value': 'None', 'runtime': 0.13976304398966022})
02:50:08 [INFO] celery.worker.strategy: Received task: sentry.tasks.post_process.post_process_group[15ed306e-a3a7-4ba9-ba46-45a058bd0220]  
02:50:08 [DEBUG] celery.pool: TaskPool: Apply <function _trace_task_ret at 0x10cb73378> (args:('sentry.tasks.post_process.post_process_group', '15ed306e-a3a7-4ba9-ba46-45a058bd0220', {'lang': None, 'task': 'sentry.tasks.post_process.post_process_group', 'id': '15ed306e-a3a7-4ba9-ba46-45a058bd0220', 'root_id': None, 'parent_id': None, 'group': None, 'meth': None, 'shadow': None, 'eta': None, 'expires': None, 'retries': 0, 'timelimit': (None, None), 'argsrepr': None, 'kwargsrepr': None, 'origin': None, 'reply_to': '416a2063-e2cb-3d55-89c3-a2b34f534757', 'correlation_id': '15ed306e-a3a7-4ba9-ba46-45a058bd0220', 'hostname': 'celery@hedong.local', 'delivery_info': {'exchange': '', 'routing_key': 'triggers-0', 'priority': 0, 'redelivered': None}, 'args': (), 'kwargs': {'is_new': True, 'is_regression': False, 'is_new_group_environment': True, 'primary_hash': '0fe77dc7be3778383edec99df9798399', 'cache_key': 'e:23b3811d6dd642828906c56de349aa60:7', 'group_id': 1025}, 'headers': {'sentry-trace': 'bc335d8fe9ed469eb403682d95f38498-bb002f0f2c7ec63f-', 'headers': {'sentry-trace':... kwargs:{})
02:50:08 [DEBUG] celery.worker.request: Task accepted: sentry.tasks.post_process.post_process_group[15ed306e-a3a7-4ba9-ba46-45a058bd0220] pid:40078
02:50:08 [INFO] sentry.mail.adapter: mail.adapter.notification.digested (event_id='23b3811d6dd642828906c56de349aa60' group_id=1025 is_from_mail_action_adapter=True target_type='Member' target_identifier=3 rule_id=3 project_id=7 digest_key='mail:p:7:Member:3')
02:50:08 [INFO] celery.worker.strategy: Received task: sentry.tasks.process_resource_change_bound[615ba459-e7e7-46b0-ae08-c2313a3cca64]  
02:50:08 [INFO] celery.app.trace: Task sentry.tasks.post_process.post_process_group[15ed306e-a3a7-4ba9-ba46-45a058bd0220] succeeded in 0.13452922899159603s: None (data={'id': '15ed306e-a3a7-4ba9-ba46-45a058bd0220', 'name': 'sentry.tasks.post_process.post_process_group', 'return_value': 'None', 'runtime': 0.13452922899159603})
02:50:08 [DEBUG] celery.pool: TaskPool: Apply <function _trace_task_ret at 0x10cb73378> (args:('sentry.tasks.process_resource_change_bound', '615ba459-e7e7-46b0-ae08-c2313a3cca64', {'lang': None, 'task': 'sentry.tasks.process_resource_change_bound', 'id': '615ba459-e7e7-46b0-ae08-c2313a3cca64', 'root_id': None, 'parent_id': None, 'group': None, 'meth': None, 'shadow': None, 'eta': None, 'expires': None, 'retries': 0, 'timelimit': (None, None), 'argsrepr': None, 'kwargsrepr': None, 'origin': None, 'reply_to': '41e2fc0e-e2b4-3312-9279-4b30c3845051', 'correlation_id': '615ba459-e7e7-46b0-ae08-c2313a3cca64', 'hostname': 'celery@hedong.local', 'delivery_info': {'exchange': '', 'routing_key': 'app_platform', 'priority': 0, 'redelivered': None}, 'args': (), 'kwargs': {'action': 'created', 'sender': 'Group', 'instance_id': 1025}, 'headers': {'sentry-trace': 'bc335d8fe9ed469eb403682d95f38498-aee20b948d13ef09-0', 'headers': {'sentry-trace': 'bc335d8fe9ed469eb403682d95f38498-aee20b948d13ef09-0'}}}, ((), {'action': 'created', 'sender': 'Group', 'instance_id': 1025}, {'callbacks': None, 'errbacks': None, 'chord':... kwargs:{})
02:50:08 [DEBUG] celery.worker.request: Task accepted: sentry.tasks.process_resource_change_bound[615ba459-e7e7-46b0-ae08-c2313a3cca64] pid:40078
02:50:08 [INFO] celery.app.trace: Task sentry.tasks.process_resource_change_bound[615ba459-e7e7-46b0-ae08-c2313a3cca64] succeeded in 0.01725956198060885s: None (data={'id': '615ba459-e7e7-46b0-ae08-c2313a3cca64', 'name': 'sentry.tasks.process_resource_change_bound', 'return_value': 'None', 'runtime': 0.01725956198060885})
02:50:09 [INFO] celery.worker.strategy: Received task: sentry.tasks.store.save_event[de795b18-5427-4c2a-a5b6-d7631c17771d]  
02:50:09 [DEBUG] celery.pool: TaskPool: Apply <function _trace_task_ret at 0x10cb73378> (args:('sentry.tasks.store.save_event', 'de795b18-5427-4c2a-a5b6-d7631c17771d', {'lang': None, 'task': 'sentry.tasks.store.save_event', 'id': 'de795b18-5427-4c2a-a5b6-d7631c17771d', 'root_id': None, 'parent_id': None, 'group': None, 'meth': None, 'shadow': None, 'eta': None, 'expires': None, 'retries': 0, 'timelimit': (65, 60), 'argsrepr': None, 'kwargsrepr': None, 'origin': None, 'reply_to': '83b130f5-82ba-323d-99ef-8530b6b74136', 'correlation_id': 'de795b18-5427-4c2a-a5b6-d7631c17771d', 'hostname': 'celery@hedong.local', 'delivery_info': {'exchange': '', 'routing_key': 'events.save_event', 'priority': 0, 'redelivered': None}, 'args': (), 'kwargs': {'cache_key': 'e:f1d07696f9b04731ba8bfa3fd10cede1:1', 'data': None, 'start_time': 1615431007.0, 'event_id': 'f1d07696f9b04731ba8bfa3fd10cede1', 'project_id': 1}, 'headers': {'sentry-trace': '60f9d9de96c34af4a5f0e3f580e236db-a4e826204763e15f-0', 'headers': {'sentry-trace': '60f9d9de96c34af4a5f0e3f580e236db-a4e826204763e15f-0'}}}, ((), {'cache_key':... kwargs:{})
02:50:09 [DEBUG] celery.worker.request: Task accepted: sentry.tasks.store.save_event[de795b18-5427-4c2a-a5b6-d7631c17771d] pid:40078
02:50:09 [INFO] celery.app.trace: Task sentry.tasks.store.save_event[de795b18-5427-4c2a-a5b6-d7631c17771d] succeeded in 0.06687683099880815s: None (data={'id': 'de795b18-5427-4c2a-a5b6-d7631c17771d', 'name': 'sentry.tasks.store.save_event', 'return_value': 'None', 'runtime': 0.06687683099880815})
02:50:11 [INFO] celery.worker.strategy: Received task: sentry.tasks.post_process.post_process_group[b1a10fd1-b840-41cb-8e36-417052bd9516]  
02:50:11 [DEBUG] celery.pool: TaskPool: Apply <function _trace_task_ret at 0x10cb73378> (args:('sentry.tasks.post_process.post_process_group', 'b1a10fd1-b840-41cb-8e36-417052bd9516', {'lang': None, 'task': 'sentry.tasks.post_process.post_process_group', 'id': 'b1a10fd1-b840-41cb-8e36-417052bd9516', 'root_id': None, 'parent_id': None, 'group': None, 'meth': None, 'shadow': None, 'eta': None, 'expires': None, 'retries': 0, 'timelimit': (None, None), 'argsrepr': None, 'kwargsrepr': None, 'origin': None, 'reply_to': '416a2063-e2cb-3d55-89c3-a2b34f534757', 'correlation_id': 'b1a10fd1-b840-41cb-8e36-417052bd9516', 'hostname': 'celery@hedong.local', 'delivery_info': {'exchange': '', 'routing_key': 'triggers-0', 'priority': 0, 'redelivered': None}, 'args': (), 'kwargs': {'is_new': False, 'is_regression': False, 'is_new_group_environment': False, 'primary_hash': '', 'cache_key': 'e:f1d07696f9b04731ba8bfa3fd10cede1:1', 'group_id': None}, 'headers': {'sentry-trace': '5e7fd7b0ba7e4a94a9e22ae35da6182a-a61ecc5d1d6adcbf-', 'headers': {'sentry-trace': '5e7fd7b0ba7e4a94a9e22ae35da6182a-a61ecc5d1d6adcbf-'}}}, ((),... kwargs:{})
02:50:11 [DEBUG] celery.worker.request: Task accepted: sentry.tasks.post_process.post_process_group[b1a10fd1-b840-41cb-8e36-417052bd9516] pid:40078
02:50:11 [INFO] celery.app.trace: Task sentry.tasks.post_process.post_process_group[b1a10fd1-b840-41cb-8e36-417052bd9516] succeeded in 0.0296608499775175s: None (data={'id': 'b1a10fd1-b840-41cb-8e36-417052bd9516', 'name': 'sentry.tasks.post_process.post_process_group', 'return_value': 'None', 'runtime': 0.0296608499775175})

The value of immediate_delivery which return by digests/digests.lua at sentry/mail/adapter.py always False, Is this normal?

That means the email will be pooled and sent in a weekly/daily digest. If it is always False, maybe this is an issue with your alert settings? The logs all seem normal. The only thing that jumps at me is your mail host having a .local suffix which may cause the emails to be rejected by certain providers.