Simple postfix relay host ("postfix null client") for your Docker containers. Based on Debian (default), Ubuntu and Alpine Linux. Feel free to pick your favourite distro.
RELAYHOST, RELAYHOST_USERNAME and RELAYHOST_PASSWORDPOSTFIX_smtp_tls_security_levelXOAUTH2_CLIENT_ID, XOAUTH2_SECRET, XOAUTH2_INITIAL_ACCESS_TOKEN, XOAUTH2_INITIAL_REFRESH_TOKEN and XOAUTH2_TOKEN_ENDPOINT
MASQUERADED_DOMAINSSMTP_HEADER_CHECKSPOSTFIX_myhostnamePOSTFIX_mynetworksPOSTFIX_message_size_limitSKIP_ROOT_SPOOL_CHOWNANONYMIZE_EMAILS
This image allows you to run POSTFIX internally inside your docker cloud/swarm installation to centralise outgoing email sending. The embedded postfix enables you to either send messages directly or relay them to your company's main server.
This is a server side POSTFIX image, geared towards emails that need to be sent from your applications. That's why this postfix configuration does not support username / password login or similar client-side security features.
IF YOU WANT TO SET UP AND MANAGE A POSTFIX INSTALLATION FOR END USERS, THIS IMAGE IS NOT FOR YOU. If you need it to manage your application's outgoing queue, read on.
To run the container, do the following:
docker run --rm --name postfix -e "ALLOWED_SENDER_DOMAINS=example.com" -p 1587:587 boky/postfix
or
helm repo add bokysan https://bokysan.github.io/docker-postfix/ helm upgrade --install --set persistence.enabled=false --set config.general.ALLOW_EMPTY_SENDER_DOMAINS=yes mail bokysan/mail
You can also find this image at ArtifactHub.
You can now send emails by using localhost:1587 (on Docker) as your SMTP server address. Note that if you haven't configured your domain
to allow sending from this IP/server/nameblock, your emails will most likely be regarded as spam.
All standard caveats of configuring the SMTP server apply:
If you don't know what any of the above means, get some help. Google is your friend. It's also worth noting that it's pretty difficult to host a SMTP server on a dynamic IP address.
Please note that the image uses the submission (587) port by default. Port 25 is not exposed on purpose, as it's regularly blocked by ISPs, already occupied by other services, and in general should only be used for server-to-server communication.
Several potentially "surprising" changes went into this issue and hence warrant a version upgrade:
v and without v prefix.
As seen in PR #141 some tools rely on version not
having the prefix. I've seen both in the wild, so the image
now includes both. This should work and should hopefully provide most compatibility.master branch now builds images called edge.
latest images are built from the last tag. We've had several issues with people using the latest tag
and reporting problems. You can now rely on latest being the latest stable release.linux/386, linux/amd64, linux/arm/v5, linux/arm/v6, linux/arm/v7, linux/arm64, linux/arm64/v8, linux/mips64le,
linux/ppc64le and linux/s390x.smtpd_tls_security_level is now set to may. If you encounter
issues, try setting it to none explicitly (see #160).There's a potentially breaking change introduced now in v3.0.0: Oracle has changed the license of BerkleyDB to AGPL-3.0, making it
unsuitable to link to packages with GPL-incompatible licenses. As a result Alpine (on which this image is based)
has deprecated BerkleyDB throughout the image:
Support for Postfix
hashandbtreedatabases has been removed.lmdbis the recommended replacement. Before upgrading, all tables in/etc/postfix/main.cfusinghashandbtreemust be changed to a supported alternative. See the Postfix lookup table documentation for more information.
While this should not affect most of the users (/etc/postfix/main.cf is managed by this image), there might be use cases where
people have their own configuration which relies on hash and btree databases. To avoid braking live systems, the version of this
image has been updated to v3.0.0.
Available for all your favourite architectures. Run in your server cluster. Run it on your Raspberry Pi 4. Run it on your ancient Pentium or an old Beaglebone. The following architectures are supported: linux/386, linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64 and linux/ppc64le.
TZ = The timezone for the image, e.g. Europe/AmsterdamFORCE_COLOR = Set to 1 to force color output (otherwise auto-detected)INBOUND_DEBUGGING = Set to 1 to enable detailed debugging in the logsALLOWED_SENDER_DOMAINS = domains which are allowed to send email via this serverALLOW_EMPTY_SENDER_DOMAINS = if value is set (i.e: true), ALLOWED_SENDER_DOMAINS can be unsetLOG_FORMAT = Set your log format (JSON or plain)Enable additional debugging for any connection coming from POSTFIX_mynetworks. Set to a non-empty string (usually 1
or yes) to enable debugging.
ALLOWED_SENDER_DOMAINS and ALLOW_EMPTY_SENDER_DOMAINSDue to in-built spam protection in Postfix you will need to specify sender domains -- the domains you are using to send your emails from, otherwise Postfix will refuse to start.
Example:
docker run --rm --name postfix -e "ALLOWED_SENDER_DOMAINS=example.com example.org" -p 1587:587 boky/postfix
If you want to set the restrictions on the recipient and not on the sender (anyone can send mails but just to a single domain
for instance), set ALLOW_EMPTY_SENDER_DOMAINS to a non-empty value (e.g. true) and ALLOWED_SENDER_DOMAINS to an empty
string. Then extend this image through custom scripts to configure Postfix further.
The image will by default output logs in human-readable (plain) format. If you are deploying the image to Kubernetes, it might
be worth changing the output format to json as it's more easily parsable by tools such as Prometheus.
To change the log format, set the (unsurprisingly named) variable LOG_FORMAT=json.
RELAYHOST = Host that relays your messagesSASL_RELAYHOST = (optional) Relay Host referenced in the sasl_passwd file. Defaults to the value of RELAYHOSTRELAYHOST_USERNAME = An (optional) username for the relay serverRELAYHOST_PASSWORD = An (optional) login password for the relay serverRELAYHOST_PASSWORD_FILE = An (optional) file containing the login password for the relay server. Mutually exclusive with the previous option.POSTFIX_smtp_tls_security_level = Relay host TLS connection levelXOAUTH2_CLIENT_ID = OAuth2 client id used when configured as a relayhost.XOAUTH2_SECRET = OAuth2 secret used when configured as a relayhost.XOAUTH2_INITIAL_ACCESS_TOKEN = Initial OAuth2 access token.XOAUTH2_INITIAL_REFRESH_TOKEN = Initial OAuth2 refresh token.XOAUTH2_TOKEN_ENDPOINT = Token endpoint provided four your XOAUTH App , GMail use : https://accounts.google.com/o/oauth2/tokenSMTPD_SASL_USERS = Users allow to send mail (ex: user1:pass1,user2:pass2,...). Warning: Users need to be specified with a domain, as explained
on ticket [#192]. This image will automatically add a domain if one is not provided and will
issue a notice when that happens.MASQUERADED_DOMAINS = domains where you want to masquerade internal hostsSMTP_HEADER_CHECKS= Set to 1 to enable header checks of to a location of the file for header checksPOSTFIX_myhostname = Set the name of this postfix serverPOSTFIX_mynetworks = Allow sending mails only from specific networks ( default 127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 )POSTFIX_message_size_limit = The maximum size of the message, in bytes, by default it's unlimitedPOSTFIX_<any_postfix_setting> = provide any additional postfix settingRELAYHOST, RELAYHOST_USERNAME and RELAYHOST_PASSWORDPostfix will try to deliver emails directly to the target server. If you are behind a firewall, or inside a corporation you will most likely have a dedicated outgoing mail server. By setting this option, you will instruct postfix to relay (hence the name) all incoming emails to the target server for actual delivery.
Example:
docker run --rm --name postfix -e RELAYHOST=192.168.115.215 -p 1587:587 boky/postfix
You may optionally specifiy a relay port, e.g.:
docker run --rm --name postfix -e RELAYHOST=192.168.115.215:587 -p 1587:587 boky/postfix
Or an IPv6 address, e.g.:
docker run --rm --name postfix -e


AI一键生成PPT,就用博思AIPPT!
博思AIPPT,新一代的AI生成PPT平台,支持智能生成PPT、AI美化PPT、文本&链接生成PPT、导入Word/PDF/Markdown文档生成PPT等,内置海量精美PPT模板,涵盖商务、教育、科技等不同风格,同时针对每个页面提供多种版式,一键自适应切换,完美适配各种办公场景。


AI赋能电商视觉革命,一站式智能商拍平台
潮际好麦深耕服装行业,是国内AI试衣效果最好的软件。使用先进AIGC能力为电商卖家批量提供优质的、低成本的商拍图。合作品牌有Shein、Lazada、安踏、百丽等65个国内外头部品牌,以及国内10万+淘宝、天猫、京东等主流平台的品牌商家,为卖家节省将近85%的出图成本,提升约3倍出图效率,让品牌能够快速上架。


企业专属的AI法律顾问
iTerms是法大大集团旗下法律子品牌,基于最先进的大语言模型(LLM)、专业的法律知识库和强大的智能体架构,帮助企业扫清合规障碍,筑牢风控防线,成为您企业专属的AI法律顾问。


稳定高效的流量提升解决方案,助力品牌曝光
稳 定高效的流量提升解决方案,助力品牌曝光


最新版Sora2模型免费使用,一键生成无水印视频
最新版Sora2模型免费使用,一键生成无水印视频


实时语音翻译/同声传译工具
Transly是一个多场景的AI大语言模型驱动的同声传译、专业翻译助手,它拥有超精准的音频识别翻译能力,几乎零延迟的使用体验和支持多国语言可以让你带它走遍全球,无论你是留学生、商务人士、韩剧美剧爱好者,还是出国游玩、多国会议、跨国追星等等,都可以满足你所有需要同传的场景需求,线上线下通用,扫除语言障碍,让全世界的语言交流不再有国界。


选题、配图、成文,一站式创作,让内容运营更高效
讯飞绘文,一个AI集成平台,支持写作、选题、配图、排版和发布。高效生成适用于各类媒体的定制内容,加速品牌传播,提升内容营销效果。


AI辅助编程,代码自动修复
Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。


最强AI数据分析助手
小浣熊家族Raccoon,您的AI智能助手,致力于通过先进的人工智能技术,为用户提供高效、便捷的智能服务。无论是日常咨询还是专业问题解答,小浣熊都能以快速、准确的响应满足您的需求,让您的生活更加智能便捷。


像人一样思考的AI智能体
imini 是一款超级AI智能体,能根据人类指令,自主思考、自主完成、并且交付结果的AI智能体。
最新AI工具、AI资讯
独家AI资源、AI项目落地

微信扫一扫关注公众号