这是mailcow自建邮局系列的第三篇教程,对自建邮局感兴趣的朋友可以参考我前两篇文章:
当你的服务器不支持IPV6地址时可以禁用mailcow的IPV6监听,从而降低资源消耗(mailcow有启动一个IPV6 NAT的容器)和避免出现奇怪的问题,这篇文章将继续分享如何禁用mailcow的IPV6
禁用mailcow IPV6
修改docker-compose.yml
,将:
enable_ipv6: true
修改为:
enable_ipv6: false
同时还需要禁用ipv6nat-mailcow 容器,在mailcow的目录下新建一个docker-compose.override.yml
,并复制下面的内容保存:
version: '2.1'
services:
ipv6nat-mailcow:
image: bash:latest
restart: "no"
entrypoint: ["echo", "ipv6nat disabled in compose.override.yml"]
然后重启容器:
docker-compose down
docker-compose up -d
在 unbound-mailcow 中禁用 IPv6,只需要修改data/conf/unbound/unbound.conf
这个配置文件:
#将
do-ip6: yes
#修改为
do-ip6: no
然后重启对应容器:
docker-compose restart unbound-mailcow
接下来禁用postfix的IPV6,需要修改data/conf/postfix/extra.cf
这个配置文件,改成下面的内容:
smtp_address_preference = ipv4
inet_protocols = ipv4
然后重启容器:
docker-compose restart postfix-mailcow
最后还需要修改nginx的监听,用下面的sed命令替换就行了:
sed -i '/::/d' data/conf/nginx/listen_*
sed -i '/::/d' data/conf/nginx/templates/listen*
sed -i 's/,\[::\]//g' data/conf/dovecot/dovecot.conf
sed -i 's/\[::\]://g' data/conf/nginx/dynmaps.conf
sed -i 's/\[::\]://g' data/conf/phpfpm/php-fpm.d/pools.conf
其它说明
- 如果您的服务器支持IPV6,则无需禁用IPV6地址
- 修改文件前请注意备份配置文件
I enjoyed the humor in this piece! For more, visit: FIND OUT MORE. Let’s chat about it!
Hello there, just became aware of your blog through Google, and found that it is
truly informative. I am gonna watch out for brussels.
I will be grateful if you continue this in future.
Numerous people will be benefited from your writing. Cheers!
Lista escape room
I like this weblog it’s a master piece! Glad I noticed this on google.?
Very interesting subject, thank you for posting.Raise your business
I was very happy to uncover this website. I need to to thank you for ones time due to this wonderful read!! I definitely loved every part of it and I have you saved to fav to see new things in your site.
This site was… how do I say it? Relevant!! Finally I’ve found something that helped me. Kudos!
Everything is very open with a clear explanation of the challenges. It was definitely informative. Your site is extremely helpful. Many thanks for sharing!
Hello there, I do believe your blog could be having browser compatibility issues. Whenever I take a look at your site in Safari, it looks fine but when opening in I.E., it has some overlapping issues. I just wanted to provide you with a quick heads up! Other than that, fantastic website.
Hello there! I simply wish to give you a huge thumbs up for your great info you have got right here on this post. I’ll be returning to your site for more soon.
I could not refrain from commenting. Perfectly written.
Hello there! This blog post could not be written any better! Looking at this post reminds me of my previous roommate! He continually kept talking about this. I most certainly will send this post to him. Fairly certain he’ll have a very good read. Many thanks for sharing!
Hi! I could have sworn I’ve visited this web site before but after going through a few of the posts I realized it’s new to me. Anyhow, I’m definitely happy I stumbled upon it and I’ll be book-marking it and checking back regularly!
Right here is the right website for anyone who wishes to find out about this topic. You know a whole lot its almost tough to argue with you (not that I really will need to…HaHa). You definitely put a new spin on a subject that’s been written about for years. Great stuff, just great.
May I just say what a relief to discover somebody that genuinely knows what they are talking about over the internet. You actually realize how to bring an issue to light and make it important. A lot more people should read this and understand this side of your story. I can’t believe you’re not more popular since you certainly have the gift.
I’m extremely pleased to uncover this great site. I need to to thank you for ones time for this fantastic read!! I definitely really liked every bit of it and i also have you saved as a favorite to see new things in your blog.
Hi there! I just would like to give you a huge thumbs up for your excellent info you have got here on this post. I will be returning to your web site for more soon.
I really like it whenever people come together and share thoughts. Great website, keep it up.
Great site you have got here.. It’s hard to find quality writing like yours these days. I honestly appreciate individuals like you! Take care!!
It’s nearly impossible to find well-informed people about this subject, but you seem like you know what you’re talking about! Thanks
This is a really good tip particularly to those new to the blogosphere. Brief but very precise info… Many thanks for sharing this one. A must read post.
Way cool! Some very valid points! I appreciate you penning this post plus the rest of the website is also really good.
Excellent article. I will be going through many of these issues as well..
Aw, this was an incredibly nice post. Taking the time and actual effort to produce a superb article… but what can I say… I put things off a whole lot and never manage to get anything done.