diff mbox series

[b4] Forward the smtpserveroption to the local command

Message ID 20240723-master-v1-1-52a11f4a96c6@samsung.com (mailing list archive)
State Accepted
Headers show
Series [b4] Forward the smtpserveroption to the local command | expand

Commit Message

Joel Granados via B4 Relay July 23, 2024, 9:24 a.m. UTC
From: Joel Granados <j.granados@samsung.com>

Additional arguments to the smtp command are needed depending on the
sendemail identity. Append the additional arguments in smtpserveroptions
to the smtp command.

Signed-off-by: Joel Granados <j.granados@samsung.com>
---
 src/b4/__init__.py | 3 +++
 1 file changed, 3 insertions(+)


---
base-commit: a95708143ab35fe035ce852b72b94e68bbcb4f58
change-id: 20240723-master-51eef6c00b1d

Best regards,

Comments

Konstantin Ryabitsev July 23, 2024, 2:31 p.m. UTC | #1
On Tue, 23 Jul 2024 11:24:10 +0200, Joel Granados wrote:
> Additional arguments to the smtp command are needed depending on the
> sendemail identity. Append the additional arguments in smtpserveroptions
> to the smtp command.
> 
> 

Applied, thanks!

[1/1] Forward the smtpserveroption to the local command
      commit: 37811c93f50e70f325e45107a9a20ffc69f2f6dc

Best regards,
diff mbox series

Patch

diff --git a/src/b4/__init__.py b/src/b4/__init__.py
index ae15b83..2b1a058 100644
--- a/src/b4/__init__.py
+++ b/src/b4/__init__.py
@@ -3783,6 +3783,9 @@  def get_smtp(dryrun: bool = False) -> Tuple[Union[smtplib.SMTP, smtplib.SMTP_SSL
                 envpair = email.utils.parseaddr(env_sender)
             if envpair[1]:
                 smtp += ['-f', envpair[1]]
+        server_option = sconfig.get('smtpserveroption', '')
+        if server_option:
+            smtp += [server_option]
         logger.debug('sendmail command: %s', ' '.join(smtp))
         return smtp, fromaddr