在 ubuntu 上运行 postfix,每天发送大量邮件(约 100 万条消息)。负载非常高,但在 CPU 和内存负载方面并不多。任何处于类似情况并知道如何消除瓶颈的人?
此服务器上的所有邮件都是出站的。
我不得不假设瓶颈是磁盘。
只是一个更新,这里是 iostat 的样子:
avg-cpu: %user %nice %system %iowait %steal %idle
0.00 0.00 0.12 99.88 0.00 0.00
Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm %util
sda 0.00 12.38 0.00 2.48 0.00 118.81 48.00 0.00 0.00 0.00 0.00
sdb 1.49 22.28 72.28 42.57 629.70 1041.58 14.55 135.56 834.31 8.71 100.00
Run Code Online (Sandbox Code Playgroud)
这些数字是否符合您对单个磁盘的预期性能?
sdb 专用于 postfix。
我认为这是队列改组,从传入->活动->延迟
问题的更多详细信息:
服务器:四核 Xeon(R) CPU E5405 @ 2.00GH with 4 GB ram
平均负载:464.88、489.11、483.91、4 核。但内存利用率和 …
我需要 Postfix 以一定的速率发送外发消息(来自本地 PHP)。比如说,120 秒内发送一条消息。任何超过此速率的消息都应排队(延迟)并稍后传送。
Policyd不是我要找的。我不需要限制发送的消息总数。我需要在发送的任何两条消息之间暂停(120 秒)。
试过这个配置,但它不起作用:
initial_destination_concurrency = 1
default_destination_concurrency_limit = 1
default_destination_rate_delay = 120
default_destination_recipient_limit = 1
default_process_limit = 1
Run Code Online (Sandbox Code Playgroud)
有什么建议?
如何强制 postfix 检查(并记录/标记/等)所有外发邮件是否存在垃圾邮件?
只是想确保我在我的服务器上尽自己的一份力量。
编辑:根据要求进行后缀配置。
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory …Run Code Online (Sandbox Code Playgroud) 我正在努力研究如何让 postfix 接受我的主站点的任何子域的电子邮件。我没有虚拟域,只有一长串用于本地交付的子域。具体来说,我正在python@*.mydomain.com使用别名文件输入 Python:
python: |/www/proc_email.py
Run Code Online (Sandbox Code Playgroud)
Python 可以从那里处理交付。我设想这看起来像:
mydestination = encendio, localhost.localdomain, localhost, *.mydomain.com
Run Code Online (Sandbox Code Playgroud)
我正在 Ubuntu 上运行最新版本的 postfix(不确定如何检查版本)。
提前致谢。
在 postfix 安装和配置过程中,我看到了一些关于如何发送和接收电子邮件的选项。我可能选择了错误的选项。如何返回该配置屏幕以更改我的选项?
我有两种形式的相同域名,一种是另一种常见的拼写错误,比如 tedswidgets.com 和 tedswigets.com。
我想将 <someone>@tedswigets.com 的所有邮件重定向到同一个 <someone>@tedswidgets.com。
有很多关于如何从域中捕获所有邮件并将其重定向到单个地址的信息,但我不想这样做 - 我想从域中捕获所有邮件并重定向它,保留用户名部分,并且将其重新映射到另一个域上的等效地址。
抱歉,我应该提到我使用虚拟别名域,并在此服务器上为许多其他域提供电子邮件服务。这两个域是许多需要相互镜像的域中仅有的两个。
我们有一个 Postfix SMTP 服务器,它绑定到两个 IP 地址并为两个不同的域提供邮件服务。我们不能将域更改为使用相同的单一 IP。两个 IP 地址都有反向 DNS
在我们的 Postfix 配置中,我有
myhostname = mail.domain1.com
myhostname = mail.domain2.com
inet_interfaces = 1.1.1.1, 2.2.2.2
smtpd_banner = $myhostname Mail Server
Run Code Online (Sandbox Code Playgroud)
(还有其他一些我认为无关紧要的东西)
使用MXToolbox,在 mail.domain2.com 上运行 smtp 测试命令返回一切正常,但是在 mail.domain1.com 上运行它返回错误,因为 Postfix 在 SMTP 横幅中将自己标识为“mail.domain2.com”,如何我如何让它根据使用的外部 IP 地址返回正确的横幅?
回到六月,我给自己发送了 EICAR 测试签名,以确保我的 postfix/amavis/spamassassin 等设置正常工作。我当时没有注意到,但这不知何故在时空连续体中造成了撕裂,或者邮件服务器每 5 分钟一次又一次地将其发送给自己。
Oct 7 20:25:39 yavin postfix/smtpd[5598]: connect from localhost[127.0.0.1]
Oct 7 20:25:39 yavin postfix/smtpd[5598]: 886FA1A14B0: client=localhost[127.0.0.1]
Oct 7 20:25:39 yavin postfix/cleanup[5600]: 886FA1A14B0: message-id=<20111007072539.886FA1A14B0@yavin.mydomain.com>
Oct 7 20:25:39 yavin postfix/smtpd[5598]: disconnect from localhost[127.0.0.1]
Oct 7 20:25:39 yavin postfix/qmgr[2911]: 886FA1A14B0: from=<>, size=1610, nrcpt=1 (queue active)
Oct 7 20:25:39 yavin postfix/smtpd[5598]: connect from localhost[127.0.0.1]
Oct 7 20:25:39 yavin postfix/smtpd[5598]: A9C0E1A14B1: client=localhost[127.0.0.1]
Oct 7 20:25:39 yavin postfix/cleanup[5600]: A9C0E1A14B1: message-id=<VAAyuN8taIpfBV@yavin.mydomain.com>
Oct 7 20:25:39 yavin postfix/smtp[5601]: 886FA1A14B0: to=<virii@mydomain.com>, relay=192.168.178.251[192.168.178.251]:25, delay=0.23, delays=0.1/0.04/0.03/0.06, …Run Code Online (Sandbox Code Playgroud) 我尝试使用 smtp 身份验证设置 postfix。我想使用 /etc/shadow 作为我的领域
不幸的是,当我尝试进行身份验证时出现“一般错误”
# nc localhost 25
220 mail.foo ESMTP Postfix
AUTH PLAIN _base_64_encoded_user_name_and_password_
535 5.7.8 Error: authentication failed: generic failure
Run Code Online (Sandbox Code Playgroud)
在mail.warn日志文件中,我得到以下条目
Oct 8 10:43:40 mail postfix/smtpd[1060]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Oct 8 10:43:40 mail postfix/smtpd[1060]: warning: SASL authentication failure: Password verification failed
Oct 8 10:43:40 mail postfix/smtpd[1060]: warning: _ip_: SASL PLAIN authentication failed: generic failure
Run Code Online (Sandbox Code Playgroud)
但是 sasl 设置似乎没问题
$ testsaslauthd -u _user_ -p …Run Code Online (Sandbox Code Playgroud) 当我从我的邮件服务器向我的 @bellsouth.net 电子邮件发送测试消息时,postfix 日志显示它已发送正常,但该消息从未到达我的 bellsouth 收件箱。如果 At&T 阻止消息,我不应该收到失败通知或退回邮件吗?
我正在尝试解决为什么有些客户收不到电子邮件的问题,但如果 mail.log 中没有任何内容表明邮件被拒绝,我怎么知道哪些邮件已成功发送?
日志显示:
Feb 27 09:02:36 MyHOSTNAME postfix/pickup[26175]: D53A72713E5: uid=0 from=<root>
Feb 27 09:02:36 MyHOSTNAME postfix/cleanup[26487]: D53A72713E5: message-id=<20120227140236.D53A72713E5@example.com>
Feb 27 09:02:36 MyHOSTNAME postfix/qmgr[5595]: D53A72713E5: from=<root@example.com>, size=878, nrcpt=1 (queue active)
Feb 27 09:02:37 MyHOSTNAME postfix/smtp[26490]: D53A72713E5: to=<myemail@bellsouth.net>, relay=gateway-f1.isp.att.net[204.127.217.16]:25, delay=0.57, delays=0.11/0.03/0.23/0.19, dsn=2.0.0, status=sent (250 ok ; id=20120227140036M0700qer4ne)
Feb 27 09:02:37 MyHOSTNAME postfix/qmgr[5595]: D53A72713E5: removed
Run Code Online (Sandbox Code Playgroud)
AT&T 服务器接受了消息,对吗?
我碰巧有一个 At&T/Bellsouth 电子邮件,但我没有在我们发送给每个 ISP 的帐户。我需要某种方式来了解消息是否到达目的地。我的 main.cf 文件中是否有任何设置会影响我们是否收到拒绝/退回通知?
postfix ×10
email ×3
amavis ×1
isp ×1
malware ×1
performance ×1
redirection ×1
sasl ×1
smtp ×1
spam ×1