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

    Concept configuration of Postfix with Smarthosts

    General Discussion
    5
    39
    8231
    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.
    • fbartels
      fbartels Kopano @hispeed last edited by

      @hispeed said in Concept configuration of Postfix with Smarthosts:

      Since I have changed the postfix config I recieve that error:

      so you combined your postfix configuration with the above from synology and now get these errors? Debugging postfix problems is always easier with the full error message from the mail.log and the main.cf (or the output of postfonf -n )

      Regards Felix

      Resources:
      https://kopano.com/blog/how-to-get-kopano/
      https://documentation.kopano.io/
      https://kb.kopano.io/

      Support overview:
      https://kopano.com/support/

      1 Reply Last reply Reply Quote 0
      • hispeed
        hispeed last edited by hispeed

        Yes that’s right I combined that but I’m not sure if this is the actual config from the Synology which is running. I have the Docker setup from Zarafa4H. Do you know where the config is which is actually running for the Docker setup?

        Mail.log:

        May 25 15:52:19 svgwma-kopa-02 postfix/postfix-script[18371]: starting the Postfix mail system
        May 25 15:52:19 svgwma-kopa-02 postfix/master[18373]: daemon started -- version 3.3.0, configuration /etc/postfix
        May 25 15:52:24 svgwma-kopa-02 postfix/smtpd[18415]: connect from localhost6.localdomain6[::1]
        May 25 15:52:24 svgwma-kopa-02 postfix/trivial-rewrite[18418]: error: open database /etc/kopano/postfix/sender_relay.db: No such file or directory
        May 25 15:52:24 svgwma-kopa-02 postfix/trivial-rewrite[18418]: warning: hash:/etc/kopano/postfix/sender_relay is unavailable. open database /etc/kopano/postfix/s$
        May 25 15:52:24 svgwma-kopa-02 postfix/trivial-rewrite[18418]: warning: hash:/etc/kopano/postfix/sender_relay lookup error for ""<>""
        May 25 15:52:24 svgwma-kopa-02 postfix/trivial-rewrite[18418]: warning: sender_dependent_relayhost_maps lookup failure
        May 25 15:52:24 svgwma-kopa-02 postfix/trivial-rewrite[18418]: warning: hash:/etc/kopano/postfix/sender_relay is unavailable. open database /etc/kopano/postfix/s$
        May 25 15:52:24 svgwma-kopa-02 postfix/trivial-rewrite[18418]: warning: hash:/etc/kopano/postfix/sender_relay lookup error for "XXXXX@hotmail.com"
        May 25 15:52:24 svgwma-kopa-02 postfix/trivial-rewrite[18418]: warning: sender_dependent_relayhost_maps lookup failure
        May 25 15:52:24 svgwma-kopa-02 postfix/smtpd[18415]: NOQUEUE: reject: RCPT from localhost6.localdomain6[::1]: 451 4.3.0 <XXXX@XXXXXX.ch>: Temporary look$
        May 25 15:52:24 svgwma-kopa-02 postfix/trivial-rewrite[18418]: warning: hash:/etc/kopano/postfix/sender_relay is unavailable. open database /etc/kopano/postfix/s$
        May 25 15:52:24 svgwma-kopa-02 postfix/trivial-rewrite[18418]: warning: hash:/etc/kopano/postfix/sender_relay lookup error for ""<>""
        
        1 Reply Last reply Reply Quote 0
        • hispeed
          hispeed last edited by hispeed

          Ok I found the Synology Zarafa4h Docker main.config. Now when I send an e-mail to the adress I can fetch it via Fetchmail and it’s getting flushed. But I don’t recieve it in Kopano ^^. Config should be fine I have corrected it and I don’t recieve any errors right now.
          This is the mail.log I see now after recieving with fetchmail:

          May 26 12:46:47 svgwma-kopa-02 postfix/smtpd[23055]: connect from localhost6.localdomain6[::1]
          May 26 12:46:47 svgwma-kopa-02 postfix/smtpd[23055]: 5E115320DFE: client=localhost6.localdomain6[::1]
          May 26 12:46:47 svgwma-kopa-02 postfix/cleanup[23058]: 5E115320DFE: message-id=<AM4PR08MB118748749C61D00DED07E089FB680@AM4PR08MB1187.eurprd08.prod.outlook.com>
          May 26 12:46:47 svgwma-kopa-02 postfix/qmgr[23017]: 5E115320DFE: from=<MyEMailaddress@hotmail.com>, size=7069, nrcpt=1 (queue active)
          May 26 12:46:47 svgwma-kopa-02 postfix/smtpd[23055]: disconnect from localhost6.localdomain6[::1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
          May 26 12:46:50 svgwma-kopa-02 postfix/smtp[23059]: 5E115320DFE: to=<Emailkopanouser@domain.ch>, relay=mail.XXXX.ch[213.239.XXX.XXX]:25, delay=3, delays=0.$
          May 26 12:46:50 svgwma-kopa-02 postfix/qmgr[23017]: 5E115320DFE: removed
          

          Why is the last line:
          May 26 12:46:50 svgwma-kopa-02 postfix/qmgr[23017]: 5E115320DFE: removed <— Removed! My message???

          1 Reply Last reply Reply Quote 0
          • Gerald
            Gerald last edited by

            The mail is removed because it was delivered to mail.XXXX.ch[213.239.XX.XXX]. If this is not your Kopano server, something is wrong here. Perhaps postfix does not think it is responsible for this domain. Also, why is postfix involved here? If you use fetchmail to get mail and send that to kopano-dagent, postfix should not be involved ?!?

            1 Reply Last reply Reply Quote 0
            • hispeed
              hispeed last edited by hispeed

              I really don’t know why postfix is now involved for recieving mails. Maybe this is a question for Felix?

              Here is my actual config from postfix:

              # See /usr/share/postfix/main.cf.dist for a commented, more complete version
              
              
              # Debian specific:  Specifying a file name will cause the first
              # line of that file to be used as the name.  The Debian default
              # is /etc/mailname.
              #myorigin = /etc/mailname
              
              smtpd_banner = $myhostname ESMTP
              biff = no
              
              # appending .domain is the MUA's job.
              append_dot_mydomain = no
              
              # Uncomment the next line to generate "delayed mail" warnings
              #delay_warning_time = 4h
              
              readme_directory = no
              
              # See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
              # fresh installs.
              compatibility_level = 2
              
              # TLS parameters
              smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
              smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
              smtpd_use_tls=yes
              smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
              smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
              
              # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
              # information on enabling SSL in the smtp client.
              
              # smtpd_relay_restrictions = permit_mynetworks defer_unauth_destination
              myhostname = svgwma-kopa-02.mysubdomain.topleveldomain.com
              mydomain = mydomain.me
              myorigin = $mydomain
              alias_maps = hash:/etc/aliases
              alias_database = hash:/etc/aliases
              virtual_transport = lmtp:[localhost]:2003
              # virtual_mailbox_domains = /etc/kopano/postfix/vdomains
              # virtual_alias_maps = hash:/etc/kopano/postfix/valiases
              mydestination = $myhostname, svgwma-kopa-02, localhost.localdomain, localhost
              # relayhost =
              mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
              smtp_host_lookup = dns, native
              mailbox_size_limit = 0
              recipient_delimiter = +
              inet_interfaces = all
              inet_protocols = all
              message_size_limit = 52428800
              
              #Hinzugefuegt am 24.05.2018 von alter Zarafa Konfiguration
              
              smtpd_client_restrictions = permit_mynetworks
              smtpd_recipient_restrictions = permit_mynetworks reject_invalid_hostname reject_unauth_destination reject_unknown_recipient_domain
              delay_warning_time = 4h
              smtpd_helo_required = yes
              #unknown_local_recipient_reject_code = 450
              maximal_queue_lifetime = 7d
              minimal_backoff_time = 1000s
              maximal_backoff_time = 8000s
              smtpd_recipient_limit = 16
              smtpd_soft_error_limit = 3
              smtpd_hard_error_limit = 12
              smtpd_sender_restrictions = reject_unknown_address
              #relayhosting from provider when running dynamic IP; now we need sasl_auth
              # relayhost = smtp.example.com
              smtp_sasl_auth_enable = yes
              smtp_sasl_password_maps = hash:/etc/kopano/postfix/sasl_passwd
              sender_dependent_relayhost_maps = hash:/etc/kopano/postfix/sender_relay
              smtp_use_tls = yes
              smtp_sasl_security_options = noanonymous
              smtp_sender_dependent_authentication = yes
              smtp_tls_enforce_peername = no
              smtpd_tls_security_level = may
              smtp_helo_timeout = 120s
              

              Here is mail fetchmail config:

              #.fetchmailrc
              set postmaster hispeed@mydomain.ch
              # set no bouncemail
              set no softbounce
              # accounts
              poll server.login-12.hoststar.ch bad-header accept proto imap user loginuser pass password is hispeed@mydomain.ch nokeep fetchall ssl
              

              Right now Fetchmail is showing me that the message is flushed.
              I don’t recieve any mails in Kopano. In mail.log I recieve this:

              May 27 19:52:41 svgwma-kopa-02 postfix/smtpd[30766]: connect from localhost6.localdomain6[::1]
              May 27 19:52:41 svgwma-kopa-02 postfix/smtpd[30766]: 8617A320E75: client=localhost6.localdomain6[::1]
              May 27 19:52:41 svgwma-kopa-02 postfix/cleanup[30769]: 8617A320E75: message-id=<DB5PR08MB119103B83CE312DEB6C608DEFB6F0@DB5PR08MB1191.eurprd08.prod.outlook.com>
              May 27 19:52:41 svgwma-kopa-02 postfix/qmgr[30459]: 8617A320E75: from=<myemailtestsender@hotmail.com>, size=7071, nrcpt=1 (queue active)
              May 27 19:52:41 svgwma-kopa-02 postfix/smtpd[30766]: 9E8DF320E76: client=localhost6.localdomain6[::1]
              May 27 19:52:41 svgwma-kopa-02 postfix/cleanup[30769]: 9E8DF320E76: message-id=<DB5PR08MB11917FBDB3ECAEC234C9F1F3FB6F0@DB5PR08MB1191.eurprd08.prod.outlook.com>
              May 27 19:52:41 svgwma-kopa-02 postfix/qmgr[30459]: 9E8DF320E76: from=<myemailtestsender@hotmail.com>, size=7065, nrcpt=1 (queue active)
              May 27 19:52:41 svgwma-kopa-02 postfix/smtpd[30766]: disconnect from localhost6.localdomain6[::1] ehlo=1 mail=2 rcpt=2 data=2 quit=1 commands=8
              May 27 19:52:45 svgwma-kopa-02 postfix/smtp[30770]: 8617A320E75: to=<mykopanolocaluser@mytopleveldomain.ch>, relay=mail.externalmailserver.ch[XXX.XXX.213.233]:25, delay=3.6, delays=$
              May 27 19:52:45 svgwma-kopa-02 postfix/qmgr[30459]: 8617A320E75: removed
              May 27 19:52:45 svgwma-kopa-02 postfix/smtp[30771]: 9E8DF320E76: to=<mykopanolocaluser@mytopleveldomain.ch>, relay=mail.externalmailserver.ch[XX.2XXX.213.233]:25, delay=3.6, delays=$
              May 27 19:52:45 svgwma-kopa-02 postfix/qmgr[30459]: 9E8DF320E76: removed
              

              Thanks for any help.

              1 Reply Last reply Reply Quote 0
              • hispeed
                hispeed last edited by hispeed

                I have now the configuration in Fetchmail from Gerald but unfortunately i recieve this:

                1 message for USERNAME at webXXX.login-12.hoststar.ch (6689 octets).
                fetchmail: MDA returned nonzero status 75
                reading message webXXXX@webXXX.login-12.hoststar.ch:1 of 1 (6689 octets) not flushed
                

                My questions do I need perl for Fetchmail? Something is probably wrong in the config but which config?
                I don’t get more output from Fetchmail.

                Gerald 1 Reply Last reply Reply Quote 0
                • martimcfly
                  martimcfly @hispeed last edited by martimcfly

                  @hispeed Hej hispeed! Maybe this is something for you?

                  I created a distribution for ARMv7 (RaspberryPi, Odroid) serving all your wishes. Packages for x64 are going to be build after testing.

                  It brings all configuration files and a customized Postfixadmin (managing Kopano and Postfix simultaneously) you can create a standalone mailserver or one which is sending with smarthost (User- or Domainwide) at the same time. Fetchmail is working, too.

                  The installscripts create the ready and running server. All together your done in about 15 minutes.

                  Introduction (Zarafa based)
                  https://pietma.com/zarafa-packages-for-arch-linux-arm/
                  https://pietma.com/zarafa-and-postfix-management/

                  KOPANO BUILD
                  https://pietma.com/run-and-access-zarafa/#comment-1973

                  Current image with Kopano 8.6.1
                  https://repository.pietma.com/nexus/content/sites/archlinux/os/prepared-kopano/

                  Marti

                  1 Reply Last reply Reply Quote 0
                  • hispeed
                    hispeed last edited by

                    Thanks for your post martimcfly. Actually I have a Odroid-C1 but I use it for something different. So I will need the X64 image. But I hope I can get it running on Ubuntu but if don’t get it work I will try your image as soon as it’s available for my platform based on esxi 6.5.

                    1 Reply Last reply Reply Quote 0
                    • Gerald
                      Gerald @hispeed last edited by Gerald

                      @hispeed said in Concept configuration of Postfix with Smarthosts:

                      I have now the configuration in Fetchmail from Gerald but unfortunately i recieve this:

                      1 message for USERNAME at webXXX.login-12.hoststar.ch (6689 octets).
                      fetchmail: MDA returned nonzero status 75
                      reading message webXXXX@webXXX.login-12.hoststar.ch:1 of 1 (6689 octets) not flushed
                      

                      My questions do I need perl for Fetchmail? Something is probably wrong in the config but which config?
                      I don’t get more output from Fetchmail.

                      If you use the way I’m using fetchmail and have suggested it above, postfix should not be involved since it will fetch the mail and directly deliver it using kopano-dagent. So it should work even if your postfix configuration is not correct (which is probably the case :-)

                      As fbartels has mentioned, make sure you change zarafa-dagent to kopano-dagent. My example was copy&pasted from my installation logs and it was still called zarafa at the time.

                      So assuming you are now using

                      poll pop.srv.de proto pop3 user "mylogin" pass "mypass" options ssl smtpaddress localhost forcecr mda "/usr/bin/kopano-dagent -s the-local-kopano-user-id
                      

                      as your configuration, your problem is most likely with kopano-dagent since this is the MDA (mail delivery agent) and your fetchmail complains about an MDA problem. To my knowledge fetchmail does not need perl, and the error message does not in any way suggest that perl would be a problem. I suggest you first check if the executable /usr/bin/kopano-dagent specified is correct (could be in another path on other distros? I’m using ubuntu 16.04) and if this is correct you need to check the logs of kopano-dagent why it fails.

                      To do so, on modern systems with systemd init and current kopano configuration files you need to check the systemd log (journalctl -u kopano-dagent -f -n 20 for example). On older crappy obsolete legacy systems without systemd+journal check /var/log/kopano/ for a dagent log file. You might need to turn up the logging level if not enough can be seen in the log why it fails. This can of course be done in /etc/kopano/dagent.cfg

                      If you use fetchmail the way fbartels has suggested he prefers, this is of course also perfectly fine. But then your postfix server must know for which emails he is directly responsible. Your postfix log above looked like postfix sent the email on to the internet because it did not think it is responsible to locally handle it. There are many ways to configure postfix, I’m using the virtual_ directives to tell postfix for what it is responsible. But there are other ways. If you want to go this route, the options “virtual_mailbox_domains”, “virtual_mailbox_maps”, “virtual_alias_maps” and “virtual_transport” are the most impotant. You need to really learn how to configure postfix though. If you just want to fetch some mails using POP or IMAP and Postfix will alway only be used to send mail to external recipients, using fetchmail + kopano-dagent will be much easier for you.

                      1 Reply Last reply Reply Quote 0
                      • thctlo
                        thctlo last edited by

                        @martimcfly are these scripts anywhere on github? and GPL?
                        Then im not inventing the wheel again, this is a thing i want in debian also.
                        The source code page says 404 to me :-(

                        martimcfly 1 Reply Last reply Reply Quote 0
                        • martimcfly
                          martimcfly @thctlo last edited by martimcfly

                          Sorry for the 404. My Gitlab (SCM) wasn’t updated for a while and I’ve made it private for security reasons. Temporaly of course.

                          The bash-scripts are packed in here…

                          /usr/share/doc/kopano/pietma
                          https://repository.pietma.com/nexus/service/local/repositories/archlinux/content/armv7h/pietma-kopano/kopano-core-8.6.1-1-armv7h.pkg.tar.xz

                          /usr/share/doc/kopano-postfixadmin/pietma/
                          /usr/share/doc/kopano-postfixadmin/example-config/
                          https://repository.pietma.com/nexus/service/local/repositories/archlinux/content/armv7h/pietma-kopano/kopano-postfixadmin-0.45.3-4-any.pkg.tar.xz

                          Please be aware of the fact, that these script have dependencies and asume paths which are only guaranteed with that packages on Archlinux.

                          But you can get a good idea how all this have to be setup to be working.

                          1 Reply Last reply Reply Quote 0
                          • fbartels
                            fbartels Kopano last edited by fbartels

                            When talking about easier user management and appliances I have to throw my “go to” solution Univention into the pot as well: https://www.univention.com/products/univention-app-center/app-catalog/kopano-core/

                            They also have a Fetchmail app so everything can be done from their web ui.

                            Regards Felix

                            Resources:
                            https://kopano.com/blog/how-to-get-kopano/
                            https://documentation.kopano.io/
                            https://kb.kopano.io/

                            Support overview:
                            https://kopano.com/support/

                            1 Reply Last reply Reply Quote 0
                            • thctlo
                              thctlo last edited by

                              @martimcfly thank you very much for these very usefull.

                              @fbartels, thank for the univention link, i’ll have a look at that also.

                              1 Reply Last reply Reply Quote 0
                              • hispeed
                                hispeed last edited by hispeed

                                Hi folks, thanks for your answer…slowly I’m getting closer to the solution.
                                The problem is the dagent. I can’t start it. Is there anything to do in the dagent.cfg? Everything was commented out (auskommentiert).

                                Maybe I can find out more…

                                Mai 30 17:19:27 svgwma-kopa-02 kopano-dagent[17333]: Wed May 30 17:19:27 2018: [info   ] Coredump status left at system default.
                                Mai 30 17:19:27 svgwma-kopa-02 kopano-dagent[17333]: Wed May 30 17:19:27 2018: [info   ] Maximum LMTP threads set to 20
                                Mai 30 17:19:27 svgwma-kopa-02 kopano-dagent[17333]: Wed May 30 17:19:27 2018: [info   ] Listening on *:2003 for LMTP
                                Mai 30 17:19:27 svgwma-kopa-02 kopano-dagent[17333]: Wed May 30 17:19:27 2018: [crit   ] Unable to create socket(10,1,6) port 2003: Address already in use
                                

                                https://forums.zarafa.com/showthread.php?12412-zarafa-7-2-2-dagent-error

                                Same here is there any sample for dagent.cfg?
                                @thctlo i’ts always comming back ;=) 2 years are over and nobody has the problem except from me and you had it? How did you fix it?

                                /etc/kopano/server.cfg <- I have probably some configuration issues also there.

                                For me it looks like that this tutorial is incomplete as always:
                                https://www.pc-howto.com/kopano-der-neue-stern-am-groupwarehimmel-teil-1/
                                https://www.pc-howto.com/kopano-der-neue-stern-am-groupwarehimmel-teil-2/

                                Maybe I’m just to stupid. @martimcfly I go thru your config files by tomorrow.

                                Gerald martimcfly 2 Replies Last reply Reply Quote 0
                                • Gerald
                                  Gerald @hispeed last edited by Gerald

                                  @hispeed

                                  If you run kopano-dagent with the parameter -l, it will bind to port 2003 and wait for connections. [-l = listen mode]

                                  If you start kopano-dagent with a receipient as parameter it will read mail from stdin and then (with proper input which it gets from fetchmail) deliver this single mail to kopano.

                                  If your log says “Unable to create socket, address already in use”, then you already have a kopano-dagent running in listen mode and you are trying to start another one in listen mode. kopano-dagent cannot run twice in listen mode. But you can of course have it running in listen mode and on demand call it in interactive mode from fetchmail.

                                  An empty dagent.cfg should be fine.

                                  1 Reply Last reply Reply Quote 0
                                  • hispeed
                                    hispeed last edited by hispeed

                                    Hi Gerald,

                                    Now I’m more confident with logs and dagent. It looks now fine.

                                    I think that I have a problem in fetchmailrc:

                                    #.fetchmailrc
                                    set syslog;
                                    set postmaster "email_from_root_user_i_created_in_kopano";
                                    # set no bouncemail
                                    set no softbounce;
                                    # accounts
                                    poll webXXX.login-XXX.hoststar.ch proto pop3 user webXXXX pass XXXXXXX options ssl smtpaddress localhost forcecr mda usr/sbin/kopano-dagent -s 4
                                    

                                    This is wrong because of “-s” after kopano-dagent. Do I have to use " " in the syntax if yes, only at mda “usr/sbin/kopano-dagent -s 4”?
                                    Number 4 is because it’s the sql table written number 4 can I use the kopano-login name as well?

                                    When I use it with the username and quotes " " and I have to use the directory “usr/sbin/kopano-dagent -s username”
                                    in “bin” I don’t have a kopano-dagent only in “sbin”.
                                    I always recieve:

                                    root@svgwma-kopa-02:/home/kopano# tail -f /var/log/mail.log
                                    May 31 07:23:46 svgwma-kopa-02 fetchmail[3703]: 1 message for webXXXX at webXXX.login-XX.hoststar.ch (6722 octets).
                                    May 31 07:23:47 svgwma-kopa-02 fetchmail[3703]: reading message webXXXX@webXXX.login-XX.hoststar.ch:1 of 1 (6722 octets) (log message incomplete) <--- WHY Incomplete??? 
                                    May 31 07:23:47 svgwma-kopa-02 fetchmail[3703]: MDA returned nonzero status 75
                                    
                                    

                                    I use the newest Ubuntu server version…

                                    On the other side Kopano Core Delivery Agent with Debug Mode:
                                    The only thing I see which is not correct, is the time. Actually I don’t know why.

                                    EDIT 3:

                                    Mai 31 07:28:03 svgwma-kopa-02 systemd[1]: Started Kopano Core Delivery Agent.
                                    Mai 31 07:28:03 svgwma-kopa-02 kopano-dagent[3816]: Thu May 31 07:28:03 2018: [info   ] [ 3816] Logger process started on pid 3845
                                    Mai 31 07:28:03 svgwma-kopa-02 kopano-dagent[3816]: Thu May 31 07:28:03 2018: [debug  ] [ 3816] StatsClient binding socket
                                    Mai 31 07:28:03 svgwma-kopa-02 kopano-dagent[3816]: Thu May 31 07:28:03 2018: [debug  ] [ 3816] StatsClient bound socket to /tmp/.5bc7b9886cc74b9a.sock
                                    Mai 31 07:28:03 svgwma-kopa-02 kopano-dagent[3816]: Thu May 31 07:28:03 2018: [debug  ] [ 3816] StatsClient thread started
                                    Mai 31 07:28:03 svgwma-kopa-02 kopano-dagent[3816]: Thu May 31 07:28:03 2018: [=======] [ 3816] Starting kopano-dagent version 8.6.80 (pid 3816) (LMTP mode)
                                    Mai 31 07:28:03 svgwma-kopa-02 kopano-dagent[3816]: Thu May 31 07:28:03 2018: [debug  ] [ 3816] Submit thread started
                                    

                                    When I want to list all Kopano users I get this:

                                    root@svgwma-kopa-02:/home/kopano# kopano-cli --list-users
                                    Traceback (most recent call last):
                                      File "/usr/sbin/kopano-cli", line 3, in <module>
                                        import kopano_cli
                                      File "/usr/lib/python2.7/dist-packages/kopano_cli/__init__.py", line 10, in <module>
                                        from MAPI.Tags import PR_EC_STATSTABLE_SYSTEM, PR_DISPLAY_NAME, PR_EC_STATS_SYSTEM_VALUE
                                    ImportError: No module named MAPI.Tags
                                    root@svgwma-kopa-02:/home/kopano# kopano-cli
                                    Traceback (most recent call last):
                                      File "/usr/sbin/kopano-cli", line 3, in <module>
                                        import kopano_cli
                                      File "/usr/lib/python2.7/dist-packages/kopano_cli/__init__.py", line 10, in <module>
                                        from MAPI.Tags import PR_EC_STATSTABLE_SYSTEM, PR_DISPLAY_NAME, PR_EC_STATS_SYSTEM_VALUE
                                    ImportError: No module named MAPI.Tags
                                    root@svgwma-kopa-02:/home/kopano# kopano-cli
                                    

                                    Something is here wrong with the DB or so…

                                    Gerald 1 Reply Last reply Reply Quote 0
                                    • Gerald
                                      Gerald @hispeed last edited by Gerald

                                      @hispeed said in Concept configuration of Postfix with Smarthosts:

                                      I think that I have a problem in fetchmailrc:

                                      This is wrong because of “-s” after kopano-dagent. Do I have to use " " in the syntax if yes, only at mda “usr/sbin/kopano-dagent -s 4”?
                                      Number 4 is because it’s the sql table written number 4 can I use the kopano-login name as well?

                                      Ok, I had “the-local-kopano-user-id” in my example. But that did not mean that you need to dig in the MySQL Database and search for a random hidden usernumber. What is meant by this is just the Username in Kopano.
                                      I don’t know about the new kopano-cli but in kopano-admin this is what is specified as -u and what is listed as Username in kopano-admin -l

                                      When I use it with the username and quotes " " and I have to use the directory “usr/sbin/kopano-dagent -s username”

                                      Why no / in front of /usr? Might work depending on where it is run from, but this looks weird and is an unnecessary reason for it to fail.

                                      in “bin” I don’t have a kopano-dagent only in “sbin”.
                                      I use the newest Ubuntu server version…

                                      Yeah, just mentioned it because this could have been different in other distros. But I’m also using Ubuntu and sbin is correct. Easy to check:

                                      root@myhostname:~# whereis kopano-dagent
                                      kopano-dagent: /usr/sbin/kopano-dagent /usr/share/kopano-dagent /usr/share/man/man8/kopano-dagent.8.gz
                                      

                                      I always recieve:

                                      May 31 07:23:47 svgwma-kopa-02 fetchmail[3703]: reading message webXXXX@webXXX.login-XX.hoststar.ch:1 of 1 (6722 octets) (log message incomplete) <--- WHY Incomplete??? 
                                      May 31 07:23:47 svgwma-kopa-02 fetchmail[3703]: MDA returned nonzero status 75
                                      
                                      

                                      I have no idea. Perhaps remove the -s from the kopano-dagent parameter (this is for silent)
                                      Instead add -v (verbose) or -vv (even more verbose)!

                                      Also add verbose flags to fetchmail, Syntax probably the same (-v or -vv for even more verbosity).

                                      On the other side Kopano Core Delivery Agent with Debug Mode:
                                      The only thing I see which is not correct, is the time. Actually I don’t know why.

                                      I think I had this once too in some log… Don’t remember exactly, but check timedatectl if your timezones are correct.

                                      Output for me is:

                                      root@somehostname:~# timedatectl
                                            Local time: Thu 2018-05-31 23:28:08 CEST
                                        Universal time: Thu 2018-05-31 21:28:08 UTC
                                              RTC time: Thu 2018-05-31 21:28:08
                                             Time zone: Europe/Berlin (CEST, +0200)
                                       Network time on: yes
                                      NTP synchronized: yes
                                       RTC in local TZ: no
                                      
                                      Mai 31 07:28:03 svgwma-kopa-02 kopano-dagent[3816]: Thu May 31 07:28:03 2018: [=======] [ 3816] Starting kopano-dagent version 8.6.80 (pid 3816) (LMTP mode)
                                      Mai 31 07:28:03 svgwma-kopa-02 kopano-dagent[3816]: Thu May 31 07:28:03 2018: [debug  ] [ 3816] Submit thread started
                                      

                                      This looks like the log from the zarafa-dagent in daemon mode. (Parameter -s)
                                      Not sure if the logs from a manually started zarafa-dagent in non-daemon mode will end up here to. At least nothin in the log you quoted.

                                      When I want to list all Kopano users I get this:

                                      root@svgwma-kopa-02:/home/kopano# kopano-cli --list-users
                                      Traceback (most recent call last):
                                        File "/usr/sbin/kopano-cli", line 3, in <module>
                                      ImportError: No module named MAPI.Tags
                                      root@svgwma-kopa-02:/home/kopano# kopano-cli
                                      

                                      Something is here wrong with the DB or so…

                                      Does kopano-admin -l work for you? The error message looks more like you have not installed a required package?

                                      1 Reply Last reply Reply Quote 0
                                      • hispeed
                                        hispeed last edited by hispeed

                                        Hi,

                                        With verbose I recieve this:

                                        fetchmail@svgwma-kopa-02:~$ fetchmail -f fetchmail-accounts
                                        Sat Jun  2 07:43:32 2018: [info   ] Coredump status left at system default.
                                        Sat Jun  2 07:43:32 2018: [11417] [debug  ] StatsClient binding socket
                                        Sat Jun  2 07:43:32 2018: [11417] [debug  ] StatsClient bound socket to /tmp/.32877d08a35722c.sock
                                        Sat Jun  2 07:43:32 2018: [11417] [debug  ] Submit thread started
                                        Sat Jun  2 07:43:32 2018: [11417] [debug  ] StatsClient thread started
                                        Sat Jun  2 07:43:32 2018: [11417] [debug  ] PYTHONPATH = /usr/share/kopano-dagent/python
                                        Sat Jun  2 07:43:32 2018: [11417] [error  ]   Python type: (null)
                                        Sat Jun  2 07:43:32 2018: [11417] [error  ]   Python error: No module named MAPI
                                        Sat Jun  2 07:43:32 2018: [11417] [crit   ] K-1732: Unable to initialize the dagent plugin manager: Unknown error code (1).
                                        Sat Jun  2 07:43:32 2018: [11417] [debug  ] StatsClient terminating
                                        Sat Jun  2 07:43:32 2018: [11417] [debug  ] StatsClient terminated
                                        

                                        I will check if I can update Kopano and test again…

                                        EDIT 1:

                                        I download via wget the newest kopano-core and then made the package and installed it.
                                        This worked fine so far. After the installation the system user on Ubuntu 18.04 had a new Password <- why?

                                        Now when I want to login via Webapp I recieve this error:

                                        Unknown MAPI Error: MAPI_E_NOT_FOUND

                                        When I make this: kopano-admin --create-store hispeed

                                        Then I recieve:

                                        kopano-admin: relocation error: kopano-admin: symbol _ZN2KC21GetAutoAcceptSettingsEP9IMsgStorePbS2_S2_S2_ version KC_8.6.80 not defined in file libmapi.so.1 with link time reference
                                        

                                        It’s getting worser from day to day ;=)…

                                        1 Reply Last reply Reply Quote 0
                                        • hispeed
                                          hispeed last edited by hispeed

                                          Yes yes yes…

                                          I don’t believe it I can now recieve. I updated the whole Ubuntu and restartet. Then I had to change something in the config from Kopano. Attachament stored as File (I made there a change earlier). I’m sure I can switch that to database later.
                                          Restarting everything and now I can recieve e-mails.

                                          Thanks so far for everyone. There are still a few questions open like: why the kopano user gets a new password after update?

                                          Now I have to figure out how I can send E-mails… For this I’m going to use postfix.

                                          Postfix i’m back in trouble :D! Yes something is wrong in my postfix configuration.

                                          Jun  3 16:20:58 svgwma-kopa-02 kopano-server[2270]: message repeated 9 times: [ Error while connecting to search on "file:///var/run/kopano/search.sock"]
                                          Jun  3 16:21:01 svgwma-kopa-02 postfix/pickup[10947]: A6A46320DFE: uid=0 from=<root>
                                          Jun  3 16:21:01 svgwma-kopa-02 postfix/cleanup[10957]: A6A46320DFE: message-id=<20180603162101.A6A46320DFE@svgwma-kopa-02.mydomain.me>
                                          Jun  3 16:21:01 svgwma-kopa-02 postfix/qmgr[10948]: A6A46320DFE: from=<root@mydomain.me>, size=727, nrcpt=1 (queue active)
                                          Jun  3 16:21:01 svgwma-kopa-02 postfix/lmtp[10959]: host localhost[::1] offers SMTPUTF8 support, but not 8BITMIME
                                          Jun  3 16:21:01 svgwma-kopa-02 postfix/lmtp[10959]: A6A46320DFE: to=<root@mydomain.me>, orig_to=<root>, relay=localhost[::1]:2003, delay=0.18, delays=0.03/0.01/0.06/0.07, dsn=5.1.1, status=bounced (host localhost[::1] said: 503 5.1.1 User does not exist (in reply to RCPT TO command))
                                          Jun  3 16:21:01 svgwma-kopa-02 postfix/cleanup[10957]: CE28C320DFF: message-id=<20180603162101.CE28C320DFF@svgwma-kopa-02.mydomain.me>
                                          Jun  3 16:21:01 svgwma-kopa-02 postfix/bounce[10962]: A6A46320DFE: sender non-delivery notification: CE28C320DFF
                                          Jun  3 16:21:01 svgwma-kopa-02 postfix/qmgr[10948]: CE28C320DFF: from=<>, size=2791, nrcpt=1 (queue active)
                                          Jun  3 16:21:01 svgwma-kopa-02 postfix/qmgr[10948]: A6A46320DFE: removed
                                          Jun  3 16:21:01 svgwma-kopa-02 postfix/lmtp[10959]: host localhost[::1] offers SMTPUTF8 support, but not 8BITMIME
                                          Jun  3 16:21:01 svgwma-kopa-02 postfix/lmtp[10959]: CE28C320DFF: to=<root@mydomain.me>, relay=localhost[::1]:2003, delay=0.11, delays=0.01/0/0.06/0.05, dsn=5.1.1, status=bounced (host localhost[::1] said: 503 5.1.1 User does not exist (in reply to RCPT TO command))
                                          Jun  3 16:21:01 svgwma-kopa-02 postfix/qmgr[10948]: CE28C320DFF: removed
                                          
                                          

                                          EDIT: 3
                                          Gerald or someone else:

                                          Do you have a sample of the postfix configuration?

                                          1 Reply Last reply Reply Quote 0
                                          • martimcfly
                                            martimcfly @hispeed last edited by

                                            @hispeed let me know when you need advice

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