I am a new Mantis & EmailReporting user but not so new to linux/bsd and system administration so i have some degree of knowledge of what i am doing
My setup is:
- FAMP server on FreeBSD 10.3
- Mantis 1.2.19
- EmailReporting 0.9.3-DEV
- some customisation done to Mantis and some plugins enabled
- EmailReporting uses one IMAP account with Exchange server, tested and works ok
I have created a script:
Code: Select all
# !/bin/bash
/usr/local/bin/php /usr/local/www/mantis/plugins/EmailReporting/scripts/bug_report_mail.php
Code: Select all
* * * * * root /usr/local/bin/mantisemailreport.sh > /var/log/mantis-emailreport.log
The result in 99% of time looks like this:
Code: Select all
Start checking all mailboxes: Monday 21st of November 2016 09:55:00
array(14) {
["enabled"]=>
int(1)
["description"]=>
string(27) "ticket@mydomain.com - IMAP"
["mailbox_type"]=>
string(4) "IMAP"
["hostname"]=>
string(12) "<server_ip>"
["port"]=>
int(143)
["encryption"]=>
string(8) "STARTTLS"
["ssl_cert_verify"]=>
int(0)
["erp_username"]=>
string(17) "ticket@mydomain"
["erp_password"]=>
string(12) "xxxxxxxxxxxx"
["auth_method"]=>
string(4) "USER"
["project_id"]=>
int(22)
["global_category_id"]=>
int(1)
["imap_basefolder"]=>
string(0) ""
["imap_createfolderstructure"]=>
int(1)
}
Mailbox: ticket@mydomain.com - IMAP
Location: Retrieve list of messages
[pear_error: message="NO, The specified message set is invalid." code=0 mode=return level=notice prefix="" info=""]
Mailbox: ticket@mydomain.com - IMAP
Location: Retrieve list of messages
[pear_error: message="NO, The specified message set is invalid." code=0 mode=return level=notice prefix="" info=""]
Mailbox: ticket@mydomain.com - IMAP
Location: Retrieve list of messages
[pear_error: message="NO, The specified message set is invalid." code=0 mode=return level=notice prefix="" info=""]
Mailbox: ticket@mydomain.com - IMAP
Location: Retrieve list of messages
[pear_error: message="NO, The specified message set is invalid." code=0 mode=return level=notice prefix="" info=""]
Mailbox: ticket@mydomain.com - IMAP
Location: Retrieve list of messages
[pear_error: message="NO, The specified message set is invalid." code=0 mode=return level=notice prefix="" info=""]
Mailbox: ticket@mydomain.com - IMAP
Location: Retrieve list of messages
[pear_error: message="NO, The specified message set is invalid." code=0 mode=return level=notice prefix="" info=""]
Mailbox: ticket@mydomain.com - IMAP
Location: Retrieve list of messages
[pear_error: message="NO, The specified message set is invalid." code=0 mode=return level=notice prefix="" info=""]
Mailbox: ticket@mydomain.com - IMAP
Location: Retrieve list of messages
[pear_error: message="NO, The specified message set is invalid." code=0 mode=return level=notice prefix="" info=""]
Mailbox: ticket@mydomain.com - IMAP
Location: Retrieve list of messages
[pear_error: message="NO, The specified message set is invalid." code=0 mode=return level=notice prefix="" info=""]
Mailbox: ticket@mydomain.com - IMAP
Location: Retrieve list of messages
[pear_error: message="NO, The specified message set is invalid." code=0 mode=return level=notice prefix="" info=""]
Mailbox: ticket@mydomain.com - IMAP
Location: Create IMAP folder
[pear_error: message=", " code=0 mode=return level=notice prefix="" info=""]
Mailbox: ticket@mydomain.com - IMAP
Location: Create IMAP folder
[pear_error: message=", " code=0 mode=return level=notice prefix="" info=""]
Mailbox: ticket@mydomain.com - IMAP
Location: Create IMAP folder
[pear_error: message=", " code=0 mode=return level=notice prefix="" info=""]
Mailbox: ticket@mydomain.com - IMAP
Location: Create IMAP folder
[pear_error: message=", " code=0 mode=return level=notice prefix="" info=""]
Mailbox: ticket@mydomain.com - IMAP
Location: Create IMAP folder
[pear_error: message=", " code=0 mode=return level=notice prefix="" info=""]
Mailbox: ticket@mydomain.com - IMAP
Location: Create IMAP folder
[pear_error: message=", " code=0 mode=return level=notice prefix="" info=""]
Mailbox: ticket@mydomain.com - IMAP
Location: Create IMAP folder
[pear_error: message=", " code=0 mode=return level=notice prefix="" info=""]
Mailbox: ticket@mydomain.com - IMAP
Location: Create IMAP folder
[pear_error: message=", " code=0 mode=return level=notice prefix="" info=""]
Mailbox: ticket@mydomain.com - IMAP
Location: Create IMAP folder
[pear_error: message=", " code=0 mode=return level=notice prefix="" info=""]
Mailbox: ticket@mydomain.com - IMAP
Location: Create IMAP folder
[pear_error: message=", " code=0 mode=return level=notice prefix="" info=""]
Mailbox: ticket@mydomain.com - IMAP
Location: Create IMAP folder
[pear_error: message=", " code=0 mode=return level=notice prefix="" info=""]
Mailbox: ticket@mydomain.com - IMAP
Location: Create IMAP folder
[pear_error: message=", " code=0 mode=return level=notice prefix="" info=""]
Done checking all mailboxes
When i send an email, it lands in a proper project folder, the checking result is always the same as above.
I had literally 2 or 3 times when it detected the email.
To make things funnier when i click in plugin management "bug_report_mail.php" or "plugin.php?page=EmailReporting/bug_report_mail" link it detects emails every time with no problems.
I am fighting this for a few days now, checked permissions, ownership, communication, tried running wget or lynx in shell with the link as a parameter and it still did not work. Somehow invoking this by the server itself does not detect emails in folders despite running the script properly.
Setting for blocking this script in browser is "NO", but tried also turning it "YES" and this does not effect things.
I hope you guys could have any ideas ?
Best Regards,
Gregory