Hello;
I'm having an issue with outgoing mail getting "stuck" in
the queue.
I'm not a postfix expert by any definition, and would be
grateful for any advice on this.
Here are the relevant details:
We have a php-based application running, that sends email
messages to customers as needed (order processing, confirmations,
etc.)
Each time a customer orders a product, we send an email to
the customer, and one to our in-house sales staff.
If several orders are placed in a short period of time
(for example, 3 orders in one minute), the last email
(the one going to the sales staff) gets "stuck" in the
outgoing queue.
At some point in the future, the message gets delivered;
sometimes in 15 minutes, sometimes not for over an hour.
some points of interest, in no particular order:
-- the problem only occurs when sending mail from our php
code. even a very small test script with two mail() function
calls can be used to reproduce the problem.
-- using sendmail from the command line does not reproduce the
problem. I can easily fire off 10 emails in 10 seconds or so,
and they all get delivered correctly.
-- I tried enabling verbose logging on virtually every component
of the postfix system (pickup, cleanup, qmgr, smtp & others),
and poured through the logs for hours, but I can't find any reason
for the messages to get stuck in the queue.
-- when a message is "stuck", I can see it in the directory:
/var/spool/postfix/maildrop. I can even view the message with
postcat.
-- when the messages do finally get delivered, the smtp log entry
shows "delay=nnnn", where nnnn is the number of seconds the message
sat in the queue. but again, no clue as to why it sat there for so long.
During the past few days of troubleshooting this problem, I noticed
that sending an email with sendmail from the command line would cause
any messages stuck in the queue to immediately get delivered. So,
as a work-around, I setup a cron job to run sendmail every so often,
sending a blank email (to a nonexistent address). This has solved
the problem for now, and I'm no longer getting phone calls from our
sales staff (whew.)
Any help would be greatly appreciated.
our configuration is as follows:
machine: Mac XServe
os: Mac OSX Sevrer 10.5
postfix version: mail_version = 2.1.5
php: 5.2.1 (cli)
Robert Meyer
I'm having an issue with outgoing mail getting "stuck" in
the queue.
I'm not a postfix expert by any definition, and would be
grateful for any advice on this.
Here are the relevant details:
We have a php-based application running, that sends email
messages to customers as needed (order processing, confirmations,
etc.)
Each time a customer orders a product, we send an email to
the customer, and one to our in-house sales staff.
If several orders are placed in a short period of time
(for example, 3 orders in one minute), the last email
(the one going to the sales staff) gets "stuck" in the
outgoing queue.
At some point in the future, the message gets delivered;
sometimes in 15 minutes, sometimes not for over an hour.
some points of interest, in no particular order:
-- the problem only occurs when sending mail from our php
code. even a very small test script with two mail() function
calls can be used to reproduce the problem.
-- using sendmail from the command line does not reproduce the
problem. I can easily fire off 10 emails in 10 seconds or so,
and they all get delivered correctly.
-- I tried enabling verbose logging on virtually every component
of the postfix system (pickup, cleanup, qmgr, smtp & others),
and poured through the logs for hours, but I can't find any reason
for the messages to get stuck in the queue.
-- when a message is "stuck", I can see it in the directory:
/var/spool/postfix/maildrop. I can even view the message with
postcat.
-- when the messages do finally get delivered, the smtp log entry
shows "delay=nnnn", where nnnn is the number of seconds the message
sat in the queue. but again, no clue as to why it sat there for so long.
During the past few days of troubleshooting this problem, I noticed
that sending an email with sendmail from the command line would cause
any messages stuck in the queue to immediately get delivered. So,
as a work-around, I setup a cron job to run sendmail every so often,
sending a blank email (to a nonexistent address). This has solved
the problem for now, and I'm no longer getting phone calls from our
sales staff (whew.)
Any help would be greatly appreciated.
our configuration is as follows:
machine: Mac XServe
os: Mac OSX Sevrer 10.5
postfix version: mail_version = 2.1.5
php: 5.2.1 (cli)
Robert Meyer