Inquiry Regarding Sending Patches to DPDK
Morten Brørup
mb at smartsharesystems.com
Wed Aug 14 12:14:35 CEST 2024
Howard,
I'm using.gitconfig to configure my git send-email options. Try this in your .gitconfig:
[user]
name = Howard Wang
email = howard_wang at realsil.com.cn
[sendemail]
from = Howard Wang <howard_wang at realsil.com.cn>
envelopeSender = howard_wang at realsil.com.cn
smtpServer = smtpsrv.realsil.com.cn
Med venlig hilsen / Kind regards,
-Morten Brørup
> -----Original Message-----
> From: 王颢 [mailto:howard_wang at realsil.com.cn]
> Sent: Wednesday, 14 August 2024 11.52
> To: Stephen Hemminger
> Cc: dev at dpdk.org
> Subject: 答复: Inquiry Regarding Sending Patches to DPDK
>
> 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 = 'howard_wang at realsil.com.cn'
> to_addr = 'dev at dpdk.org'
>
> 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 <stephen at networkplumber.org>
> 发送时间: 2024年8月12日 22:56
> 收件人: 王颢 <howard_wang at realsil.com.cn>
> 抄送: dev at dpdk.org
> 主题: Re: Inquiry Regarding Sending Patches to DPDK
>
>
> External mail.
>
>
>
> On Mon, 12 Aug 2024 07:52:39 +0000
> 王颢 <howard_wang at realsil.com.cn> 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.
> >
> > 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.
More information about the dev
mailing list