---
title: "Qmail1.0.3打过补丁的qmail-smtpd.c"
author: "lonestone"
date: "2008-04-10T22:22:00Z"
tags: []
slug: "qmail1-0-3-qmail-smtpd-c"
draft: false
lastmod: "2008-04-10T22:22:00Z"
id: 897805
url: "https://lonestone.iteye.com/blog/897805"
---

转载自[http://blog.chinaunix.net/u/12479/showart\_468642.html](http://blog.chinaunix.net/u/12479/showart_468642.html)：

我在网上找到了一些qmail-smtpd的补丁，然后制作了一个qmail-smtpd.c，主要功能包括：  
1、smtp 认证  
2、badrcpto  
3、强制本地用户向本地用户发邮件时验证  
4、认证的用户名和mailfrom必须一致，防止冒充本地用户发邮件

用法：  
1、解开qmail-1.03的源文件  
2、打上qmail-smtpd-auth-0.31.tar.gz补丁  
3、解开附件，将qmail-smtpd.c文件拷贝到：qmail-1.03目录，覆盖源文件  
4、编译qmail-smtpd  
make qmail-smtpd  
5、拷贝生成的qmail-smtpd到/var/qmail/bin/目录覆盖原文件（强烈建议备份qmail-smtpd）  
6、覆盖后重启qmail

[http://blogimg.chinaunix.net/blog/upfile2/080121121244.rar](http://blogimg.chinaunix.net/blog/upfile2/080121121244.rar)

这个补丁解决了大问题，谢谢作者。折腾了2天终于好了。