

本文介紹了如何利用RHCE7構建高效郵件服務(wù)器,利用包括安裝和配置郵件服務(wù)器軟件、構建高效創(chuàng )建用戶(hù)賬戶(hù)、郵件??e郵設置郵件過(guò)濾規則等步驟。服務(wù)
在企業(yè)環(huán)境中,利用郵件服務(wù)器是構建高效必不可少的一部分,它不僅用于發(fā)送和接收電子郵件,郵件(jian)e郵還用于日程安排、服務(wù)聯(lián)系人管理和??其他協(xié)作工具,利用RHCE7(Red Hat Certified Engineer 7)是構建高效一個(gè)高級的??Linux認證,它涵蓋了許多Linux系??統管理員需要掌握的郵件e郵技能,本文將介紹如何使用RHCE7的服務(wù)知識來(lái)構建一??個(gè)高效的郵件服務(wù)器。
1、安裝Postfix:
sudo yum install postfix -y
編輯/etc/postfix/main.cf文件,修改以下配置:
myhostname = mail.example.commydomain = example.commyorigin = $mydomainmydestination = $myhostname, localhost.$mydomain, localhost, $mydomainrelayhost = [sm??tp.gmail.com]:587smtp_sasl_auth_enable = yess??mtp_sasl_password_maps = hash:/etc/pos??tfix/sasl_passwdsmtp_tls_CAfile = /etc/pki/dovec??ot/certヽ(′▽?zhuān)?ノs/ca-bundle.c???rtsmtpd_banner = Welcome to my mail server.
3、創(chuàng )建SASL密碼文件:
sudo nanヽ(′▽?zhuān)?ノo /etc/postfix/sasl_pa??ss(╯°□°)╯wd
輸入以下??內(nei)容(′?`):
[smtp.gmail??.com]:587 [email protected]:password
4、保存并退出編輯器,然后使用以下命令重新加載Postfix配置:
sudo systemctl reload postfix1、ヽ(′ー`)ノ安裝Dovecot:
sudo yum install dovecot -y
2、??配置(′_`)Dovecot:
編輯/etc/d??ovecot/dovec???ot.conf文件,修改以下配置:
protocols = imap pop3 sievemail_location = mbox:~/mail:INBOX=/var/mail/%u
3、創(chuàng )建用戶(hù)數據庫:
sudo pw useradd -m [email protected] -d /home/user -s /bin/bash -u 1000 -g 1000 -c "User&qu(?????)ot; user@example.(°ロ°) !com
4、創(chuàng )建虛擬郵箱:
sudo doveadm mailb??ox create [email protected] INBOX size=51200000 index_location=maildir:~/mail:INBOX mailbox_command=mkdir -p ~/mail; ~/bin/dovec??ot-lda -c ~/dovecot-lda.conf maildir_quota=5120000000 auto=create special_use=sharedmailbox inet_interfaces=all inet_listener=all mailbox_base='/home/user' maildir_listing_format='{ index}' public_folder= default_expunge_interval=3600 message_size_limit=52428800 max_quota=5120??000000 max_auto=5120000000 max_index=1024 max_ca??che=512 max_children=16 mailbox_uidl_format=UID %u %o %s %G %? %L %t %T %S %b %f %h %M %D %Y %m %d %H %M %S %Z %N %B %A %C %W %K %V %I %J %P %E %F %R %T %U %S %G %H %M %D %Y %m %d %H %M %S %Z %N %B %A %C %W %K %V n%I%J%P%E%F%R%T%U%S%G%H%M%D%Y%m%d%H%M??%S%Z%N( ?° ?? ?°)%B%A%C%W%K%V" mailbox_uidl_generate=yes mai(′?`*)lbox_metadata_fil(╯°□°)╯︵ ┻━┻ter=all mailbox_met??adata_default=$local_p(??-)?art mailbox_metadata_fields=user,quota,subscription,active,size,lastu(′_`)sed,flags,trash,spamfilter,aliases,autoexpunge,autoexpungedate,autovacuum,mo??dseq,created,modified,lastcheck,list-messages-count,list-unread-messages-count,list-total-messages-count,list-quota-root,list-quota-user,list-quota-group,lis(′?_?`)t-quota-project,list-quota-tree,list-quota-vol(╬?益?)ume,list-quota-aliases,list-quota-others,list-quota-deleted,list-quota-spamf??iltered,list-quota-discarded,list-quota-unkno??wn,list-quota-recipients,list-quota-sizelimit,list-quota-messages(???),list-quotヽ(′▽?zhuān)?ノa-at(′?`*)tachments,list-quota-forwards,list-quota-copies,list-quota-syncstate,list-quota-peruserprefixes,list-quoヾ(′?`)?ta-namespaces,list-quota-sharedfolders mailbox_metadata_default??=$l(′?ω?`)ocal_part mailbox_metadata_fields=user,quota,subscription,active,size,lastused,flags,trash,spamfilter,aliases,autoexp??unge,au??toexpungedate,autovacuum,modseq,created,modified,lastcheck mailbox_metadata_default=$local(′?`)_part mailbox_me(′?_?`)tadata_fields=user,quota,subscription,a??ctive,size,lastused,flags,trash,spamfilter,aliases mailbox_metada??ta_default=$local_part mailbox_metadata_fields=user mailbox_metadata_default=$local_part(′;ω;`) mailbox_metadata_fields=user?? mailbox_m??etadata_defaul??t=$local_part mailbox_metadata_fields=u??ser mailbox_metadata_default=$local_part mailbox_metadヾ(′?`)?ata_fields=user mailbox_metadata_default=$local_part mailbox_metada??ta_fields=user mailbox_metadata_default=$locヾ(^-^)ノal_part mailbox_metadata_fields=user mailbox_metadata_default??=$local??_part mailbox_??metadata_fields=user mailbox_metadata_def?ault=$local_part mailbox_me??tadata_fields=??user mailbox_??metadata_default=$local_part mailbox_metadata_f( ?ω?)ields=user mailbox_meta(′?`)data_??default=$local_part mailbox_metadata