# pam_smtp **Repository Path**: robot-dot-win/pam_smtp ## Basic Information - **Project Name**: pam_smtp - **Description**: 一个Linux PAM模块,通过SMTP服务器的用户名/密码来完成认证 - **Primary Language**: C++ - **License**: GPL-3.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-10-25 - **Last Updated**: 2025-12-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## DESCRIPTION pam_smtp is a Linux PAM module which provides a way to authenticate users against an SMTP server. On success it returns PAM_SUCCESS, otherwise it returns PAM_AUTH_ERR, PAM_SERVICE_ERR, PAM_BUF_ERR or PAM_PERM_DENIED. No credentials are awarded by this module. ## BUILD The source program is a single C++17(and newer) file. Requires: pam-devel, libcurl-devel ```bash $ g++ -O2 pam_smtp.cpp -o pam_smtp.so -shared -lpam -lcurl -fPIC ``` ## USAGE ``` pam_smtp.so [starttls|tls] [@domain_name] ``` If ```@domain_name``` is not omitted, ```username``` against the SMTP will be ```PAM_USER@domain_name```. Example: ``` auth required pam_smtp.so smtp-mail.outlook.com:587 starttls @live.cn ``` ## LICENSE pam_smtp is licensed under the [GPLv3](LICENSE) license.