你好,游客 登录 注册 搜索
背景:
阅读新闻

Linux 下Sendmail 的加密与认证

[日期:2012-11-16] 来源:Linux社区  作者:guodong810 [字体:大 中 小]

二  实现POP3进行加密

1.我们把POP3的证书存放在/etc/dovecot/certs下

   首先建立这个目录

   [root@localhost CA]# mkdir -pv /etc/dovecot/certs

mkdir: 已创建目录 “/etc/dovecot”

mkdir: 已创建目录 “/etc/dovecot/certs”

2.创建私钥

  [root@localhost CA]# cd /etc/dovecot/certs/

[root@localhost certs]# openssl genrsa 1024 > dovecot.key

Generating RSA private key, 1024 bit long modulus

.................................++++++

...++++++

e is 65537 (0x10001)

3.生成此POP3服务器的请求证书

  [root@localhost certs]# openssl req -new -key dovecot.key -out dovecot.csr

You are about to be asked to enter information that will be incorporated

into your certificate request.

What you are about to enter is what is called a Distinguished Name or a DN.

There are quite a few fields but you can leave some blank

For some fields there will be a default value,

If you enter '.', the field will be left blank.

-----

Country Name (2 letter code) [GB]:CN

State or Province Name (full name) [Berkshire]:HENAN

Locality Name (eg, city) [Newbury]:Zhengzhou

Organization Name (eg, company) [My Company Ltd]:sina

Organizational Unit Name (eg, section) []:pop3

Common Name (eg, your name or your server's hostname) []:pop3.sina.com

Email Address []:

Please enter the following 'extra' attributes

to be sent with your certificate request

A challenge password []:

An optional company name []:

[root@localhost certs]#

4.请求CA服务器颁发证书

  [root@localhost certs]# openssl ca -in dovecot.csr -out dovecot.cert

Using configuration from /etc/pki/tls/openssl.cnf

Check that the request matches the signature

Signature ok

Certificate Details:

Serial Number: 1 (0x1)

Validity

Not Before: Nov 15 10:11:00 2012 GMT

Not After : Nov 15 10:11:00 2013 GMT

Subject:

countryName              = CN

stateOrProvinceName      = HENAN

organizationName          = sina

organizationalUnitName    = pop3

commonName                = pop3.sina.com

linux
相关资讯       Sendmail  sendmail配置  Linux Sendmail 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款