Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Not fetching emails

PHP: 5.6
MySQL: 10.1
osTicket - most recent, stable

I have another osTicket system working on this hosting provider (alert@example.com) the only difference is that this particular one uses email account on a subdomain e.g. alert@subdomain.example2.com

New install uses alert@subdomain.example2.com,
but mail system for domain example.com is elsewhere, but mail system for
subdomain.example2.com mailboxes is with the same hosting provider.

I have typed in correct IMAP 993 and SMTP 587 details and set it on SSL according to email configuration guide and this by the way works on the old install. I press Save Settings and it saves them with Success. Before (at 1and1) I could not make this work, always stuck on SMTP part not able to authenticate, so had to disable it, have IMAP enabled only.

I send a diagnostic email and it also says "with success" but I do not receive anything on the other end. In the settings it is set to use this as default and fetching is enabled (not on auto using cron, but default that also works for me on another install)

This mailbox has been tested both ways and I can send to and receive from emails. Default MTA is set to use alert@subdomain.example2.com not PHP mailer.

I have moved this system from 1and1, copied over files and exported/imported DB, changed DB connection details and it works. Is there anything I have overlooked or should I reinstall from scratch?

Comments

  • edited September 20
    Ok, I have tested SMTP again and it is sending fine to email system that is on @example.com
    I can also send to myself fine (to sender's email address) fine.
    I have also received a test email on Yahoo, but for some reason it went to Junk Folder.
    I am still waiting for one to arrive at Gmail.

    But why IMAP fetching does not work I have no idea.
  • I have received a test email to Gmail fine, so for some reasons fetching is not working.
    Is there any way to test it or check some other settings?

    Please let me know.
  • edited September 20
    You have not provided us with your email settings.

    Nor have you told us which version of osTicket you are running.
  • Please see the attached.
    When I press Save Changes I got: "Successfully updated this email"
    Screenshot_2017-09-20_15-31-01.png
    992 x 792 - 73K
    Screenshot_2017-09-20_15-32-37.png
    567 x 897 - 71K
    Screenshot_2017-09-20_15-33-23.png
    889 x 587 - 65K
  • Try adding ssl:// to your Hostname field.
  • When I do this: ssl://imap.xxxxxxx.pl

    I got this error when saving changes:

    Can't open mailbox {ssl://imap.xxxxxxx.pl:993/imap/ssl/novalidate-cert}INBOX: invalid remote specification
  • That error seems like your PHP's IMAP extension is not compiled with SSL support. Do a phpinfo(); somewhere and look for the IMAP extension label. Under that label look for "SSL Support" and see if it is Enabled or Disabled. If it's disabled then you will have to recompile the extension with SSL support enabled and that should resolve the error.

    What is the error you get when saving IMAP settings without "ssl://" added to the beginning of hostname?
  • edited September 20
    There is no error when I save it without ssl://, it saves it with success.
    "Successfully updated this email"

    imap


    IMAP c-Client Version 2007f
    SSL Support enabled
    Kerberos Support enabled
  • edited September 20

    This is strange stuff...

    Do you get any errors in your osTicket error logs?
    (Admin Panel > Settings > System > Default Log Level has to be set to DEBUG)

    Do you have access to your Mail Server logs and if so are there any errors there? 

    Have you contacted your Email Host to see if they are doing anything or seeing any errors?

    Have you contacted your Web Host to see if their firewall or something is blocking anything?
  • I think this does not work when Fetch on auto-cron is not enabled. If only Enable is ticked fetching does not work.
    This is the only settings I had differently on the old system.
  • Fetch on auto-cron  is for people who cannot run a local or remote cron / windows task scheduler for some reason.  This makes me think that perhaps you never setup cron / windows task scheduler to run the cron.php.

  • Hi ntozier
    It looks like I am a silly sausage.
    I have not set this cron job.

    I have set it up now, but how can I check if this is executed?
    Should I change logging level to DEBUG?

    The cron job is as follows:
    wget -q -O /dev/null --user-agent=CAC262B261C8E22A577A371D3DA32C8F
    http://subdomain.domain.com/api/cron.php >/dev/null 2>&1
  • Yes, change to DEBUG and you'll see a Cron Job Executed log in your logs upon next cron execution.
  • So it looks like the right syntax in crontab on my new server is as follows:

    */5 * * * * php /home/username/domains/subdomain.domain.com/public_html/api/cron.php

    I assume because it is on the same host I don't have to use this user-agent= thing.
  • Your webserver runs as a user called "php"?
  • I'm thinking he's calling the php cli binary with that command, as username in usernames crontab.. I think
  • Well then i hope that they dont have more then on version of php installed.
Sign In or Register to comment.