当前位置:网站首页>Simple configuration of postfix server
Simple configuration of postfix server
2022-07-03 17:04:00 【Brother Xing plays with the clouds】
Simple configuration PostFix The server
Installation package :
[[email protected] named]# yum install postfix telnet
[[email protected] named]# yum install bind bind-chroot
To configure DNS The server
[[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
add to
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 ]
modify postfix Configuration file for
[[email protected] named]# vi /etc/postfix/main.cf
Modify the following parameters
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
Send E-mail
[[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:[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.
Receiving mail
[[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!!!
边栏推荐
- 关于学习Qt编程的好书精品推荐
- [2. Basics of Delphi grammar] 2 Object Pascal data type
- Deep understanding of grouping sets statements in SQL
- Analysis of variance summary
- [combinatorics] non descending path problem (number of non descending paths with constraints)
- 27. 输入3个整数,按从大到小的次序输出。要求用指针方法实现。
- What kind of material is 14Cr1MoR? Analysis of chemical composition and mechanical properties of 14Cr1MoR
- 大变局!全国房价,跌破万元大关
- C语言字符串反转
- RF analyze demo build step by step
猜你喜欢

Web crawler knowledge day03

MySQL single table field duplicate data takes the latest SQL statement
The way of wisdom (unity of knowledge and action)

Thread pool executes scheduled tasks

免费数据 | 新库上线 | CnOpenData中国保险中介机构网点全集数据

The largest matrix (H) in a brush 143 monotone stack 84 histogram

Leetcode: lucky number in matrix

大消费企业怎样做数字化转型?

Arduino esp32: overall framework of lvgl project (I)

Prepare for the golden three silver four, 100+ software test interview questions (function / interface / Automation) interview questions. win victory the moment one raises one 's standard
随机推荐
[try to hack] active detection and concealment technology
Kotlin learning quick start (7) -- wonderful use of expansion
13mnnimo5-4 German standard steel plate 13MnNiMo54 boiler steel 13MnNiMo54 chemical properties
CC2530 common registers for timer 1
[combinatorics] polynomial theorem (polynomial coefficients | full arrangement of multiple sets | number of schemes corresponding to the ball sub model | polynomial coefficient correlation identity)
One brush 147-force deduction hot question-4 find the median of two positive arrays (H)
Network security web penetration technology
27. 输入3个整数,按从大到小的次序输出。要求用指针方法实现。
[combinatorics] recursive equation (the relationship theorem between the solution of the recursive equation and the characteristic root | the linear property theorem of the solution of the recursive e
What material is sa537cl1? Sa537cl1 corresponds to the national standard material
简单配置PostFix服务器
大变局!全国房价,跌破万元大关
Take you to API development by hand
Why is WPA3 security of enterprise business so important?
function overloading
What material is sa537cl2 equivalent to in China? Sa537cl2 corresponding material
LeetCode 1658. Minimum operand to reduce x to 0
【剑指 Offer】58 - I. 翻转单词顺序
Shentong express expects an annual loss of nearly 1billion
[combinatorics] recursive equation (definition of general solution | structure theorem of general solution of recursive equation without multiple roots)