mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-18 10:02:16 +00:00
Update notification service
This commit is contained in:
@@ -433,10 +433,13 @@ class EmailChannel(NotificationChannel):
|
|||||||
try:
|
try:
|
||||||
if self.tls_mode == 'ssl':
|
if self.tls_mode == 'ssl':
|
||||||
server = smtplib.SMTP_SSL(self.host, self.port, timeout=self.timeout)
|
server = smtplib.SMTP_SSL(self.host, self.port, timeout=self.timeout)
|
||||||
|
server.ehlo()
|
||||||
else:
|
else:
|
||||||
server = smtplib.SMTP(self.host, self.port, timeout=self.timeout)
|
server = smtplib.SMTP(self.host, self.port, timeout=self.timeout)
|
||||||
|
server.ehlo()
|
||||||
if self.tls_mode == 'starttls':
|
if self.tls_mode == 'starttls':
|
||||||
server.starttls()
|
server.starttls()
|
||||||
|
server.ehlo() # Re-identify after TLS upgrade
|
||||||
|
|
||||||
if self.username and self.password:
|
if self.username and self.password:
|
||||||
server.login(self.username, self.password)
|
server.login(self.username, self.password)
|
||||||
|
|||||||
@@ -1780,7 +1780,7 @@ class PollingCollector:
|
|||||||
'security_count': str(len(security_pkgs)),
|
'security_count': str(len(security_pkgs)),
|
||||||
'pve_count': str(len(pve_pkgs)),
|
'pve_count': str(len(pve_pkgs)),
|
||||||
'kernel_count': str(len(kernel_pkgs)),
|
'kernel_count': str(len(kernel_pkgs)),
|
||||||
'important_list': '\n'.join(important_lines) if important_lines else 'none',
|
'important_list': '\n'.join(f' {l}' for l in important_lines) if important_lines else 'none',
|
||||||
'package_list': ', '.join(important_lines[:6]) if important_lines else '',
|
'package_list': ', '.join(important_lines[:6]) if important_lines else '',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user