Email to Fax hardships

Status
Not open for further replies.

buffpuff

New Member
Oct 18, 2018
11
0
1
47
Hi all,

I have a working FusionPBX which can receive faxes and send them via the web gui.

I'm trying to set up email to fax, for that I followed the recommendation in https://www.pbxforums.com/threads/email-to-fax-under-fax-server.905/.

First I created a fax account with IMAP settings (see image).

Then I created a crontab as root to pull the emails
#crontab -e
*/2 * * * * root wget --no-check-certificate --delete-after https://OurURL/app/fax/fax_emails

Then I made sure advanced / default settings / fax / send_mode - set enabled to false.

Deleted all the logs and history in GUI:
app / fax server / sent
app / fax server / log
And in CLI:
/var/lib/freeswitch/storage/fax/sent
/var/lib/freeswitch/storage/fax/temp

then I restarted FreeSwitch
service freeswitch restart

I see the crontab task running in /var/log/syslog
Oct 25 17:34:01 fax CRON[3017]: (root) CMD (root wget --no-check-certificate --delete-after http://OurURL/app/fax/fax_emails.php)

But nothing in the fax log or queue.
When I do tcpdump I don't see any communications from FusionPBX towards our IMAP mail server, so it seems like it's not trying to fetch the
emails at all.
If I try to run php -f fax_emails.php I get:
Array
(
[0] => [CLOSED] IMAP connection broken (server response)
)

I'm sure the server is operational and that the credentials are good.

Is there a way to debug this php script further?
What am I doing wrong?
 

Attachments

  • imap.png
    imap.png
    57.8 KB · Views: 68

buffpuff

New Member
Oct 18, 2018
11
0
1
47
OK, I found the problem.
Here's the way to get email to fax working:

1. As root do "crontab -e"
Add the line bellow for an IMAP check every 2 minutes:
*/2 * * * * wget --no-check-certificate --delete-after http://fax.onlinefaxservice.nl/app/fax/fax_emails.php

2. Now follow this post:
https://www.pbxforums.com/threads/email-to-fax-under-fax-server.905/post-7671

3. In your fax server account, choose advanced, add "Inbox" (or any other folder) to your Mailbox folder list. Also add a Subject Tag in your Email-To-Fax section and an authorized sender.

4. Now send an email to your IMAP account from the authorized sender with the subject: [SubjectTag],Telephone-number
 
Status
Not open for further replies.