Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 06-01-2006, 10:34 AM   #1
Registered: Oct 2004
Location: Canada
Distribution: Ubuntu
Posts: 330

Rep: Reputation: 30
Delay emails, PHP delivery


I am usign PHP to deliver emails. Something the database that PHP queries is not available. I don't want to loose the email, but I don't want to reject it either.

I found with php that if my script ends with exit(255). It will bounce the message and if it ends exit(0) postfix will remove it from the queue as if it were delivered.

Anyone know what exit status can use to tell postfix to try again later?

I found that 69 causes postfix to say 'service unavailable' and bounces the message. I don't suppose anyone knows where I can find a full list of postfix reaction to exit codes?


Last edited by dlublink; 06-01-2006 at 10:47 AM.
Old 06-01-2006, 10:51 AM   #2
Registered: Oct 2004
Location: Canada
Distribution: Ubuntu
Posts: 330

Original Poster
Rep: Reputation: 30

the correct answer is to use exit code 75. If your PHP script (or any other script) returns an exit code of 75, postfix will defer the message.
10 # Exit codes from <sysexits.h>

Jun 1 10:48:49 hostname postfix/local[32127]: C7F332C1: to=<test@domain.tld>, relay=local, delay=1, status=deferred (temporary failure)

Hope this helps the next person trying to find this information.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail delivery delay deadv Linux - Newbie 1 01-09-2006 02:21 PM
Sendmail 30sec delay between ident and delivery... rebel761 Linux - Networking 1 10-05-2005 11:35 AM
How do I send emails by PHP on FC3 (and configure the MTA)? murr4y Linux - Newbie 3 09-01-2005 05:20 PM
Receiving Emails through web server? (PHP) gothgeek84 Programming 12 01-16-2005 04:02 PM
sendmail delay with outgoing emails Stefanie71 Linux - Newbie 1 06-30-2004 04:26 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:12 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration