# note **Repository Path**: tzing_t/note ## Basic Information - **Project Name**: note - **Description**: 记录一些学习中遇到的问题 - **Primary Language**: Unknown - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-08-24 - **Last Updated**: 2025-08-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### pypi双因子认证 有app,电脑上可以通过pip install pyotp解决 粘贴key后代码即可 ```python #!/usr/bin/env python3 import pyotp key = '******' totp = pyotp.TOTP(key) print(totp.now()) ``` ### linux发邮件 装包启动服务 yum install -y mailx postfix systemctl start postfix 配置邮箱 ```shell cat << EOF > /etc/mail.rc set from=your_mail@163.com set smtp=smtps://smtp.163.com set smtp-auth-user=your_mail@163.com set smtp-auth-password=***NEED CHANGE*** set smtp-auth=login set ssl-verify=ignore set nss-config-dir=/etc/pki/nssdb/ EOF ``` 发送邮件命令示例 ```shell echo "content text" | mail -s "test mail" tzing0013@gmail.com ```