-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not fetch reports from imap #31
Comments
Hi i configure it and it's working fine as connection but not fetching the emails what is the procedure to import the attachment? |
cd /usr/local/share/dmarc-srg && php utils/fetch_reports.php |
what to write in Cronjob? or what to call from Cronjob? |
Actually, it's the line in my previous message. But it doesn't work. |
so , you mean everyday i have to loggedin to server go to shell and try this command ? not a solution dear. |
You don't understand me... |
Hello. The mailbox availability check in the administration panel uses this function as well. If this check passes without problems, then it's something else. I tried to fix it in the last commit. Can you test it? |
@nasirmgcc, If you want to get report automatically, you should add a cronjob for that. I gave you an example in #25. You can learn more about this functionality here: https://en.wikipedia.org/wiki/Cron |
The check passes. But I am still getting the error after your last commit. |
for me it's working fine, but the " CRONJOB " is not working to fetch the reports, i followd #25 but i have no idea what's wrong |
@xervers, I have no idea why it happens. Temporarily you can try to replace all imap_utf8_to_mutf7 function calls with imap_utf7_encode in classes/Mail/MailBox.php file. The both functions have one parameter. |
@nasirmgcc I will write you there. |
Hello. It seems to me that something is preventing the access to general functions. |
It seems to me that you have different versions of the php interpreter for cli and web. And the cli version doesn't have IMAP support. Is it possible? |
Hello. |
Where is the IMAP support for PHP?
|
Please stop hijacking the thread. I am my own provider. Don't you think it wasn't the 1st thing I checked? Also, the test connection on the control panel works well so IMAP support is not the issue. |
It may be that you are using different versions of php for the web server and for the console. One version may have support for imap functions, and another may not. I have Debian/GNU linux on my desktop and it currently has two separate versions of php packages and each version has its own imap package: p.s. I am going to add the display of the php version in the About dialog. |
Ok, today I recompiled the libcclient with the exports utf8_to_mutf7. Looking back, libcclient needs to be compiled with utf8_to_mutf7 in order to export utf8_to_mutf7. Anyway, I got it working. It wasn't a module missing on php-cli. Why not use the default php imap functions (https://www.php.net/manual/en/book.imap.php) and write a whole set of functions to connect and manage imap? I don't see the point... |
All my configs work fine with localhost. I guess it depends on the database and dns settings.
Please note that the functions mentioned here, are in this list. I always try to use only standard functions without external dependencies.
I'm glad the script worked. Thanks for the info. |
I can't get dmarc-srg to retrieve the reports from imap.
The connection is correct on the panel, but when I run the fetch_reports I get this:
/php utils/fetch_reports.php PHP Fatal error: Uncaught Error: Call to undefined function Liuch\DmarcSrg\Mail\imap_utf8_to_mutf7() in /public_html/dmarc/classes/Mail/MailBox.php:230 Stack trace: #0 /public_html/dmarc/classes/Mail/MailBox.php(171): Liuch\DmarcSrg\Mail\MailBox->ensureConnection() #1 /public_html/dmarc/classes/Sources/MailboxSource.php(88): Liuch\DmarcSrg\Mail\MailBox->sort('SORTDATE', 'UNSEEN', false) #2 /public_html/dmarc/classes/Report/ReportFetcher.php(68): Liuch\DmarcSrg\Sources\MailboxSource->rewind() #3 /public_html/dmarc/utils/fetch_reports.php(117): Liuch\DmarcSrg\Report\ReportFetcher->fetch() #4 {main} thrown in /public_html/dmarc/classes/Mail/MailBox.php on line 230
Seems I need to have imap_utf8_to_mutf7 on the system, but this is only provided if libcclient exports utf8_to_mutf7 (explained here: https://www.php.net/manual/en/function.imap-utf8-to-mutf7.php)
The text was updated successfully, but these errors were encountered: