Roundcube won't send or receive emails

Discussion in 'Installation/Configuration' started by DPablo, Mar 8, 2016.

  1. DPablo

    DPablo New Member

    Hello,
    i'm aware that there are plenty 'Roundcube' threads on this forum, but i didn't find any that could solve my problem.

    The problem is sending nor receiving emails doesn't work. When i try to send an email it says 'sent successfully', but it never reaches the recipient's mailbox and vice-versa - sending an email to this account shows no results. But no errors are displayed.

    I have ISPConfig3 installed on my VPS (running Ubuntu 14.04). I used this howtoforge.com/using-roundcube webmail-with-ispconfig-3-on-debian-wheezy-apache2 tutorial to install Roundcube and it didn't work out for me as i wanted.​

    Roundcube is installed, i can access it via mydomain.com/webmail/ address and log in using the username and password created in ISPConfig3.​

    I tried to fix it by removing the Roundcube package and installing it once again, but i probably screwed up. I have a guess that it might have something to do with creating user accounts in ISPConfig3 - in the email -> domain -> add new domain tab i don't have a choice of a client - just an empty list, but that's just a guess.

    I will be grateful for some help.​
     
  2. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    If you try to send mail from roundcube, fire up a SSH connect to your server and do
    Code:
    tail -f /var/log/mail.info
    
    first, then send mail. Are there any new lines added to the output? Do they look faulty? Maybe post them :)

    If not, try enabling roundcube logging in <RC root>/config/main.inc.php
    Code:
    // system error reporting, sum of: 1 = log; 4 = show
    $config['debug_level'] = 1;
    $config['smtp_debug'] = true;
    $rcmail_config['imap_debug'] = true;
    
    Make sure you have set log folders attributes so it can write to the directory/log files.

    If that doesn't seem to help, check wether roundcube tries to send mail via PHP mail() by enabling logging for the use of mail()
    in your php.ini
    Code:
    mail.log = /var/log/phpmail.info
    
    Make sure that logfile is writeable by your php processes aswell.
     
  3. DPablo

    DPablo New Member

    Thanks for the response.

    Code:
    tail -f /var/log/mail.info
    command gives an output:
    Code:
    tail: cannot open ‘/var/log/mail.info’ for reading: No such file or directory
    But if you meant:
    Code:
    tail -f /var/log/mail.log
    then it gives:
    Code:
    Mar  8 14:08:00 magento dovecot: imap([email protected]): Disconnected: Logged out in=50 out=475
    
    Mar  8 14:09:00 magento dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=46.101.xxx.xxx, lip=46.101.xxx.xxx, mpid=31127, secured, session=<7uFcUI4tEgAuZdum>
    
    Mar  8 14:09:00 magento dovecot: imap([email protected]): Disconnected: Logged out in=50 out=475
    
    Mar  8 14:10:00 magento dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=46.101.xxx.xxx, lip=46.101.xxx.xxx, mpid=31158, secured, session=<quXuU44tEwAuZdum>
    
    Mar  8 14:10:00 magento dovecot: imap([email protected]): Disconnected: Logged out in=50 out=475
    
    Mar  8 14:10:01 magento dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<PnMEVI4tlgB/AAAB>
    
    Mar  8 14:10:01 magento dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<u3cEVI4tmQB/AAAB>
    
    Mar  8 14:10:01 magento postfix/smtpd[31190]: connect from localhost[127.0.0.1]
    
    Mar  8 14:10:01 magento postfix/smtpd[31190]: lost connection after CONNECT from localhost[127.0.0.1]
    
    Mar  8 14:10:01 magento postfix/smtpd[31190]: disconnect from localhost[127.0.0.1]
    
    Mar  8 14:11:00 magento dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=46.101.xxx.xxx, lip=46.101.xxx.xxx, mpid=31217, secured, session=<9WiCV44tGgAuZdum>
    
    Mar  8 14:11:00 magento dovecot: imap([email protected]): Disconnected: Logged out in=50 out=475
    
    Mar  8 14:11:25 magento postfix/qmgr[31005]: C37381651CD: from=<[email protected]>, size=649, nrcpt=1 (queue active)
    
    Mar  8 14:11:25 magento postfix/smtp[31228]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
    
    Mar  8 14:11:25 magento postfix/smtp[31228]: C37381651CD: to=<[email protected]>, orig_to=<root>, relay=none, delay=113958, delays=113958/0.02/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
    
    Mar  8 14:12:00 magento dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=46.101.xxx.xxx, lip=46.101.xxx.xxx, mpid=31232, secured, session=<95oVW44tHQAuZdum>
    
    Mar  8 14:12:00 magento dovecot: imap([email protected]): Disconnected: Logged out in=50 out=475
    
    Mar  8 14:13:00 magento dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=46.101.xxx.xxx, lip=46.101.xxx.xxx, mpid=31250, secured, session=<09KwXo4tHgAuZdum>
    
    Mar  8 14:13:00 magento dovecot: imap([email protected]): Disconnected: Logged out in=50 out=475
    
    Mar  8 14:14:01 magento dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=46.101.xxx.xxx, lip=46.101.xxx.xxx, mpid=31264, secured, session=<SwZIYo4tHwAuZdum>
    
    Mar  8 14:14:01 magento dovecot: imap([email protected]): Disconnected: Logged out in=50 out=475
    
    ^C
    
    Immediately after sending an email, the above command spits out:

    Code:
    Mar  8 14:25:04 magento postfix/qmgr[31005]: 47B7D1653A7: from=<[email protected]>, size=519, nrcpt=1 (queue active)
    
    Mar  8 14:25:04 magento postfix/smtp[31596]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
    
    Mar  8 14:25:04 magento postfix/smtp[31596]: 47B7D1653A7: to=<[email protected]>, relay=none, delay=0.06, delays=0.05/0.01/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
    
    Mar  8 14:25:04 magento dovecot: imap([email protected]): Disconnected: Logged out in=456 out=568
    
    Mar  8 14:25:05 magento dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=46.101.xxx.xxx, lip=46.101.xxx.xxx, mpid=31600, secured, session=<gfrbiY4tUAAuZdum>
    
    Mar  8 14:25:05 magento dovecot: imap([email protected]): Disconnected: Logged out in=70 out=654
    
    Mar  8 14:25:07 magento dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=46.101.xxx.xxx, lip=46.101.xxx.xxx, mpid=31603, secured, session=<JEkIio4tUQAuZdum>
    
    Mar  8 14:25:07 magento dovecot: imap([email protected]): Disconnected: Logged out in=303 out=1758
    
    Mar  8 14:25:08 magento dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=46.101.xxx.xxx, lip=46.101.xxx.xxx, mpid=31605, secured, session=<dSAJio4tUgAuZdum>
    
    Mar  8 14:25:08 magento dovecot: imap([email protected]): Disconnected: Logged out in=81 out=627
    ^C
    
    So i see the line were the sending is supposed to be happening but the connection is refused. Unfortunately i have no idea what to do with it, because i am a complete newbie (only about a week into webserver related things).

    After making changes in main.inc.php file and trying to send email, the tail command gives an output:

    Code:
    Mar  8 14:36:55 magento postfix/qmgr[31005]: 9CB361653A8: from=<[email protected]>, size=666, nrcpt=1 (queue active)
    
    Mar  8 14:36:55 magento postfix/smtp[31869]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
    
    Mar  8 14:36:55 magento postfix/smtp[31869]: 9CB361653A8: to=<[email protected]>, relay=none, delay=0.06, delays=0.05/0/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
    
    Mar  8 14:36:55 magento dovecot: imap([email protected]): Disconnected: Logged out in=668 out=1117
    
    Mar  8 14:36:56 magento dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=46.101.xxx.xxx, lip=46.101.xxx.xxx, mpid=31893, secured, session=<AqpBtI4tewAuZdum>
    
    Mar  8 14:36:56 magento dovecot: imap([email protected]): Disconnected: Logged out in=70 out=654
    
    Mar  8 14:36:59 magento dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=46.101.xxx.xxx, lip=46.101.xxx.xxx, mpid=31895, secured, session=<9lZytI4tfAAuZdum>
    
    Mar  8 14:36:59 magento dovecot: imap([email protected]): Disconnected: Logged out in=303 out=2178
    
    Mar  8 14:36:59 magento dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=46.101.xxx.xxx, lip=46.101.xxx.xxx, mpid=31897, secured, session=<LNNytI4tfQAuZdum>
    
    Mar  8 14:36:59 magento dovecot: imap([email protected]): Disconnected: Logged out in=81 out=627
    ^C
    
    /var/log has CHMOD set to 775 and for the mail.log file it is 644.
    I've edited the php.ini file, but there is no phpmail.info in /var/log directory.

    After all that, the output for the tail command is:

    Code:
    Mar  8 14:55:24 magento dovecot: imap([email protected]): Disconnected: Logged out in=441 out=1753
    
    Mar  8 14:55:39 magento postfix/pickup[29783]: 3DC201653AB: uid=33 from=<[email protected]>
    
    Mar  8 14:55:39 magento dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=46.101.xxx.xxx, lip=46.101.xxx.xxx, mpid=32503, secured, session=<iLYv944twgAuZdum>
    
    Mar  8 14:55:39 magento postfix/cleanup[32500]: 3DC201653AB: message-id=<[email protected]>
    
    Mar  8 14:55:39 magento postfix/qmgr[31005]: 3DC201653AB: from=<[email protected]>, size=660, nrcpt=1 (queue active)
    
    Mar  8 14:55:39 magento postfix/smtp[32505]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
    
    Mar  8 14:55:39 magento postfix/smtp[32505]: 3DC201653AB: to=<[email protected]>, relay=none, delay=0.06, delays=0.05/0.01/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
    
    Mar  8 14:55:39 magento dovecot: imap([email protected]): Disconnected: Logged out in=662 out=979
    
    Mar  8 14:55:40 magento dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=46.101.xxx.xxx, lip=46.101.xxx.xxx, mpid=32509, secured, session=<e70+944txgAuZdum>
    
    Mar  8 14:55:40 magento dovecot: imap([email protected]): Disconnected: Logged out in=70 out=654
    ^C
    
    Sending and receiving emails still doesn't work.
     
  4. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    You would have to create the phpmail.info file or whatever you want to call it. php.ini should have a commented line for mail.log setting.
    However
    Code:
    Mar 8 14:25:04 magento postfix/smtp[31596]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused 
    Either your amavisd doesn't like connections from 127.0.0.1 - which actually should be the only ip to accept connections from - or it crashed/ failed to start / is not configured.

    So the issue leads to amavisd. Try restarting amavisd and check your mail.log if there's an issue with that, maybe also the syslog.
    I don't know how much ubuntus logging facility differs from debian :)
     
  5. DPablo

    DPablo New Member

    Thanks for the reply, ztk.me.

    There is a high chance that the problem is with the configuration, because, as i said earlier, i tried to install newer version while the older could've been not removed completely, so things might've got wrong. Anyway, running a command:

    Code:
    service amavis restart
    
    gives an output:

    Code:
    Stopping amavisd: (not running).
    Starting amavisd: chown: changing ownership of ‘/var/run/amavis’: Operation not permitted
    
    so it seems like the problem is with that amavis service, like you said. Should i just chown -R the directory above?
     
  6. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    Most likely it should be owned by amavis, yes.
     
  7. DPablo

    DPablo New Member

    Unfortunately nothing works out for me. Now i would like to remove Roundcube from my server, and try to install other client. I removed some directories that i was advised to, but Roundcube still works, i can access it via mydomain.com/webmail and log into my account.

    So my last question (i hope) is how to completely uninstall Roundcube (ISPConfig3, Ubuntu 14.04) and reverse all the changes that where made by installing that software? Thanks in advance.
     
  8. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    That's very sad it didn't work out :( I still doubt roundcube is the issue here as it clearly looks like something went wrong with the amavis/mail server installation itself - at least for the correct permissions of the directories. This shouldn't happen.

    However - I don't know if you used a ready package of roundcube, then you might need to remove that by using the package manager
    Code:
    apt-get --purge remove roundcube
    
    or similar, should get rid of most of roundcube things.
    It might fail for folders where data has been created/modified though. Check your /usr/share/ for a roundcube folder.
    Also /etc/apache2 folder for roundcube configuration file, either in conf.d or conf-enabled.
    Then you have to remove the database user and database created for roundcube.

    But I'd give it a try to fix maybe further issues - now you might have to repair it, depending on what you deleted.
     
  9. DPablo

    DPablo New Member

    Hi, ztk.me,
    yes, it's sad to me too :( I wanted to use Roundcube by default but after many failed attempts i decided to give a chance to Squirrelmail, hope it goes smoothly.
     
  10. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    Again, I don't think it is roundcubes fault, especially since the error log you posted clearly indicated there has been an issue with amavisd which is not related to the client you use ( roundcube in this case )
     

Share This Page