SiT! Bugs - SiT!
View Issue Details
0001014SiT!inbound emailpublic2009-11-26 19:242010-07-21 21:29
3.62 LTS3.62 LTS 
0001014: inboundemail.php does not work

I have created a .forward file like this:

But it does not work.
I runned the script manually:
# cat ~support/Maildir/new/1259261863.V807I14eb1cM654967.garwin|/srv/www/htdocs/sit-3.50/inboundemail.php
/srv/www/htdocs/sit-3.50/inboundemail.php: line 1: ?php: No such file or directory
/srv/www/htdocs/sit-3.50/inboundemail.php: line 2: //: is a directory
/srv/www/htdocs/sit-3.50/inboundemail.php: line 3: //: is a directory
/srv/www/htdocs/sit-3.50/inboundemail.php: line 4: syntax error near unexpected token `('
/srv/www/htdocs/sit-3.50/inboundemail.php: line 4: `// SiT (Support Incident Tracker) - Support call tracking system'
I added a "sheband"

(at the top of this script)

but still a problem:

# cat ~support/Maildir/new/1259261863.V807I14eb1cM654967.garwin|/srv/www/htdocs/sit-3.50/inboundemail.php
PHP Fatal error: Call to undefined function return_bytes() in /srv/www/htdocs/sit-3.50/lib/ on line 130

What is wrong here.?
No tags attached.
has duplicate 0001348closed paulh MTA problem solved 
Issue History
2009-11-26 19:24repostorNew Issue
2009-11-26 19:42paulhNote Added: 0002158
2009-11-26 20:04repostorNote Added: 0002159
2009-11-26 20:17repostorNote Added: 0002160
2009-11-26 20:21paulhNote Added: 0002161
2009-11-26 20:21paulhStatusnew => confirmed
2010-07-02 19:25paulhRelationship addedhas duplicate 0001348
2010-07-03 12:37paulhNote Added: 0003284
2010-07-03 12:37paulhAssigned To => paulh
2010-07-03 12:37paulhStatusconfirmed => resolved
2010-07-03 12:37paulhResolutionopen => fixed
2010-07-03 12:37paulhFixed in Version => Current SVN
2010-07-03 12:37paulhTarget Version => 3.62 LTS
2010-07-18 15:05ivanNote Added: 0003328
2010-07-18 15:05ivanStatusresolved => closed
2010-07-21 21:29ivanFixed in VersionCurrent SVN => 3.62 LTS

2009-11-26 19:42   
Your MTA is trying to run inboundemail.php as a script though it doesn't know which interpreter to us so you either need to edit your .forward so it calls it with php e.g.

php /srv/www/htdocs/sit-3.50/inboundemail.php

Which may or may not work or guarenteed to work it to add a new line to start start of the file which is


(or where ever PHP is installed), if your still having problems check that PHP is enabled for CLI (some distros have separate packages for this)
2009-11-26 20:04   
Thanks Paulh,

The script does not know how to find routine:

Call to undefined function return_bytes() in /srv/www/htdocs/sit-3.50/lib/ on line 130

maybee some of the "required" files are not loaded at the startup?

Do I need to add somthing to the /etc/php5/cli/php.ini file?

Or what is wrong.?

Please help
2009-11-26 20:17   
I will fallback to use the "polling" method instead again.
I just checked this if the problem with the function was solved in this release of sit.

Thanks in advance
2009-11-26 20:21   
Hi Tomas,

Sorry missed that part of the initial report, its been a long week.

The problem seems to be caused by being included before which declares this function, it seems somewhere down the line includes, seems this was added in 5466 ( [^]) Kieran can you shed any light on this?

2010-07-03 12:37   
r6533 and b6a0130 fix the includes problem, [^] updated to include either adding #!/usr/bin/php to the beginning of the file or to call the script with "php inboundemail.php"
2010-07-18 15:05   
Released in v3.62