Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    New Setup help: Postfix/mysql can't find users.

    General Discussion
    1
    2
    868
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • IShouldHaveBeenAQATester
      IShouldHaveBeenAQATester last edited by

      Hi Everyone,

      I’m using Ubuntu 20.04 with the built in packages and I think I almost have everything working. After spending a few days setting up & reading the docs (and fixing some apparmor profile issues), the last piece I’m missing is postfix can’t seem to look up users. Im using the DB plugin along with mysql/mariadb. I am testing with a single user “rob@po.<mydomain>” and postfix was also installed from packages.

      Here is my config I’ve added to postfix:

      virtual_transport = lmtp:unix:/var/spool/kopano/dagent.sock
      virtual_alias_maps = mysql:/etc/postfix/mysql-users.cf
      

      mysql-users.cf

      user = kopano-server
      password = xxxxxxxxxxxxxxxxxxx
      hosts = 127.0.0.1
      dbname = kopanoserver
      query = select value from objectproperty where objectid=(select objectid from objectproperty where value='%s' limit 1) and propname='loginname';
      

      If I try to send a mail to rob@po.<mydomain> I get a bounce of no such user from postfix:

      This is the mail system at host po.mydomain.
      
      I'm sorry to have to inform you that your message could not
      be delivered to one or more recipients. It's attached below.
      
      For further assistance, please send mail to postmaster.
      
      If you do so, please include this problem report. You can
      delete your own text from the attached returned message.
      
                         The mail system
      
      <rob@po.mydomain>: unknown user: "rob"
      

      However if I run the query manually:

      select objectid from objectproperty where value='rob@po.<mydomain>' limit 1;
      

      I get:
      “1” returned.
      Then I run

      I get:

      MariaDB [kopanoserver]> select value from objectproperty where objectid=1 and propname='loginname';
      +-------+
      | value |
      +-------+
      | rob   |
      +-------+
      1 row in set (0.001 sec)
      

      is this the correct output? I’m sure I’m missing something simple but I can’t figure out why

      IShouldHaveBeenAQATester 1 Reply Last reply Reply Quote 0
      • IShouldHaveBeenAQATester
        IShouldHaveBeenAQATester @IShouldHaveBeenAQATester last edited by IShouldHaveBeenAQATester

        @ishouldhavebeenaqatester
        I think I have this solved!

        After reading more on postfix, the logs were showing local delivery, so I changed

        virtual_transport = lmtp:127.0.0.1:2003
        

        to

        mailbox_transport = lmtp:127.0.0.1:2003
        

        So you my ask next: Why not use:

        mailbox_transport = lmtp:unix:/var/spool/kopano/dagent.sock
        

        ?

        Note: I also had to change /etc/kopano/dagent.cfg to also run on 127.0.0.1:2003

        When postfix runs chrooted, it won’t have access to the socket that runs non-chrooted, so 127.0.0.1:2003 is a safer bet.

        I hope this can help someone.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post