Inquiry Regarding Sending Patches to DPDK
Dear all,
I hope this message finds you well.
I would like to seek your advice on an issue I've encountered. Our company has recently enabled two-factor authentication (2FA) for our email accounts. The IT department has suggested that I abandon using the "git send-email" method, as configured through git config, to send patches to DPDK. Instead, they have recommended using "Exchange anonymous send mail." However, I believe this approach might not be feasible.
I wanted to confirm this with you and see if you could provide any guidance on the matter. I look forward to your response.
Thank you very much for your time and assistance.
Best regards,
Howard Wang
Quoted 4 lines · On Mon, 12 Aug 2024 07:52:39 +0000 王颢 <[email protected]> wrote:
Dear all,
I hope this message finds you well.
Quoted 8 lines
I would like to seek your advice on an issue I've encountered. Our company has recently enabled two-factor authentication (2FA) for our email accounts. The IT department has suggested that I abandon using the "git send-email" method, as configured through git config, to send patches to DPDK. Instead, they have recommended using "Exchange anonymous send mail." However, I believe this approach might not be feasible.
I wanted to confirm this with you and see if you could provide any guidance on the matter. I look forward to your response.
Thank you very much for your time and assistance.
Best regards,
Howard Wang
There are two issues here:
Using git send-email is not required. You can generate patch files and put them in your email.
BUT Microsoft Exchange does not preserve text formatting in messages. Any patches sent that way are usually corrupted.
At Microsoft, we ended up using a special server (not Exchange) to send Linux and DPDK patches. Or using non-corporate accounts.
Dear Stephen,
Now I have a better understanding of the anonymous sending suggested by the company's IT department. Since the second-factor authentication for the email account is Microsoft's Okta, which seems not straightforward to configure with an account and password, they have enabled anonymous sending for me. Here's how it works approximately: When I send emails, I don't need to input an account or password. Instead, I just need to configure the server and port number, and I can send emails. Attached below is the script I've written. However, it seems there are some issues, and perhaps I need to conduct further research.
test result: https://mails.dpdk.org/archives/dev/2024-August/299466.html
python:
#!/usr/bin/env python3
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.base import MIMEBase
from email import encoders
smtp_server = 'smtpsrv.realsil.com.cn'smtp_port = 25
from_addr = '[email protected]'to_addr = '[email protected]'
msg = MIMEMultipart()
msg['From'] = from_addr
msg['To'] = to_addr
#msg['Subject'] = 'test anonymous send mail'
filename = '0001-net-r8169-add-PMD-driver-skeleton.patch'
with open(filename, 'rb') as attachment:
part = MIMEBase('application', 'octet-stream') part.set_payload(attachment.read()) encoders.encode_base64(part) part.add_header('Content-Disposition', f"attachment; filename= {filename}") msg.attach(part)
try:
server = smtplib.SMTP(smtp_server, smtp_port) server.sendmail(from_addr, [to_addr], msg.as_string()) server.quit()
print('Mail sent successfully!')
except Exception as e:
print(f'Failed to send mail: {e}')
Thanks!
Howard Wang
-----邮件原件-----
发件人: Stephen Hemminger <[email protected]> 发送时间: 2024年8月12日 22:56
收件人: 王颢 <[email protected]>
抄送: [email protected]
主题: Re: Inquiry Regarding Sending Patches to DPDK
External mail.
Quoted 4 lines · On Mon, 12 Aug 2024 07:52:39 +0000 王颢 <[email protected]> wrote:
Dear all,
I hope this message finds you well.
Quoted 8 lines
I would like to seek your advice on an issue I've encountered. Our company has recently enabled two-factor authentication (2FA) for our email accounts. The IT department has suggested that I abandon using the "git send-email" method, as configured through git config, to send patches to DPDK. Instead, they have recommended using "Exchange anonymous send mail." However, I believe this approach might not be feasible.
I wanted to confirm this with you and see if you could provide any guidance on the matter. I look forward to your response.
Thank you very much for your time and assistance.
Best regards,
Howard Wang
There are two issues here:
Using git send-email is not required. You can generate patch files and put them in your email.
BUT Microsoft Exchange does not preserve text formatting in messages. Any patches sent that way are usually corrupted.
At Microsoft, we ended up using a special server (not Exchange) to send Linux and DPDK patches. Or using non-corporate accounts.
Howard,
I'm using.gitconfig to configure my git send-email options. Try this in your .gitconfig:
[user]
name = Howard Wang
email = [email protected]
[sendemail]
from = Howard Wang <[email protected]> envelopeSender = [email protected] smtpServer = smtpsrv.realsil.com.cn
Med venlig hilsen / Kind regards,
-Morten Brørup
Quoted 101 lines
-----Original Message-----
From: 王颢 [mailto:[email protected]]
Sent: Wednesday, 14 August 2024 11.52
To: Stephen Hemminger
Cc: [email protected]
Subject: 答复: Inquiry Regarding Sending Patches to DPDKDear Stephen,
Now I have a better understanding of the anonymous sending suggested by the company's IT department. Since the second-factor authentication for the email account is Microsoft's Okta, which seems not straightforward to configure with an account and password, they have enabled anonymous sending for me. Here's how it works approximately: When I send emails, I don't need to input an account or password. Instead, I just need to configure the server and port number, and I can send emails. Attached below is the script I've written. However, it seems there are some issues, and perhaps I need to conduct further research.
test result: https://mails.dpdk.org/archives/dev/2024-August/299466.html
python:
#!/usr/bin/env python3
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.base import MIMEBase
from email import encoders
smtp_server= 'smtpsrv.realsil.com.cn'smtp_port= 25
from_addr= '[email protected]'to_addr= '[email protected]'msg =
MIMEMultipart()
msg['From'] =from_addr
msg['To'] =to_addr
#msg['Subject'] = 'test anonymous send mail'filename = '0001-net-r8169-add-PMD-driver-skeleton.patch' with
open(filename, 'rb')as attachment:
part =MIMEBase('application', 'octet-stream')part.set_payload(attachment.read())encoders.encode_base64(part)part.add_header('Content-Disposition', f"attachment; filename=
{filename}")
msg.attach(part)try:
server =smtplib.SMTP(smtp_server, smtp_port)server.sendmail(from_addr, [to_addr], msg.as_string())server.quit()
print('Mail sent successfully!')
except Exception as e:
print(f'Failed to send mail: {e}')Thanks!
Howard Wang-----邮件原件-----
发件人: Stephen Hemminger <[email protected]> 发送时间: 2024年8月12日 22:56
收件人: 王颢 <[email protected]>
抄送: [email protected]
主题: Re: Inquiry Regarding Sending Patches to DPDKExternal mail.
Quoted 5 lines · On Mon, 12 Aug 2024 07:52:39 +0000 王颢 <[email protected]> wrote:
Dear all,
I hope this message finds you well.
I would like to seek your advice on an issue I've encountered. Our company
has recently enabled two-factor authentication (2FA) for our email accounts. The IT department has suggested that I abandon using the "git send-email" method, as configured through git config, to send patches to DPDK. Instead, they have recommended using "Exchange anonymous send mail." However, I believe this approach might not be feasible.
Quoted 2 lines
I wanted to confirm this with you and see if you could provide any guidance
on the matter. I look forward to your response.
Quoted 5 lines
Thank you very much for your time and assistance.
Best regards,
Howard WangThere are two issues here:
Using git send-email is not required. You can generate patch files and put them in your email.
BUT Microsoft Exchange does not preserve text formatting in messages. Any patches sent that way are usually corrupted.At Microsoft, we ended up using a special server (not Exchange) to send Linux and DPDK patches. Or using non-corporate accounts.
Dear Morten,
I have successfully resolved this problem. Prior to the tests, I overlooked the necessity of disabling smtpencryption. However, upon modifying my .gitconfig file as demonstrated below, everything now functions flawlessly. If IT allows anonymous email sending, then the 2FA problem will be solved.
[user]
name = howard_wang
email = [email protected]
[core]
editor = vim
[sendemail]
smtpserverport=25
smtpserver=smtpsrv.realsil.com.cn
smtpdomain = 172.29.32.27 Thanks!
Howard Wang
-----邮件原件-----
发件人: Morten Brørup <[email protected]>
发送时间: 2024年8月14日 18:15
收件人: 王颢 <[email protected]>; Stephen Hemminger <[email protected]> 抄送: [email protected]
主题: RE: Inquiry Regarding Sending Patches to DPDK
External mail.
Howard,
I'm using.gitconfig to configure my git send-email options. Try this in your .gitconfig:
[user]
name = Howard Wang
email = [email protected]
[sendemail]
from = Howard Wang <[email protected]> envelopeSender = [email protected] smtpServer = smtpsrv.realsil.com.cn
Med venlig hilsen / Kind regards,
-Morten Brørup
Quoted 103 lines
-----Original Message-----
From: 王颢 [mailto:[email protected]]
Sent: Wednesday, 14 August 2024 11.52
To: Stephen Hemminger
Cc: [email protected]
Subject: 答复: Inquiry Regarding Sending Patches to DPDKDear Stephen,
Now I have a better understanding of the anonymous sending suggested
by the company's IT department. Since the second-factor authentication
for the email account is Microsoft's Okta, which seems not
straightforward to configure with an account and password, they have
enabled anonymous sending for me. Here's how it works approximately:
When I send emails, I don't need to input an account or password.
Instead, I just need to configure the server and port number, and I can send emails. Attached below is the script I've written. However, it seems there are some issues, and perhaps I need to conduct
further research.test result:
https://mails.dpdk.org/archives/dev/2024-August/299466.html
python:
#!/usr/bin/env python3
import smtplib
from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.mime.base import MIMEBase from email import encoders
smtp_server= 'smtpsrv.realsil.com.cn'smtp_port= 25
from_addr= '[email protected]'to_addr= '[email protected]'msg =
MIMEMultipart()
msg['From'] =from_addr
msg['To'] =to_addr
#msg['Subject'] = 'test anonymous send mail'filename = '0001-net-r8169-add-PMD-driver-skeleton.patch' with
open(filename, 'rb')as attachment:
part =MIMEBase('application', 'octet-stream')part.set_payload(attachment.read())encoders.encode_base64(part)part.add_header('Content-Disposition', f"attachment; filename=
{filename}")
msg.attach(part)try:
server =smtplib.SMTP(smtp_server, smtp_port)server.sendmail(from_addr, [to_addr], msg.as_string())server.quit()
print('Mail sent successfully!')
except Exception as e:
print(f'Failed to send mail: {e}')Thanks!
Howard Wang-----邮件原件-----
发件人: Stephen Hemminger <[email protected]> 发送时间: 2024年8月12日 22:56
收件人: 王颢 <[email protected]>
抄送: [email protected]
主题: Re: Inquiry Regarding Sending Patches to DPDKExternal mail.
Quoted 6 lines · On Mon, 12 Aug 2024 07:52:39 +0000 王颢 <[email protected]> wrote:
Dear all,
I hope this message finds you well.
I would like to seek your advice on an issue I've encountered. Our company
has recently enabled two-factor authentication (2FA) for our email accounts. The IT department has suggested that I abandon using the "git send-email" method, as configured through git config, to send patches to DPDK. Instead, they have recommended using "Exchange anonymous send mail." However, I believe this approach might not be feasible.
Quoted 3 lines
I wanted to confirm this with you and see if you could provide any guidance
on the matter. I look forward to your response.
Quoted 5 lines
Thank you very much for your time and assistance.
Best regards,
Howard WangThere are two issues here:
Using git send-email is not required. You can generate patch files and put them in your email.
BUT Microsoft Exchange does not preserve text formatting in messages. Any patches sent that way are usually corrupted.At Microsoft, we ended up using a special server (not Exchange) to send Linux and DPDK patches. Or using non-corporate accounts.