In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to install postfix in Linux, which is very detailed and has certain reference value. Friends who are interested must finish it!
Install postfix
Postfix is a fast, easy to manage, high security mail sending service, which can cooperate with dovecot to achieve a perfect mailbox server.
1. Install postfix
[root@localhost ~] # rpm-qa | grep postfix
[root@localhost] # yum install-y postfix
Loaded plugins: fastestmirror, refresh-packagekit, security
Complete!
[root@localhost] #
2. Configure postfix and edit the configuration file "/ etc/postfix/main.cf"
[root@localhost ~] # gedit / etc/postfix/main.cf
Mydomain = domain name in david.cn / / dns
Myhostname = domain name in mailsrv.david.cn / / dns
Mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
Inet_interfaces = all / / allow all network information to be processed
Inet_protocols = all / / allow ipv4 and ipv6
Mynetworks = 192.168.0.0amp 24, 127.0.0.0amp 8 / / allowed access to the ip segment
3. Set up firewall. Postfix uses port 25.
[root@localhost ~] # gedit / etc/sysconfig/iptables
-An INPUT-m state-- state NEW-m tcp-p tcp-- dport 25-j ACCEPT
[root@localhost ~] # service iptables restart
Iptables: set chain to policy ACCEPT:filter nat [OK]
Iptables: clear firewall rules: [OK]
Iptables: uninstalling module: [OK]
Iptables: apply firewall rules: [OK]
Iptables: load additional modules: nf_conntrack_ftp [OK]
4. Start the service
[root@localhost ~] # service postfix start
Start postfix: [OK]
[root@localhost ~] #
5. Connection test
[root@localhost ~] # telnet 192.168.0.113 25 / / ip is the local address and 25 is the port number
Trying 192.168.0.113...
Connected to 192.168.0.113.
Escape character is'^]'.
220 mailsrv.david.cn ESMTP Postfix
6. Send letters
[root@localhost ~] # mail david / / send a message to david to ensure that this user exists in the Linux system. The sender is the currently logged in user root.
Subject: test04 / / title
Hello david / / content
. / / end
EOT
[root@localhost ~] # mail-u david / / View the mail of user david
Heirloom Mail version 12.4 7-29-08. Type? For help.
"/ var/mail/david": 5 messages 1 new
1 root Thu Aug 16 17:07 21 amp 692 "test"
2 root Thu Aug 16 17:08 20 root Thu Aug 631 "test"
3 root Thu Aug 16 17:10 20 amp 602 "test"
4 root Fri Aug 17 08:15 20 amp 570 "test3"
> N 5 root Fri Aug 17 09:46 18amp 539 "test04" / / this letter was just received and sent by root users
&
The above is all the contents of the article "how to install postfix in Linux". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.