Postfix邮件系统的完全安装(一)

linux邮件系统之Postfix与Dovecot linux邮件系统之Postfix邮件系统介绍部署前提邮件系统部署-Postfix邮件系统部署-Dovecot邮件的别名检测window系统linux系统 邮件系统介绍 电子邮件系统基于邮件协议来完成电子邮件的传输,常见的邮件协议有下面这些 1.简单邮件传输协议(Simple Mail Transfer Protocol,SMTP):用于发送和中转发出的电子邮件,占用服务器的25/TCP端口 2.邮局协议版本3(Post Office Protocol 3,POP3):用于将电子邮件存储到本地主机,占用服务 阅读详情

Postfix邮件系统的完全安装
(postfix+mysql+cyrus-sasl+quota+Courier-imap+sqwebmail或igenus)
(2003-06-23 14:56:00)


    本文主要讨论源代码方式的安装,对于postfix+sasl、postfix2+sasl2分别进行安装介绍,两者的配置文件相同。
    修改历史:
      2003.05.05 创建文档。
      2003.05.27 修正postfix2.0版本的quota(磁盘限额)问题、修正postfix自启动脚本错误提示的问题。
      2003.05.29 添加webmail部分,使用sqwebmail(英文版)。
      2003.05.31 修正sqwebmail中quota显示问题、更改sqwebmail参数、配置。
      2003.06.18 添加webmail第二部分,使用igenus(中文版)。
      2003.06.23 添加mysql自启动脚本,提供igenus_docn.tar.gz下载。

    从互联网下载以下几个程序,按如下步骤进行处理:
1、mysql-3.23.55.tar.gz
2、cyrus-sasl-1.5.28.tar.gz(sasl-1.5.28-ldap-ssl-filter-mysql-patch.tgz)或
   cyrus-sasl-2.1.12.tar.gz、
3、pam_mysql-0.4.7.tar.gz(Linux下使用该包)
4、postfix-1.1.11.tar.gz(postfix-1.1.11_quota_maildirsize.patch.gz)或
   postfix-2.0.10.tar.gz(postfix-2.0.10.patch.gz)
5、courier-imap-1.7.1.tar.bz2
(另需安装expect.tar.gz、tcl、gmake)
6、sqwebmail-3.5.1.tar.bz2
7、igenus_docn.tar.gz(此版是Docn由igenus_2_20030311_snap修改而来的)

安装mysql-3.23.55
1、添加mysql用户组及mysql用户
server# pw groupadd mysql
server# pw useradd mysql -g mysql -s /nonexistent
2、配置安装
server# tar zxvf mysql-3.23.55.tar.gz
server# cd mysql-3.23.55
server# ./configure --prefix=/usr/local/mysql --with-low-memory /
--with-charset=gb2312 --without-debug
server# make
server# make install
server# scripts/mysql_install_db
server# chown -R root /usr/local/mysql
server# chown -R mysql /usr/local/mysql/var
server# chgrp -R mysql /usr/local/mysql
server# cp support-files/my-medium.cnf /etc/my.cnf
server# ln -s /usr/local/mysql/bin/safe_mysqld /usr/local/bin/safe_mysqld
server# ln -s /usr/local/mysql/bin/mysqladmin /usr/local/bin/mysqladmin
server# ln -s /usr/local/mysql/bin/mysql /usr/local/bin/mysql
server# ln -s /usr/local/mysql/lib/mysql /usr/local/lib/mysql
3、编辑用户数据库mail.sql 示例:mail.sql
4、设置自启:
server# edit /usr/local/etc/rc.d/mysqld.sh 示例:mysqld.sh
server# chmod 755 /usr/local/etc/rc.d/mysqld.sh

1、安装cyrus-sals
1.1、安装cyrus-sasl-1.5.28.tar.gz
server# tar zxvf cyrus-sasl-1.5.28.tar.gz
server# tar zxvf sasl-1.5.28-ldap-ssl-filter-mysql-patch.tgz
server# cp ldap-mysql_sasl-1.5.28/sasl-ldap+mysql.patch cyrus-sasl-1.5.28
server# cd cyrus-sasl-1.5.28
server# patch -p1 < sasl-ldap+mysql.patch
server# ./configure --disable-sample --disable-pwcheck --disable-cram /
--disable-digest --disable-krb4 --disable-gssapi --disable-anon /
--with-saslauthd=/var/run/saslauthd --enable-plain --enable-login /
--with-mysql=/usr/local/mysql/lib/mysql --oldincludedir=/usr/local/mysql/include/mysql
server# make
server# make install
server# ln -s /usr/local/lib/sasl /usr/lib/sasl
1.2、安装cyrus-sasl-2.1.12
server# tar -zxvf cyrus-sasl-2.1.12.tar.gz
server# cd cyrus-sasl-2.1.12
server# ./configure --disable-sample --disable-pwcheck --disable-cram /
--disable-digest --disable-krb4 --disable-gssapi --disable-anon /
--with-saslauthd=/var/run/saslauthd --enable-plain --enable-login
server# make
server# make install
server# ln -s /usr/local/lib/sasl2 /usr/lib/sasl2
2、配置sasl的lib库
server# edit /etc/default/rc.conf(在ldconfig_paths="/usr/loca/lib后面加上/usr/local/lib/sasl或者/usr/local/lib/sasl2")
server# shutdown -r now(使其生效)
3、运行saslauthd(如果使用pam直接认证,则该步骤可以省略) saslauthd.sh
server# mkdir /var/run/saslauthd
server# edit /usr/local/etc/rc.d/saslauthd.sh
server# chmod 755 /usr/local/etc/rc.d/saslauthd.sh
4、准备postfix认证的配置文件
A)使用pam直接认证:
server# echo pwcheck_method: pam > /usr/local/lib/sasl/smtpd.conf 或者:
server# echo pwcheck_method: pam > /usr/local/lib/sasl2/smtpd.conf
B)使用saslauthd调用pam认证:
server# echo pwcheck_method: saslauthd > /usr/lib/sasl/smtpd.conf 或者:
server# echo pwcheck_method: saslauthd > /usr/lib/sasl2/smtpd.conf

安装 pam_mysql-0.4.7(由于采用源码安装编译不能通过,故使用freebsd4.7自带的安装包)
1、安装
server# pkg_add pam_mysql-0.4.7.tgz
server# cp /usr/local/lib/pam_mysql.so /usr/lib/
2、配置pam.conf调用mysql支持sasl认证
server# edit /etc/pam.conf(将pop3 和imap的前面加上#)添加下列代码:
smtp auth sufficient pam_mysql.so user=postfix passwd=liubinw host=localhost db=mail table=virtual_users usercolumn=id passwdcolumn=password crypt=1
smtp account required pam_mysql.so user=postfix passwd=liubinw host=localhost db=mail table=virtual_users usercolumn=id passwdcolumn=password crypt=1
(注:密码使用crypt加密,如果使用明文密码cyrpt=0,如果使用password()加密crypt=2)

安装postfix
1、停止sendmail
server# mv /usr/bin/newaliases /usr/bin/newaliases.OFF
server# mv /usr/bin/mailq /usr/bin/mailq.OFF
server# mv /usr/sbin/sendmail /usr/sbin/sendmail.OFF
server# mv /etc/rc.sendmail /etc/sendmail.OFF
server# edit /etc/rc.conf(在sendmail="YES"前面添加# )
2、添加postfix用户
server# pw groupadd postfix -g 2003
server# pw groupadd postdrop -g 2004
server# pw useradd postfix -u 2003 -g 2003 -d /dev/null -s /nologin
3、安装
3.1、安装postfix-1.1.11.tar.gz
server# tar zxvf postfix-1.1.11.tar.gz
server# gzip -d postfix-1.1.11_quota_maildirsize.patch.gz
server# cp postfix-1.1.11_quota_maildirsize.patch postfix-1.1.11
server# cd postfix-1.1.11
server# patch -p1 < postfix-1.1.11_quota_maildirsize.patch
server# make -f Makefile.init makefiles 'CCARGS=-DUSE_SASL_AUTH -DHAS_MYSQL -I/usr/local/mysql/include/mysql -I/usr/local/include' 'AUXLIBS=-L/usr/local/lib -L/usr/local/mysql/lib/mysql -lmysqlclient -lsasl -lz -lm'
server# make
server# make install
3.2、安装postfix-2.0.10.tar.gz
server# tar zxvf postfix-2.0.10.tar.gz
server# gzip -d postfix-2.0.10.patch.gz
server# mv postfix-2.0.10.patch postfix-2.0.10
server# cd postfix-2.0.10
server# patch -p1 < postfix-2.0.10.patch
server# make -f Makefile.init makefiles 'CCARGS=-DUSE_SASL_AUTH -DHAS_MYSQL -I/usr/local/mysql/include/mysql -I/usr/local/include/sasl' 'AUXLIBS=-L/usr/local/lib/ -L/usr/local/mysql/lib/mysql -lmysqlclient -lsasl2 -lz -lm'
server# make
server# make install(第一次安装使用此命令,安装过程中如果提示错误则在提示选择tmp的时候使用/tmp)
server# make upgrade(升级老版本使用此命令)
4、配置
server# echo ‘postfix: root’ >> /etc/aliases
server# /usr/bin/newaliases
(注:如果提示postfix无法打开opiekeys文件则执行:# chown postfix:postfix /etc/opiekeys)
A)编辑修改/etc/posftix/main.cf 示例:main.cf
#======= BASE ==============
myhostname = docn.nankai.edu.cn
mydomain = nankai.edu.cn
home_mailbox=Maildir/
mydestination = $myhostname, $mydomain, $transport_maps
local_recipient_maps = 为空
mailbox_command= /usr/lib/courier-imap/bin/deliverquota -w 90 ~/Maildir
#======= MYSQL =============
transport_maps = mysql:/etc/postfix/transport.cf
virtual_gid_maps = mysql:/etc/postfix/gids.cf
virtual_mailbox_base = /var/mail
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual.cf
virtual_maps = mysql:/etc/postfix/mysql.aliases.cf
virtual_uid_maps = mysql:/etc/postfix/uids.cf
#======= Quota ============
message_size_limit = 2097152 //限制每次发邮件的大小 2MB
virtual_mailbox_limit_inbox = no
virtual_mailbox_limit_maps = mysql:/etc/postfix/mailboxsize-mysql.cf
virtual_mailbox_limit_override = yes
virtual_maildir_extended = yes
virtual_create_maildirsize = yes
virtual_mailbox_limit = 10485760 //总邮箱的大小 10MB
#====== SASL ================
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated permit_auth_destinatio reject
#smtpd_sasl_local_domain = $mydomain
smtpd_client_restrictions = permit_sasl_authenticated
B)确认/etc/postfix/master.cf的配置有如下内容 示例:master.cf
virtual unix - n n - - virtual
C)编辑/etc/posftix/transport.cf 示例:transport.cf
D)编辑/etc/postfix/gids.cf 示例:gids.cf
E)编辑/etc/postfix/uids.cf 示例:uids.cf
F)编辑/etc/posftix/mysql_virtual.cf 示例:mysql_virtual.cf
G)编辑/etc/postfix/mysql.aliases.cf 示例:mysql.aliases.cf
H)编辑/etc/postfix/mailboxsize-mysql.cf 示例:mailboxsize-mysql.cf
5、设置自启动
server# edit /usr/local/etc/rc.d/postfix-server.sh 示例:postfix-server.sh
server# chmod 755 /usr/local/etc/rc.d/postfix-server.sh

安装expect.tar.gz(need tcl)
server# pkg_add tcl-version
server# tar zxvf expect.tar.gz
server# cd expect-5.38
server# ./configure --enable-threads --with-tcl=/usr/local/lib/tcl8.3 /
--with-tclinclude=/usr/local/include/tcl8.3
server# make
server# make install

安装Courier-imap-1.7.1(need gmake、expect)
1、安装
server# pkg_add gmake-version
server# pw useradd docn -g wheel(the software MUST run the configure script as normal user, not root)
server$ bunzip2 courier-imap-1.7.1.tar.bz2
server$ tar xvf courier-imap-1.7.1.tar
server$ cd courier-imap-1.7.1
server# ./configure --without-ipv6 --enable-unicode /
--enable-workarounds-for-imap-client-bugs /
--with-mysql-libs=/usr/local/mysql/lib/mysql /
--with-mysql-includes=/usr/local/mysql/include/mysql
server$ gmake
server# su root
server# gmake install
server# gmake install-configure
2、配置
编辑修改/usr/lib/courier-imap/etc/authmysqlrc 示例:authmysqlrc
MYSQL_SERVER localhost
MYSQL_USERNAME courier
MYSQL_PASSWORD liubinw
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_PORT 3306
MYSQL_OPT 0
MYSQL_DATABASE mail
MYSQL_USER_TABLE virtual_users
MYSQL_CRYPT_PWFIELD password
MYSQL_UID_FIELD uid
MYSQL_GID_FIELD gid
MYSQL_LOGIN_FIELD id
MYSQL_HOME_FIELD home
MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD maildir
MYSQL_QUOTA_FIELD quota
MYSQL_WHERE_CLAUSE imapok=1
编辑修改/usr/lib/courier-imap/etc/authdaemonrc 示例:authdaemonrc
version="authdaemond.mysql"
3、设置自启动
server# cd /usr/local/etc/rc.d
server# ln -s /usr/lib/courier-imap/libexec/imapd.rc imapd.sh
server# ln -s /usr/lib/courier-imap/libexec/pop3d.rc pop3d.sh
server# chmod 755 imapd.sh
server# chmod 755 pop3d.sh

Now!重新启动服务器,邮件服务就可以自动运行了!

现在我们开始测试:
1、设置用户:
server# mysql
mysql> use mail;
在数据库里你可以看到
mysql> show tables;
+----------------+
| Tables_in_mail |
+----------------+
| aliases        |
| transport      |
| virtual_users  |
+----------------+
mysql> desc aliases;
+-------+--------------+------+-----+---------+-------+
| Field | Type         | Null | Key | Default | Extra |
+-------+--------------+------+-----+---------+-------+
| alias | varchar(255) |      | PRI |         |       |
| rcpt  | varchar(255) | YES  |     | NULL    |       |
+-------+--------------+------+-----+---------+-------+
mysql> insert aliases values('postmaster@nankai.edu.cn','docn@nankai.edu.cn');
mysql> insert aliases values('postmaster@freebsd.net','docn@freebse.net');
mysql> select * from aliases;
+--------------------------+--------------------+
| alias                    | rcpt               |
+--------------------------+--------------------+
| postmaster@nankai.edu.cn | docn@nankai.edu.cn |
| postmaster@freebsd.net   | docn@freebse.net   |
+--------------------------+--------------------+
mysql> desc transport;
+-----------+-----------+------+-----+---------+-------+
| Field     | Type      | Null | Key | Default | Extra |
+-----------+-----------+------+-----+---------+-------+
| domain    | char(128) |      | PRI |         |       |
| transport | char(128) |      |     |         |       |
+-----------+-----------+------+-----+---------+-------+
mysql> insert transport values('nankai.edu.cn','virtual:');
mysql> insert transport values('freebsd.net','virtual:');
mysql> select * from transport;
+---------------+-----------+
| domain        | transport |
+---------------+-----------+
| nankai.edu.cn | virtual:  |
| freebsd.net   | virtual:  |
+---------------+-----------+
mysql> desc virtual_users;
+-----------+---------------------+------+-----+----------+----------------+
| Field     | Type                | Null | Key | Default  | Extra          |
+-----------+---------------------+------+-----+----------+----------------+
| unique_id | int(32) unsigned    |      | MUL | NULL     | auto_increment |
| id        | char(128)           |      | PRI |          |                |
| password  | char(128)           | YES  |     | NULL     |                |
| uid       | int(10) unsigned    | YES  |     | 104      |                |
| gid       | int(10) unsigned    | YES  |     | 104      |                |
| home      | char(255)           | YES  |     | NULL     |                |
| maildir   | char(255)           | YES  |     | NULL     |                |
| date_add  | date                | YES  |     | NULL     |                |
| time_add  | time                | YES  |     | NULL     |                |
| domain    | char(128)           | YES  |     | NULL     |                |
| name      | char(255)           | YES  |     | NULL     |                |
| imapok    | tinyint(3) unsigned | YES  |     | 1        |                |
| quota     | char(255)           | YES  |     | 10485760 |                |
+-----------+---------------------+------+-----+----------+----------------+
mysql> INSERT INTO virtual_users
mysql> (id,home,password,maildir,date_add,time_add,domain,name)
mysql> VALUES ('docn@nankai.edu.cn','/var/mail/',encrypt('liubinw'),
mysql> 'nankai.edu.cn/docn/Maildir/','2003-04-23','01:18:24','nankai.edu.cn','docn');
mysql> INSERT INTO virtual_users
mysql> (id,home,password,maildir,date_add,time_add,domain,name)
mysql> VALUES ('liubinw@freebsd.net','/var/mail/',encrypt('liubinw'),
mysql> 'freebsd.net/liubinw/Maildir/','2003-04-23','01:18:24','freebsd.net','liubinw');
mysql> quit
2、设置用户的目录与权限:
server# mkdir -p /var/mail/nankai.edu.cn/docn
server# mkdir -p /var/mail/freebsd.net/docn
server# cd /usr/lib/courier-imap/bin
server# maildirmake /var/mail/nankai.edu.cn/docn/Maildir
server# maildirmake -q 5000000S /var/mail/nankai.edu.cn/docn/Maildir(如果使用igenus,该命令不用执行!)
server# maildirmake /var/mail/freebsd.net/liubinw/Maildir
server# maildirmake -q 5000000S /var/mail/freebsd.net/liubinw/Maildir(如果使用igenus,该命令不用执行!)
server# chmod -R 700 /var/mail/nankai.edu.cn/
server# chmod -R 700 /var/mail/freebsd.net/
server# chown -R postfix:postfix /var/mail/nankai.edu.cn
server# chown -R postfix:postfix /var/mail/freebsd.net
至此用户设置完毕,这里仅仅使用两个虚拟域,同理可以设置若干个虚拟域,如:mail.com
3、用户登录测试:
server# telnet 0 25
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
220 server.nankai.edu.cn ESMTP Postfix
ehlo server
250-server.nankai.edu.cn
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN OTP
250-AUTH=LOGIN PLAIN OTP
250-XVERP
250 8BITMIME
auth login
334 VXNlcm5hbWU6
ZG9jbkBuYW5rYWkuZWR1LmNu (此为用户名id:docn@nankai.edu.cn)
334 UGFzc3dvcmQ6
bGl1Ymludw== (此为用户密码password:liubinw)
235 Authentication successful (OK,Postfix 登录成功)
quit
221 Bye
Connection closed by foreign host.
server# telnet 0 110
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
+OK Hello there.
user docn@nankai.edu.cn
+OK Password required.
pass liubinw
+OK logged in. (OK,pop 登录成功)
quit
+OK Bye-bye.
Connection closed by foreign host.
    你也可以使用任何其它的邮件客户端程序来测试,如foxmail、Outlook Express等等。

安装sqwebmail-3.5.1(注意:user:docn)
1、安装
server$ bunzip2 sqwebmail-3.5.1.tar.bz2
server$ tar xvf sqwebmail-3.5.1.tar
server$ cd sqwebmail-3.5.1
server$ ./configure --prefix=/usr/local/share/webmail /
--enable-imagedir=/usr/local/apache/htdocs/webmails --enable-imageurl=/webmails /
--enable-cgibindir=/usr/local/apache/cgi-bin/webmail3 --with-defaultlang=zh_CN /
--enable-mimecharset=gb2312 --with-mysql-libs=/usr/local/mysql/lib/mysql /
--with-mysql-includes=/usr/local/mysql/include/mysql --enable-unicode /
--with-cachedir=/var/webmail/cache --enable-webpass=no --without-ospell /
--with-maxmsgsize=5242880 --enable-maxpurge=7 --without-authldap /
--without-authvchkpw --without-authshadow --with-fcgi --enable-https=auto /
--with-cacheowner=postfix --with-maxformargsize=2097152 --with-maxmsgsize=5242880 /
--enable-mimetypes
server$ cd sqwebmail/html
server$ make clone from=en-us to=zh_CN
server$ echo zh_CN zh_CN >zh_CN/LANGUAGE_PREF
server$ echo zh_CN > zh_CN/LOCALE
server$ echo gb2312 >zh_CN/CHARSET
server$ cd ../..
server$ ./configure --prefix=/usr/local/share/webmail /
--enable-imagedir=/usr/local/apache/htdocs/webmails --enable-imageurl=/webmails /
--enable-cgibindir=/usr/local/apache/cgi-bin/webmail3 --with-defaultlang=zh_CN /
--enable-mimecharset=gb2312 --with-mysql-libs=/usr/local/mysql/lib/mysql /
--with-mysql-includes=/usr/local/mysql/include/mysql --enable-unicode /
--with-cachedir=/var/webmail/cache --enable-webpass=no --without-ospell /
--with-maxmsgsize=5242880 --enable-maxpurge=7 --without-authldap /
--without-authvchkpw --without-authshadow --with-fcgi --enable-https=auto /
--with-cacheowner=postfix --with-maxformargsize=2097152 --with-maxmsgsize=5242880 /
--enable-mimetypes
server$ gmake configure-check
server$ gmake
server$ su
server# gmake install-strip
server# gmake install-configure
2、配置
编辑修改/usr/local/share/sqwebmail/authmysqlrc 示例:authmysqlrc
MYSQL_SERVER localhost
MYSQL_USERNAME courier
MYSQL_PASSWORD liubinw
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_PORT 3306
MYSQL_OPT 0
MYSQL_DATABASE mail
MYSQL_USER_TABLE virtual_users
MYSQL_CRYPT_PWFIELD password
MYSQL_UID_FIELD uid
MYSQL_GID_FIELD gid
MYSQL_LOGIN_FIELD id
MYSQL_HOME_FIELD home
MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD maildir
MYSQL_QUOTA_FIELD quota
MYSQL_WHERE_CLAUSE imapok=1
编辑修改/usr/local/share/sqwebmail/authdaemonrc 示例:authdaemonrc
version="authdaemond.mysql"
3、设置自启动
server# edit /usr/local/etc/rc.d/authdeamond.sh 示例:authdaemond.sh
server# chmod 755 /usr/local/etc/rc.d/authdeamond.sh
4、使用:
最后在浏览器的URL中输入:
http://www.nankai.edu.cn/cig-bin/webmail3/sqwebmail

安装igenusigenus_2_20030311_snap(以下用的是由igenus_2_20030516_snap.tgz修改的版本)
1、安装:
server# cd /var/mail
server# tar zxvf igenus_docn.tar.gz
server# edit /usr/local/apache/conf/httpd.conf
2、配置:
1、Group nobody、User nobody
修改为: Group postfix、User postfix
2、DocumentRoot "/usr/local/apache/htdocs"
修改为:DocumentRoot "/var/mail/webmail"
3、修改config_inc.php文件
$CFG_BASEPATH = "/var/mail/webmail";
$CFG_MYSQL_HOST = 'localhost';
$CFG_MYSQL_USER = 'postfix';
$CFG_MYSQL_PASS = 'liubinw';(同以上密码,均可以自己修改)
$CFG_MYSQL_DB = 'mail';
3、使用:
最后在浏览器的URL中输入:
http://www.nankai.edu.cn

4、最后说明:最新使用postfix-2.0.12,因为安装测试不通过,所以建议使用2.0.10版本。我修改的igenus时现在已经发布到网上,如果连接失效的话,可以用qq或email和我联系索要!

至此,Postfix的webmail邮件服务器系统架设完毕。

Exchange、Coremail、Postfix 等主流邮件系统数据存储格式介绍 本文主要介绍主流邮件系统(如Exchange、Coremail、Postfix)的数据存储格式,旨在帮助大家对邮件系统的底层结构有更深刻的认识。由于小编能力有限,文中难免存在疏漏与不足之处,恳请各位读者指正。 阅读详情

相关推荐

邮件收发原理及部署postfix邮件系统

本文介绍postfix安装部署及实验

云计算之路 3981

最新postfix 的master.cf配置参考

上次安装完服务后,我将last配置作了一次magic,以供配置参考此配置文件里的格式和参数可以参考postfix官方文档:http://www.postfix.com/documentation.htmlsmtp      inet  n       -       n       -       -       smtpd#submission inet n       -     

wader2005的专栏 3807

Postfix与Dovecot部署邮件系统

电子邮件系统 电子邮件系统基于邮件协议来完成电子邮件的传输,常见的邮件协议有下面这些: 简单邮件传输协议(Simple Mail Transfer Protocol,SMTP): 用于发送和中转发出的电子邮件,占用服务器的25/TCP端口。 邮局协议版本3(Post Office Protocol 3): 用于将电子邮件存储到本地主机,占用服务器的110/TCP端口。 Internet消息访问协议版本4(Internet Message Access Protocol 4): 用于在本地主机上访问邮件,占用

xyf_745832117的博客 1510

第十四章 使用 Postfix 与Dovecot 部署邮件系统

在 aliases 邮件别名服务的配置文件中可以看到,里面定义了大量的用户别名,这些用户别名大多数是 Linux 系统本地的系统账户,而在冒号(:)间隔符后面的root 账户则是用来接收这些账户邮件的人。用户别名可以是 Linux 系统内的本地用户,也可以是完全虚构的用户名字。填写电子邮件账户信息,在图 15-7 所示的页面中,在“您的姓名”文本框中输入您的名字(可以为自定义的任意名字),在“电子邮件地址”文本框中输入服务器系统内的账户名和发件域,在“密码”文本框中输入该账户在服务器内的登录密码。

u012616827的博客 9847

Linux环境下使用Postfix和Dovecot搭建邮件系统

1. 实验环境: Linux rhel6.5作为邮件服务器,IP:192.168.20.20 Windows server 2008上安装Foxmail,作为邮件测试的客户端,IP:192.168.20.130 Postfix邮件系统(一) 2. 实验步骤: (1)前期准备 1.1> 配置邮件服务器端的IP地址,并重新启动网络服务; 1.2> 清除防火...

橘子女侠 8375

使用 Postfix 与 Dovecot 部署邮件系统

电子邮件(Email)系统是我们在日常工作、生活中最常用的一个网络服务。本章将首先介绍电子邮件系统的起源,然后介绍SMTP、POP3、IMAP4等常见的电子邮件协议,以及MUA、MTA、MDA这3种服务角色的作用。本章将完整地演示在Linux系统中使用Postfix和Dovecot服务程序配置电子邮件系统服务的方法,并重点讲解常用的配置参数,此外还将结合bind服务程序提供的DNS域名解析服务来验证客户端主机与服务器之间的邮件收发功能。

君逍遥o 814

POSTFIX 邮件系统

本文介绍Postfix邮件系统的安装与配置. 如有疑问可以留言. 本文主要内容是poftfix+mysql 实现虚拟用户. http://wiki.extmail.org/extmail_solution_for_linux_centos-5 平台: Centos 5.6 64位所需软件: Apache:2.2.15 Mysql:5.1.36 Php:5.2.13 P

7760

Postfix邮件系统搭建实战指南

在现代信息时代,电子邮件仍然是最为广泛使用的一种通信方式之一。而Postfix作为一个高性能、开源的邮件传输代理(MTA),在企业邮件系统中扮演着至关重要的角色。它被设计为易于安装、设置简单、安全可靠且易于维护的系统。作为Sendmail的替代品,Postfix以其出色的性能和对垃圾邮件及病毒的高效过滤能力,成为了IT专业人员广泛采纳的邮件解决方案。Postfix的设计理念是模块化,这意味着它易于理解和扩展。邮件传输的每个步骤都由一个单独的模块来处理,使得邮件处理过程更加清晰。

weixin_42402664的博客 1105

linux centos7中使用 Postfix 和Dovecot搭建邮件系统

Postfix是一个开源的邮件传输代理(MTA),用于路由和传送电子邮件。它是一个可靠、安全且高性能的邮件服务器软件,常用于搭建邮件系统的核心组件之一。特点和功能:Postfix注重安全性,采用了多种安全机制来保护系统免受邮件滥用和攻击。Postfix设计简单、高效,具有良好的性能表现,能够高效地处理大量的邮件流量。Postfix提供了丰富的配置选项和灵活的扩展性,可以根据需求进行定制和配置。Postfix具有清晰的文档和友好的社区支持,易于安装、配置和管理。

博客之路,前途漫漫 3016

Linux--使用Postfix与Dovecot部署邮件系统

电子邮件系统。二、部署基础的电子邮件系统、1、配置Postfix服务程序、2、配置Dovecot服务程序、3、客户使用电子邮件系统、三、设置用户别名邮箱、四、Linux邮件客户端

恐龙让Lee的博客 1968

SV fork join_none & for循环结合使用

fork join_none与循环联用常见问题解决方案

ZhangShuHuai11的博客 884

POSTFIX邮件系统搭建

一、前言 1.最终可以实现的功能 本文主要介绍了一种简单的文件搭建系统。 可以实现以下两个功能: 1) 在服务器端(邮件服务器)使用编写的脚本发送带附件的邮件,邮件的后缀@后面部分为购买的域名。 2) 可以使用outlook,手机等客户端接收和编写邮件。 2.所需要的条件 要搭建这样的服务器必须要一些条件 1) 有一台拥有公网IP的计算机(本地服务器

DenPate的专栏 7705

华为eNSP实战:手把手教你配置DHCP全局地址池(含AP固定IP分配)

本文通过华为eNSP模拟器,详细演示了如何配置DHCP全局地址池,为不同业务VLAN动态分配IP地址,并重点讲解了如何通过MAC地址绑定为接入点(AP)分配固定IP。文章涵盖了从拓扑设计、基础网络搭建到地址池精细配置、验证测试及常见故障排查的全流程,是网络工程师掌握企业级DHCP部署与AP管理的实用指南。

weixin_29235923的博客 602

邮件系统postfix详细安装与配置

邮件系统postfix安装与配置(一) 邮件系统postfix安装与配置 一、 postfix概述 postfix是Wietse Venema在IBM的GPL协议之下开发的MTA(邮件传输 代理)软件。下面一段话摘自postfix的官方站点(http://www.postfix.org): “postfix是Wietse Venema想要为使用最广泛的sendmail提供替代品的一个尝试...

weixin_34217773的博客 2010

ifix5.8连接ab plc的点-通过rslinx

以ifix连接ab plc的点为例 1.先在rslinx上把plc的点导出为opc server 2.使用opc power tool 作为opc client 去连接 3.保存到项目的PDB文件夹下面,并且以节点名命名。 也可以不以节点名命名,系统自动会生成一个以节点名命名的这种文件,就显得很乱。 同时,项目的PDB目录下面必须还得拷过来一个de...

中国智造2025 4121

MPU6050 加速度计和陀螺仪传感器与 Arduino 的接口

虽然该模型并不能准确代表现实世界中加速度计传感器的构建方式,但它通常有助于理解为什么加速度计的输出信号通常以 ±g 为单位指定,或者为什么加速度计在静止时在 z 轴上的读数为 1g,或者在不同方向上您可以期望得到什么样的加速度计读数。该模块的核心是低功耗、低成本的 6 轴运动跟踪芯片 MPU6050,它将 3 轴陀螺仪、3 轴加速度计和数字运动处理器 (DMP) 集成到一个 4mm x 4mm 的微型芯片中。小时候,科学博览会上的陀螺仪总是让我们感到惊讶,因为它们以奇怪的方式移动,甚至似乎违背了重力。

sxstj的博客 9942

Postfix电子邮件系统精要

Postfix电子邮件系统精要作者:田逸(sery@163.com)http://os.51cto.com/art/200710/57530.htm配置一个postfix邮件系统,远比我先前的想象复杂。这次共配置2个postfix系统,花了不少精力,其间也经历不少麻烦,还好,最后都做成了!在配置过程中,参考了《postfix权威指南》和网上其他人写的文章,但在实际的配置中,完全按照这些文档

sery_023的专栏 1万+

神州数码防火墙(DCN)NAT SSL-VPN配置

SSL-VPN是基于应用层的VPN,采用SSL协议来实现远程接入的一种新型VPN技术,比L2TP更加灵活的VPN方案。是天然的安全远程接入方案。用户可以通过浏览器的HTTPSs登录VPN的网址。SSL-VPN的认证方式包括LDAP,radius,CA,USB Key等方式。 SSL VPN的主要应用场景是保证远程用户能够在企业外部安全\高效的访问企业内部的网络资源

qq_50966485的博客 4563

Linux实战:部署基于Postfix 与 Dovecot 的邮件系统

在电子邮件系统中,为用户收发邮件的服务器名为邮件用户代理(Mail User Agent,MUA),MTA (邮件传输代理)的工作职责是转发处理不同电子邮件服务供应商之间的邮件,把来自于 MUA 的邮件转发到合适的 MTA 服务器。一般的网络服务程序在传输信息时就像拨打电话,需要双方同时保持在线,而在电子邮件系统中,用户发送邮件后不必等待投递工作完成即可下线。

NVG_Haru的博客 2912

ABA分析方法 — 软硬件开发必备的一种分析问题绝佳套路

可能你从很多地方听过这个名词,无论是在软件开发还是硬件领域(比较典型的领域:汽车、消费电子、医疗等行业),ABA验证都是一种快速分析故障的一个方法,第一次听到这个词,当时是不是一脸懵逼,本文就深度带你了解下ABA的分析方法。简要概述就是:怀疑A模块导致系统故障,将B模块替换A模块,故障消失,再将A模块替换回来,故障复现,则说明A模块是导致系统故障的原因其实,ABA分析问题,可能很多人在工作中都或多或少用过这个方法,只是没有这个概念,说明白了就是控制变量和对比验证,没什么高大上的东西。

Eureka1024的博客 7415

基于扩散模型的图像去噪与修复:原理、实现与性能分析【附核心代码】

扩散模型(Diffusion Models)在图像修复、去噪、风格化、超分辨率等领域的应用,展示了其强大的生成能力和灵活性。通过模拟图像逐步加噪声再去噪的过程,扩散模型不仅能够恢复图像的细节,还能生成高质量的图像。本文详细探讨了扩散模型在图像修复和增强中的应用,并通过具体代码示例展示了如何使用扩散模型进行去噪、风格化、图像超分辨率等任务。扩散模型在图像修复中通过逐步去噪修复损坏的区域,在图像去噪中则能够去除图像中的噪声并保留细节;在图像风格化中,扩散模型通过结合目标风格和内容生成富有艺术性的图像;

一键难忘的博客 2946

PostFix+Dovecot 部署邮件系统

Postfix 是一种电子邮件服务器是一个开放源代码的软件. Postfix 是MTA邮件传输代理软件.是sendmail提供替代品的一个尝试,在Internet世界中,大部分的电子邮件都是通过sendmail来投递的,大约有100万用户使用sendmail,每天投递上亿封邮件,Postfix试图更快、更容易管理、更安全,同时还与sendmail保持足够的兼容性.Sendmail: 资格最古老,运行稳定,但安全性欠佳.

微软技术分享 2万+

绿盾用户使用看图软件每次都需要把图片解密之后才能打开查看,怎么才能不用这么麻烦打开就能看

Win10专业版绿盾控制台7.0看图软件FastStone Image Viewer。

本博客,博文仅代表个人操作经验,不能完全解决你的问题,仅供参考,佛系回复。 1204

使用Postfix与Dovecot部署邮件系统(Linux环境)

一、电子邮件系统一、电子邮件系统1.1 电子邮件协议1.2.1 介绍在电子邮件系统中,为用户收发邮件的服务器名为邮件用户代理(Mail User Agent,MUA)。用于保存用户邮件的“信箱”服务器为邮件投递代理(Mail Delivery Agent,MDA),其工作职责是把来自于邮件传输代理(Mail Transfer Agent,MTA)的邮件保存到本地的收件箱中。其中,这个MTA的工作职责是转发处理不同电子邮件服务供应商之间的邮件,把来自于MUA的邮件转发到合适的MTA服务器。

qq_74422309的博客 3498

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

[精华] 邮件系统postfix安装与配置(zt)

原贴:http://www.chinaunix.net/jh/14/97071.html[精华] 邮件系统postfix安装与配置(zt)http://www.chinaunix.net 作者:hoge 发表于:2008-11-20 14:11:02【发表评论】 【查看原文】 【Mail服务器讨论区】【关闭】 邮件系统postfix安装与配置(一) 邮件系统postfix安装与配置 一、 pos

最实用的Linux博客 4475

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: OpenBSD2.8服务器配置实务手册
下一篇: Postfix邮件系统的完全安装(二)
johnathan
博客等级 码龄22年 37粉丝 80原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值