DPDK patches and discussions
 help / color / mirror / Atom feed
From: 王颢 <howard_wang@realsil.com.cn>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: 答复: Inquiry Regarding Sending Patches to DPDK
Date: Wed, 14 Aug 2024 09:51:30 +0000	[thread overview]
Message-ID: <9873a470ff674be7abc183b2ea8102ad@realsil.com.cn> (raw)
In-Reply-To: <20240812075539.20a77c1c@hermes.local>

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@realsil.com.cn'  
to_addr = 'dev@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@networkplumber.org> 
发送时间: 2024年8月12日 22:56
收件人: 王颢 <howard_wang@realsil.com.cn>
抄送: dev@dpdk.org
主题: Re: Inquiry Regarding Sending Patches to DPDK


External mail.



On Mon, 12 Aug 2024 07:52:39 +0000
王颢 <howard_wang@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.

  reply	other threads:[~2024-08-14  9:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-12  7:52 王颢
2024-08-12 14:55 ` Stephen Hemminger
2024-08-14  9:51   ` 王颢 [this message]
2024-08-14 10:14     ` Morten Brørup
2024-08-15  7:55       ` 答复: " 王颢

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9873a470ff674be7abc183b2ea8102ad@realsil.com.cn \
    --to=howard_wang@realsil.com.cn \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).