SiT! Bugs - SiT!
View Issue Details
0001348SiT!inbound emailpublic2010-06-18 14:002010-07-21 21:29
blowagie 
paulh 
lowtweakalways
closedfixed 
LinuxLinux2.6+later
3.60 LTS 
3.62 LTS3.62 LTS 
0001348: MTA problem solved
Hello,

I tried configuring the inbound mail, and I want to report a couple of issues I had.

First of all, I think the documentation should mention that you need to add something like #!/usr/bin/php to scripts such as output.php or inboundmail.php if you want them to work (for instance from the scheduler). To me, that was evident, but it might not be evident to others.

I first tried the "simple" solution: POP/IMAP, but I didn't manage to get it working. I don't think it's a bug, it's probably a configuration error on my side. I manually triggered auto.php. First I had the error because php_imap was missing, but after installing the module, no error was thrown, but no mail was fetched from my support INBOX either.

I didn't pursue this because I was more interested in the "push" solution than in the "pull" solution. At first, I received errors saying:

Fatal error: Call to undefined function return_bytes() in /var/www/public_html/lib/base.inc.php on line 131

I looked in the code, and I found that the method return_bytes() is defined in functions.inc.php
This file is included before base.inc.php in inboundemail.php, but it should be included in an earlier stage.
Following the instructions for MTA and you'll get the Fatal Error: "Call to undefined function return_bytes()."
You can solve this problem like this:

require_once ('core.php');
# add this line here:
require_once (APPLICATION_LIBPATH . 'functions.inc.php');
# add the above line.
require_once (APPLICATION_LIBPATH . 'triggers.inc.php');
require (APPLICATION_LIBPATH . 'mime_parser.inc.php');
require (APPLICATION_LIBPATH . 'rfc822_addresses.inc.php');
require (APPLICATION_LIBPATH . 'fetchSitMail.class.php');

if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME']))
{
    include (APPLICATION_LIBPATH . 'strings.inc.php');
# change the line below so that functions.inc.php isn't included twice
    require_once (APPLICATION_LIBPATH . 'functions.inc.php');
# change the line above (or remove it)
    require_once (APPLICATION_LIBPATH . 'base.inc.php');
}
No tags attached.
duplicate of 0001014closed paulh inboundemail.php does not work 
related to 0000671closed paulh inbound email does not work (Using MTA mode) 
Issue History
2010-06-18 14:00blowagieNew Issue
2010-07-02 19:25paulhRelationship addedduplicate of 0001014
2010-07-02 19:26paulhRelationship addedrelated to 0000671
2010-07-02 19:28paulhNote Added: 0003282
2010-07-02 19:28paulhAssigned To => paulh
2010-07-02 19:28paulhStatusnew => assigned
2010-07-02 19:28paulhTarget Version => 3.62 LTS
2010-07-03 12:37paulhNote Added: 0003283
2010-07-03 12:37paulhResolutionopen => fixed
2010-07-03 12:37paulhFixed in Version => Current SVN
2010-07-03 12:38paulhStatusassigned => resolved
2010-07-18 15:05ivanNote Added: 0003327
2010-07-18 15:05ivanStatusresolved => closed
2010-07-21 21:29ivanFixed in VersionCurrent SVN => 3.62 LTS

Notes
(0003282)
paulh   
2010-07-02 19:28   
going to try and get this fixed for 3.62
(0003283)
paulh   
2010-07-03 12:37   
r6533 and b6a0130 fix the includes problem, http://sitracker.org/wiki/Inbound_Email [^] updated to include either adding #!/usr/bin/php to the beginning of the file or to call the script with "php inboundemail.php"
(0003327)
ivan   
2010-07-18 15:05   
Released in v3.62