In RefreshMailboxCommand.php line 88:



  • I when I try to refresh-mailbox I receive a error

    ./bin/console uvdesk:refresh-mailbox helpdesk@mydomain.com
    
     1. Processing uvdesk mailbox configuration.
    
     2. Opening imap stream...
    
    In RefreshMailboxCommand.php line 88:
    
      Warning: imap_open(): Couldn't open stream mail.mydomain.com
    
    
    uvdesk:refresh-mailbox [-t|--timestamp TIMESTAMP] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> [<emails>...]
    
    PHP Fatal error:  Uncaught ErrorException: Notice: Unknown: Can't open mailbox mail.mydomain.com: no such mailbox (errflg=2) in Unknown:0
    Stack trace:
    #0 [internal function]: Symfony\Component\Debug\ErrorHandler->handleError()
    #1 {main}
      thrown in Unknown on line 0
    

    the login and password are correct, I have read that for Gmail we must put imap.gmail.com:993/imap/ssl but my server mail is the same of the Uvdesk why don't find the mailbox?


  • UVdesk Staff mod

    @SCoccia

    We will recommend first setup a Gmail Email Id first and check if it is working for you or not.

    Then try with a custom email server email Id imap_open issue generally comes due to

    - Your credentials not correct.

    - Not sufficient permission provided for reading emails.

    - Some authentication failure due to any certificate check.

    For Gmail Do below things first:

    Enable less secure app for gmail: https://myaccount.google.com/lesssecureapps

    Please enable this also: https://accounts.google.com/b/0/DisplayUnlockCaptcha

    Locate path on your project.
    vendor/uvdesk/mailbox-component/Console/RefreshMailboxCommand.php

    open file and add below line there.

    Check in screenshot to add a line of code here: https://prnt.sc/w5bc5u

    Add this line for gmail:
    $server_host = "{imap.gmail.com:993/imap/ssl/novalidate-cert}INBOX";


  • UVdesk Staff mod

    @SCoccia

    You can add novalidate-cert in your $server_host if imap open issue is due to certificate check !!



  • If I put user @gmail and smtp @gmail run... but why if I use my domani not accept? I'm sure that all data are correct.. I use to mail client ecc


  • UVdesk Staff mod

    @SCoccia

    You can user your own domain but for testing we have asked you to test first with gmail account.

    May be you need to make changes if due to any above reason it is not allowing you to open your your IMAP.


  • mod admin

    @Sanjeev I collaborated as Google volunteer contributor in the past and again I'm advising you that suggest to users to allow less secure app is like opening a security hole in users account. Maybe Google will disable this less secure app function in the future, I don't know.

    @SCoccia
    Google account should be always protected by the 2 step than user will need to use a specific app password as password in UVdesk settings email.



  • I think that there isn't all information when I configure a email, I can't set the port... I can't set the login... how can run outside Gmail or Yahoo if I can't modify this information?

    Immagine 2021-10-23 111229.png


  • mod admin

    Yes, the host file is not compiled correctly.
    Please see the following guide: https://www.uvdesk.com/en/blog/setup-mailbox-uvdesk-open-source-helpdesk/

    Host field should be compiled for example like:

    {imap.mail.yahoo.com:993/imap/ssl}INBOX
    


  • why I must use a yahoo mail or gmail when I have a personal imap\pop? I must create a @yahoo@gmail account to receive a ticket? is not professional...
    If can read yahoo\gmail why can't read other imap server?


  • mod admin

    @SCoccia What I mentioned is an example.
    You can replace imap.mail.yahoo.com with your domain.

    I posted just an example.
    Please read the guide of UVdesk I given in the previous message.



  • ok... if I use gmail not recevice a error, but the problem is If I use my domain... I can't setup the correct information... I can't setup the port, the user login ecc I'm sure that login e password are correct

    I had created a script in php to read the mail some time ago, and I used

    $ hostname = '{localhost: 143 / notls}';
    

    but it doesn't work by putting this parameter on host either



  • Ok another step...
    if I use this configuration I can read the email...

    {mail.mydomain.it:143/notls}
    

    now work to send...


  • mod admin

    @SCoccia use an email without TLS is a security issue.
    You need to know how configure email and email host.
    Are you sure your host is working on the format mail.mydomain.it ?
    Are you sure the port is 143?

    I use port 993 with a valid certificate.
    Be sure settings you insert are correct and can work in a client email for example.
    There is no bugs or issue in UVdesk as I'm using this and is working so if doesn't work is probably an error in some configuration you insert. Can be the port, can be that you have no security on email (no TLS), etc.

    You can try maybe with Gmail as suggested but using a specific password for app.

    Usually port for outgoing email is 587 or 465



  • Yes, yes I use a ssl the example is only to set the information

    Immagine 2021-10-23 115952.png

    in the normal configuration when ask me host I put mail.domain.it but for this the configuration is different...
    now I think that the smtp is the same? because if I use gmail work but receive the email from @gmail and I prefer @mydomain.it



  • ok I also configured the smtp (which was correct) so you should write that for the imap it must be put

    {mail.mydomain.it:465/ssl}
    

    and is all ok


  • mod admin

    @SCoccia Look at your host filed, is not configured correctly.
    You need specify the folder where email are (inbox)

    Please consider the example sent to you and be sure to respect it.
    If your domain has not been configured for have a valid certificate for email the system can be unable to send or receive emails also if you set the configuration correctly.

    If you try with Gmail you will be sure the certified used by Gmail is recognized.
    In my personal UVdesk install I use my domain but I have a valid certificate also for email that is not self signed.

    you can try to configure your email address in an email client be sure to not add any exception if you see a warning on the certificate. If you see a warning on the certificate than you can have issues or you need ignore the certificate check.

    I never remind what string you need add for ignore certificate verification.
    You can search on the web. Let me see if I can find for you.
    Ignore the cert verification can be a security weakness.

    If I will find how and what string I will tell you.

    Found, example below:

    {imap.gmail.com:993/imap/ssl/novalidate-cert}INBOX
    


  • Hi, I understand and I have set to use ssl, I have a valid certificate, I don't need to se INBOX because is default, If I put it or no is the same.

    my advice is to make an example in the configuration file also for the other domains (extra google)

    I have resolve thank you.


  • mod admin

    @SCoccia the configuration for your domain doesn't depend by us but it depends on DNS configuration of your domain for the hostname than port and SSL depends on your server configuration.

    A test you can do is configure an email client like Thunderbird.
    Are you able to configure your domain email domain address in Thunderbird without having warning certificate?

    Do you have other PHP application installed with SMTP of your domain that work?

    In any case below an example on how I configured host field on my personal domain:

    1.jpg

    2.jpg

    Now you have an example 😉



  • yes I see and is all ok


  • UVdesk Staff mod

    @SCoccia

    Please share your helpdesk URL so that we can see if you are adding correct one or not for site url.


Log in to reply