Disable SMTP (sending) not working

Discussion in 'ISPConfig 3 Priority Support' started by Trix, Aug 29, 2020.

  1. Trix

    Trix Member HowtoForge Supporter

    Hello,

    I am using the latest ispconfig and wanted to try out the disable smtp function but saddly after checking it i was still able to send out mail from roundcube. I have checked postfix for the disablesmtp query and its there with the correct id but it has no effect.
    The server has a full ispconfig package (web, ftp, mail, db ..) and its running on ubuntu 16.04.

    Any help would be much appreciated.
    Thanks,
    Trix
     
  2. Th0m

    Th0m ISPConfig Developer ISPConfig Developer

    This works without any problems for me, are you sure you set it for the correct account?
     
  3. Trix

    Trix Member HowtoForge Supporter

    Yes the selected account is correct i have checked it twice and tried to disable and reenable it but still nothing.
    Any suggestions where should i look for the source of the problem or how could i debug this?
     
  4. Th0m

    Th0m ISPConfig Developer ISPConfig Developer

    Which ISPConfig version is installed on your server?
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    How did you test that? You can't test it e.g. with webmail clients like RoundCube when they send from localhost.
     
  6. Th0m

    Th0m ISPConfig Developer ISPConfig Developer

    You can, at least in 1.4, just tested it with roundcube, sending from localhost, it will give a error when sending is disabled.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    oh, ok. Good to know.
     
  8. Trix

    Trix Member HowtoForge Supporter

    I am using the lastest ispconfig and the server was set up using the perfect server tutorial for ubuntu 16.04.
    First round i tested it with roundcube (1.2- beta) that came with the ubuntu 16.04 install and the messages went tru the disabled option was ignored. Then i tried with windows 10 built in mail client and the message sending failed when i set it back to allow sending that started working again.
    So the problem is that roundcube somehow ignores that setting.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Have a look at your roundcube config, I'll guess you'll have to configure roundcube to authenticate when sending with the username and password of the logged in user instead of sending trough localhost without authentication.
     
  10. Trix

    Trix Member HowtoForge Supporter

    Yes the problem is that the user and password lines were commented out and it was because i couldnt make it work. I tried loads of combinations for smtp but it wouldnt work. Every time i got SMTP error (535): Login error.

    I have the following settings at the moment:
    $config['default_host'] = 'localhost'
    $config['smtp_server'] = 'localhost'
    $config['smtp_user'] = '%u'
    $config['smtp_pass'] = '%p'

    Am i missing some extra config that needs to be added like specifing port numbers or anything else ?
     
  11. Trix

    Trix Member HowtoForge Supporter

    Some extra information that i have dumped out the $host, $pass, $user, $port in rcube_stmp.php and all of them print out as null. Roundcube is not sending my credentials used at login. I dumped out the $rcube->config->get('stmp_user') and i am getting '%u'
     
  12. Th0m

    Th0m ISPConfig Developer ISPConfig Developer

    Only when you send as a verified sender ofcourse, not when they don't authenticate.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, that's what I had in mind by saying that it might be possible to send even when sending is disabled. By default, RoundCube does not authenticate the sender, it just sends trough localhost.
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    That's probably more a question for a RoundCube usergroup then, or maybe @Th0m can post his working config? I don't use authenticated sending on my servers, so I don't have a config example at hand.
     
  15. Trix

    Trix Member HowtoForge Supporter

    Thank you for the help provided. @Th0m if you have a working config that would help alot if not i will try to continue googleing it maybe i find something.

    Many thanks.
     
  16. Th0m

    Th0m ISPConfig Developer ISPConfig Developer

    This would open several security issues, because you could send like any domain hosted on that server.

    I'm using roundcube 1.4.X and didn't change login relevant things that were not mentioned in the perfect server tutorial, except for
    Code:
    $config['smtp_auth_type'] = null;
    to
    Code:
    $config['smtp_auth_type'] = LOGIN;
    You can find the current default config here: https://github.com/roundcube/roundcubemail/blob/master/config/defaults.inc.php, but using this on a older version of roundcube would probably generate errors, so you shouldn't copy it as a whole.

    Can you share your full config, within a code block? (Insert -> Code)
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    This does not matter for my setup, I don't run a hosting business :)
     
  18. Th0m

    Th0m ISPConfig Developer ISPConfig Developer

    Fair enough, but maybe we should test this and eventually document it in the perfect server tutorials.
     
    till likes this.
  19. Trix

    Trix Member HowtoForge Supporter

    Finally a made it work.
    1) I upgraded roundcube to version 1.4.8 added the $config['smtp_auth_type'] = LOGIN; and changed the SMTP port to 25. I presume its ok to use port 25 since its a local request and the user is already authenticated.

    2) While upgrading i used the following guide (last post) however i had one little problem when trying to install
    php-net-idna2 i got an error that the package couldnt be found. I looked after it and yes that package is present only from ubuntu 18.04. I tried to send mail and it worked and the reply arrived aswell. Is that package a must since i dont know what purpose does it have?

    3) Oh and one more question at the end of that guide there was the part where the ispconfig plugins were added back. But there is no ispconfig plugin at that path '/usr/share/roundcube/plugins/ispconfig3_account'. Tried to find them but without any luck. Could you please help out how can i add those plugins back ?

    Many thanks,
    Trix
     
    till likes this.
  20. Th0m

    Th0m ISPConfig Developer ISPConfig Developer

    Yes, thay's fine as long as it is local traffic.

    Which PHP version are you using?

    Maybe they got deleted, how did you update to 1.4.8?
     

Share This Page