LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 06-01-2006, 09:34 AM   #1
dlublink
Member
 
Registered: Oct 2004
Location: Canada
Distribution: Ubuntu
Posts: 329

Rep: Reputation: 30
Delay emails, PHP delivery


Hey,

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?

thanks,
David

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

Original Poster
Rep: Reputation: 30
Alright,

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.

http://www.postfix.org/FILTER_README.html
10 # Exit codes from <sysexits.h>
11 EX_TEMPFAIL=75
12 EX_UNAVAILABLE=69

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.
 
  


Reply


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 01:21 PM
Sendmail 30sec delay between ident and delivery... rebel761 Linux - Networking 1 10-05-2005 10:35 AM
How do I send emails by PHP on FC3 (and configure the MTA)? murr4y Linux - Newbie 3 09-01-2005 04:20 PM
Receiving Emails through web server? (PHP) gothgeek84 Programming 12 01-16-2005 03:02 PM
sendmail delay with outgoing emails Stefanie71 Linux - Newbie 1 06-30-2004 03:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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