我使用 PHP 发送邮件。我尝试了原生的 php 函数和 php 邮件程序,并排除了 PHP 导致运行缓慢的可能性。我的问题是,我的 Debian 服务器发送一封邮件需要几秒钟,而发送多封邮件则需要几秒钟,这是不可接受的。
机器上没有配置任何东西,只有 php 和 nginx。由于某种原因,mail.log、syslog 或定义的 /var/log/phpmail.log 是空的(是的,权限设置为 777 以进行测试)。
我对这类问题几乎没有经验,因此寻求帮助和建议,以加快这一进程。可能是当地 MTA 行动缓慢?
下一步该怎么做,
希望得到帮助。
以下是 PHP 发送邮件后约 10 秒出现的 sendmail 日志:
Feb 3 11:59:01 mycomputer sendmail[7050]: s13Ax1wI007050: from=root, size=582, class=0, nrcpts=1, msgid=<201402031059.s13Ax1wI007050@mycomputer>, relay=root@localhost
Feb 3 11:59:01 mycomputer sm-mta[7051]: s13Ax1fC007051: from=<root@mycomputer>, size=820, class=0, nrcpts=1, msgid=<201402031059.s13Ax1wI007050@mycomputer>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Feb 3 11:59:01 mycomputer sendmail[7050]: s13Ax1wI007050: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30582, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s13Ax1fC007051 Message accepted for delivery)
Feb 3 11:59:01 mycomputer sm-mta[7052]: s13Ax1fC007051: to=foo, ctladdr=<root@mycomputer> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31012, dsn=2.0.0, stat=Sent
Feb 3 11:59:02 mycomputer sendmail[7054]: s13Ax2Kv007054: from=root, size=577, class=0, nrcpts=1, msgid=<201402031059.s13Ax2Kv007054@mycomputer>, relay=root@localhost
Feb 3 11:59:02 mycomputer sm-mta[7055]: s13Ax24Y007055: from=<root@mycomputer>, size=815, class=0, nrcpts=1, msgid=<201402031059.s13Ax2Kv007054@mycomputer>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Feb 3 11:59:02 mycomputer sendmail[7054]: s13Ax2Kv007054: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30577, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s13Ax24Y007055 Message accepted for delivery)
Feb 3 11:59:02 mycomputer sm-mta[7056]: s13Ax24Y007055: to=foo, ctladdr=<root@mycomputer> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31007, dsn=2.0.0, stat=Sent