当前位置:网站首页>简单配置PostFix服务器
简单配置PostFix服务器
2022-07-03 16:58:00 【星哥玩云】
安装包:
[[email protected] named]# yum install postfix telnet
[[email protected] named]# yum install bind bind-chroot
配置DNS服务器
[[email protected] named]# vi /etc/named.conf
options {
listen-on port 53 { any; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { any; };
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
include "/etc/named.rfc1912.zones";
[[email protected] named]# vi /etc/named.rfc1912.zones
添加
zone "testmail.com" IN {
type master;
file "named.testmail.com";
allow-update { none; };
};
[[email protected] named]# cp /var/named/named.localhost /var/named/chroot/var/named/named.testmail.com
[[email protected] named]# cat /var/named/chroot/var/named/named.testmail.com
$TTL 1D
@ IN SOA @ root (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 127.0.0.1
AAAA ::1
mail.testmail.com. IN A 192.168.1.11
testmail.com. MX 10 mail.testmail.com.
[[email protected] named]# service named restart
Stopping named: . [ OK ]
Starting named: [ OK ]
修改postfix的配置文件
[[email protected] named]# vi /etc/postfix/main.cf
修改以下参数
myhostname = mail.testmail.com
mydomain = testmail.com
myorigin = $mydomain
inet_interfaces = all
inet_protocols = all
mydestination = myhostname, localhost.mydomain, localhost,
mynetworks = 192.168.1.0/24, 127.0.0.0/8
relay_domains = $mydestination
[[email protected] ~]# service postfix restart
Shutting down postfix: [ OK ]
Starting postfix: [ OK ]
[[email protected] ~]# useradd test001
[[email protected] ~]# useradd test002
发送邮件
[[email protected] named]# telnet 192.168.1.11 25
Trying 192.168.1.11...
Connected to 192.168.1.11.
Escape character is '^]'.
220 mail.testmail.com ESMTP Postfix
mail from:t[email protected]
250 2.1.0 Ok
rcpt to:[email protected]
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
hello test002!!!
.
250 2.0.0 Ok: queued as 12623A0059
quit
221 2.0.0 Bye
Connection closed by foreign host.
接收邮件
[[email protected] named]# su - test002
[[email protected] ~]$ mail
Heirloom Mail version 12.4 7/29/08. Type ? for help.
"/var/spool/mail/test002": 2 messages 1 new
1 [email protected] Mon Oct 13 02:53 15/517
>N 2 [email protected] Mon Oct 13 05:37 14/507
& r
undisclosed-recipients:; contains invalid character ':'
To: [email protected]@testmail.com wrote:
> hello test002!!!
边栏推荐
- [2. Basics of Delphi grammar] 1 Identifiers and reserved words
- function overloading
- 人生还在迷茫?也许这些订阅号里有你需要的答案!
- Idea configuration plug-in
- Network security web penetration technology
- C language string practice
- What material is sa537cl2 equivalent to in China? Sa537cl2 corresponding material
- 汇编实例解析--实模式下屏幕显示
- 27. 输入3个整数,按从大到小的次序输出。要求用指针方法实现。
- Interpretation of several important concepts of satellite antenna
猜你喜欢

Redis:关于列表List类型数据的操作命令

Why is WPA3 security of enterprise business so important?
![29: Chapter 3: develop Passport Service: 12: develop [obtain user account information, interface]; (use VO class to package the found data to meet the requirements of the interface for the returned da](/img/1c/c655c8232de1c56203873dcf171f45.png)
29: Chapter 3: develop Passport Service: 12: develop [obtain user account information, interface]; (use VO class to package the found data to meet the requirements of the interface for the returned da

Simulink oscilloscope data is imported into Matlab and drawn

Thread pool: the most common and error prone component of business code

What material is sa537cl2? Analysis of mechanical properties of American standard container plate

关于学习Qt编程的好书精品推荐

What material is sa537cl1? Sa537cl1 corresponds to the national standard material

(Supplement) double pointer topic

What material is sa537cl2 equivalent to in China? Sa537cl2 corresponding material
随机推荐
Bcvp developer community 2022 exclusive peripheral first bullet
What is your income level in the country?
Mysql database -dql
【剑指 Offer】58 - II. 左旋转字符串
大变局!全国房价,跌破万元大关
What is the material of sa302grc? American standard container plate sa302grc chemical composition
定义一个结构体Fraction,表示分数,用于表示 2/3, 5/6这样的分数
Kindeditor editor upload image ultra wide automatic compression -php code
Execute script unrecognized \r
Recommendation of good books on learning QT programming
What material is 12cr1movr? Chemical property analysis of pressure vessel steel plate 12cr1movr
Redis:关于列表List类型数据的操作命令
人生还在迷茫?也许这些订阅号里有你需要的答案!
How to allow remote connection to MySQL server on Linux system?
【Try to Hack】主动侦查隐藏技术
[combinatorics] polynomial theorem (polynomial theorem | polynomial theorem proof | polynomial theorem inference 1 item number is the number of non negative integer solutions | polynomial theorem infe
CC2530 common registers for watchdog
Daily code 300 lines learning notes day 10
Résolution de l'instance d'assemblage - - affichage à l'écran en mode réel
RF Analyze Demo搭建 Step by Step