Skip to content

run postfix with smtp authentication (sasldb) in a docker container

License

Notifications You must be signed in to change notification settings

ax2009live/postfix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

把文件下载生成镜像 docker build -t ax2009live/postfix:v1.0 .

用法请请参考 https://github.com/catatnight/docker-postfix

跟 catatnight/docker-postfix 对比,修改如下

/etc/postfix/main.cf 
增加 message_size_limit = 51200000      邮件大小 10M 限制修改为 50M;
增加 smtp_tls_security_level = may      postfix与外部邮件服务器连接时使用tls,
在 Postfix 上做 SMTP 中继,并隐藏原邮件服务器的信息
/etc/postfix/main.cf   增加 header_checks = regexp:/etc/postfix/header_checks
/etc/postfix/header_checks 添加 “ /^Received:/ IGNORE ” 
隐藏下图蓝色框内的信息

image

Enable TLS(587): save your SSL certificates .key and .crt to /path/to/certs

Login credential should be set to ([email protected], pwd) in Smtp Client

smtp 客户端用户 [email protected],密码:pwd

$ sudo docker run -d \
	--restart=always \
	--name postfix \
	-p 587:587 \
	-e maildomain=mail.example.com \
	-e smtp_user=user:pwd \
	-v /path/to/certs:/etc/postfix/certs \
	ax2009live/postfix:v1.0

About

run postfix with smtp authentication (sasldb) in a docker container

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published