#添加源
sudo add-apt-repository ppa:nm-l2tp/network-manager-l2tp
#update
sudo apt update
#安装network-manager-l2tp
sudo apt install network-manager-l2tp
#安装UI
sudo apt install network-manager-l2tp-gnome
apt-get install postfix
vi /etc/postfix/main.cf
sudo apt-get install dovecot-common dovecot-imapd dovecot-pop3d
vi /etc/dovecot/dovecot.conf
这里配置邮件的存放目录,这里和Postfix设置的要一致,都是在用户主目录下的Maildir目录下。
mail_location = maildir:~/Maildir
监听所有的端口
listen= *
允许明文密码验证
disable_plaintext_auth = no
使用ssl加密
ssl = required
ssl秘钥存放路径,目前这两个文件也是不存在的,也需要按照后面的步骤我们手动生成
ssl_cert =< /etc/ssl/certs/ssl-cert-snakeoil.pem
ssl_key =< /etc/ssl/private/ssl-cert-snakeoil.key
设置认证的默认选项,auth是一个socket文件,通过该文件dovecot和postfix进行通信,来传递postfix的认证信息,这里面的path要和postfix设置的一致。
auth default {
socket listen {
client {
path =/var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
service postfix restart
service dovecot restart
用户管理
useradd nonnichen
passwd nonnichen
指定命令解释程序
usermod -s /bin/bash nonnichen
指定目录
usermod -d /home/nonnichen nonnichen
验证
cat /etc/passwd
切换用户验证
su nonnichen
添加管理员
vi sudo
vi /etc/sudoers
nonnichen ALL=(ALL:ALL) ALL
在服务中开启Microsoft Exchange POP3和Microsoft Exchange IMAP4。
在EMS中设置POP3和IMAP4传入属性:
Set-PopSettings -ExternalConnectionSettings {mail.nonni.cn:995:SSL}
Set-ImapSettings -ExternalConnectionSettings {mail.nonni.cn:993:SSL}
验证:
Get-PopSettings | fl
Get-ImapSettings | fl
在EMS中设置SMYP传出属性
Get-ReceiveConnector “Client Frontend” | Set-ReceiveConnector -Fqdn mail.nonni.cn -AdvertiseClientSettings $true
验证:
Get-ReceiveConnector | fl
在OWA中登录开启pop3和IMAP。</pre>
$ lsb_release -a
$ sudo apt-get update && sudo apt-get dist-upgrade
$ sudo reboot
$ sudo apt-get install update-manager-core
$ sudo do-release-upgrade
$ lsb_release -a
Note: if not lts version, need to change file /etc/update-manager/release-upgrades, set Prompt=lts
$ sudo vi /etc/update-manager/release-upgrades
$ sudo do-release-upgrade
$ lsb_release -a