Kopano Z-Push wont send E-Mails

german
kopano

#1

Ich habe das Problem, dass es mir nicht möglich ist, über Z-Push (sprich vom Handy) eine E-Mail an einen entfernten Empfänger zu senden.

in meiner Konfiguration reicht postfix die E-Mails an ein Mailrelay weiter.

Jun 24 16:10:32 ucs kopano-spooler[84114]: Starting kopano-spooler version 8.7.1 (pid 84114 uid 998)
Jun 24 16:10:32 ucs kopano-spooler[84114]: RCPT line gave SMTP error 550 relay not permitted. (no retry)
Jun 24 16:10:32 ucs kopano-spooler[84114]: SMTP: Error while executing command ‘DATA’. Response: 503 All RCPT commands were rejected with this error:#012relay not permitted#012Valid RCPT command must precede DATA
Jun 24 16:10:32 ucs kopano-spooler[84114]: E-mail for user timo could not be sent, notifying user: cancel message (40580)

das senden mittels WebApp sowie über Thunderbird klappt aber Problemlos.
Hat jemand eine Idee, warum der Kopano-spooler wenn er über zpush angesprochen wird nicht an das Mailrelay weiterleitet?


Some problems with the Kopano Core edition
#2

Hi @Tw33ki,

did you make any manual changes to the z-push configuration after the app install?

In the end both WebApp and z-push use the same functionality internally for sending mails, so there should be no difference between the two.


#3

I’m very sorry. U are right, Webapp wont work also with same failure.
So i need to teach some mailrelay to kopano-spooler? Isnt it using postfix-smtp?

Thunderbird-SMTP out still working.

… root@ucs:/etc/postfix# ucr get mail/relayauth
yes
root@ucs:/etc/postfix# ucr get mail/relayhost
smtprelaypool.ispgateway.de:587

and postmap smtp_auth i did again (didnt had an effect)


#4

Yes it is. So when you can send mails from thunderbird it should work from other clients as well. Some more postfix logging is probably helpful for further troubleshooting.


#5

dear fbartels,
thanks for ur help.
Here it will come some more logs:

Test from Thunderbird:

Jun 26 08:20:21 ucs postfix/smtpd[93269]: connect from unknown[192.168.178.29]
Jun 26 08:20:21 ucs postfix/smtpd[93269]: 76BD9187E09: client=unknown[192.168.178.29], sasl_method=PLAIN, sasl_username=timo@xxx.de
Jun 26 08:20:21 ucs postfix/cleanup[93272]: 76BD9187E09: message-id=<739606d0-1b0c-dd8c-7c2a-64882ffabe9e@xxx.de>
Jun 26 08:20:21 ucs postfix/qmgr[82652]: 76BD9187E09: from=<timo@xxx.de>, size=37769, nrcpt=1 (queue active)
Jun 26 08:20:21 ucs postfix/smtp[93273]: warning: database /etc/postfix/tls_policy.db is older than source file /etc/postfix/tls_policy
Jun 26 08:20:21 ucs postfix/smtpd[93276]: connect from localhost[127.0.0.1]
Jun 26 08:20:21 ucs postfix/smtpd[93276]: D4022187E11: client=localhost[127.0.0.1], orig_queue_id=76BD9187E09, orig_client=unknown[192.168.178.29]
Jun 26 08:20:21 ucs postfix/cleanup[93272]: D4022187E11: message-id=<739606d0-1b0c-dd8c-7c2a-64882ffabe9e@xxx.de>
Jun 26 08:20:21 ucs postfix/smtpd[93276]: disconnect from localhost[127.0.0.1] ehlo=1 xforward=1 mail=1 rcpt=1 data=1 quit=1 commands=6
Jun 26 08:20:21 ucs postfix/qmgr[82652]: D4022187E11: from=<timo@xxx.de>, size=38233, nrcpt=1 (queue active)
Jun 26 08:20:21 ucs amavis[84103]: (84103-06) Passed CLEAN {RelayedOutbound}, LOCAL [192.168.178.29]:58634 <timo@xxx.de> -> <irgendwas@test.de>, Queue-ID: 76BD9187E09, Message-ID: <739606d0-1b0c-dd8c-7c2a-64882ffabe9e@xxx.de>, mail_id: 19mxOlFHjf7b, Hits: -0.988, size: 37768, queued_as: D4022187E11, 230 ms
Jun 26 08:20:21 ucs postfix/smtp[93273]: 76BD9187E09: to=<irgendwas@test.de>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.43, delays=0.18/0.01/0/0.23, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as D4022187E11)
Jun 26 08:20:21 ucs postfix/qmgr[82652]: 76BD9187E09: removed
Jun 26 08:20:21 ucs postfix/smtp[93277]: warning: database /etc/postfix/tls_policy.db is older than source file /etc/postfix/tls_policy
Jun 26 08:20:21 ucs postfix/smtpd[93269]: disconnect from unknown[192.168.178.29] ehlo=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=6
Jun 26 08:20:22 ucs postfix/smtp[93277]: D4022187E11: to=<irgendwas@test.de>, relay=smtprelaypool.ispgateway.de[80.67.29.4]:587, delay=0.39, delays=0.02/0.01/0.27/0.09, dsn=2.0.0, status=sent (250 OK id=1hg1I6-0006UZ-5k)
Jun 26 08:20:22 ucs postfix/qmgr[82652]: D4022187E11: removed
Jun 26 08:20:22 ucs kopano-gateway[584]: Client disconnected

TEST FROM WebAPP

Jun 26 08:21:22 ucs kopano-spooler[93393]: Starting kopano-spooler version 8.7.1 (pid 93393 uid 998)
Jun 26 08:21:22 ucs kopano-spooler[93393]: RCPT line gave SMTP error 550 relay not permitted. (no retry)
Jun 26 08:21:22 ucs kopano-spooler[93393]: SMTP: Error while executing command 'DATA'. Response: 503 All RCPT commands were rejected with this error:#012relay not permitted#012Valid RCPT command must precede DATA
Jun 26 08:21:22 ucs kopano-spooler[93393]: E-mail for user timo could not be sent, notifying user: cancel message (40580)

#6

Thunderbird authenticates itself with the mail server, therefore the mail server allows relaying to arbitrary destinations (the line with sasl_method).

The Kopano spooler, on the other hand, doesn’t authenticate. This is normal. In regular setups Postfix allows relaying to arbitrary destinations if the connection comes from the localhost addresses (127.0.0.1 or ::1). That’s what the spooler relies on. In your case it seems Postfix was configured not to allow relaying from localhost.

Please post the output of

postconf mynetworks
ucr search --brief mail/postfix/mynetworks

#7

So thunderbird is authenticating to postfix and not to kopano-spooler.

heres my output:

root@ucs:/home/Administrator# postconf mynetworks
mynetworks = 192.168.178.0/24, 127.0.0.0/8
root@ucs:/home/Administrator# ucr search --brief mail/postfix/mynetworks
mail/postfix/mynetworks: 192.168.178.0/24, 127.0.0.0/8
mail/postfix/mynetworks_style: <empty>

server’s ip-adress is 192.168.178.100

thank you


#8

You haven’t posted log files from Postfix while trying to send a mail via Kopano (you only provided logs for Kopano’s spooler for that case), therefore I’m guessing that the spooler connects via the IPv6 localhost address, ::1. Your Postfix configuration only allows the IPv4 localhost address, 127.0.0.1.

You can change that by running

ucr mail/postfix/mynetworks='192.168.178.0/24, 127.0.0.0/8, [::1]/128'
postfix reload

#9
ucr **set** mail/postfix/mynetworks='192.168.178.0/24, 127.0.0.0/8, [::1]/128'
postfix reload
root@ucs:/home/Administrator# ucr set mail/postfix/mynetworks='192.168.178.0/24, 127.0.0.0/8, [::1]/128'
Setting mail/postfix/mynetworks
Multifile: /etc/postfix/main.cf
Module: kopano-cfg
root@ucs:/home/Administrator# postfix reload
postfix: Postfix is running with backwards-compatible default settings
postfix: See http://www.postfix.org/COMPATIBILITY_README.html for details
postfix: To disable backwards compatibility use "postconf compatibility_level=2" and "postfix reload"
postfix/postfix-script: refreshing the Postfix mail system
root@ucs:/home/Administrator#




here some more logs with postfix: 
Jun 27 16:23:31 ucs postfix[117651]: Postfix is running with backwards-compatible default settings
Jun 27 16:23:31 ucs postfix[117651]: See http://www.postfix.org/COMPATIBILITY_README.html for details
Jun 27 16:23:31 ucs postfix[117651]: To disable backwards compatibility use "postconf compatibility_level=2" and "postfix reload"
Jun 27 16:23:31 ucs postfix/postfix-script[117657]: refreshing the Postfix mail system
Jun 27 16:23:31 ucs postfix/master[46686]: reload -- version 3.1.9, configuration /etc/postfix
Jun 27 16:23:48 ucs postfix/smtpd[117674]: connect from localhost[127.0.0.1]
Jun 27 16:23:48 ucs postfix/smtpd[117674]: 982B41896CB: client=localhost[127.0.0.1]
Jun 27 16:23:48 ucs postfix/cleanup[117678]: 982B41896CB: message-id=<27062019141432449221000-1@central.octogate.de>
Jun 27 16:23:48 ucs postfix/qmgr[117662]: 982B41896CB: from=<marketing@octogate.de>, size=14871, nrcpt=1 (queue active)
Jun 27 16:23:48 ucs postfix/smtp[117679]: warning: database /etc/postfix/tls_policy.db is older than source file /etc/postfix/tls_policy
Jun 27 16:23:48 ucs postfix/smtpd[117674]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Jun 27 16:23:50 ucs postfix/smtpd[117682]: connect from localhost[127.0.0.1]
Jun 27 16:23:50 ucs postfix/smtpd[117682]: 101781896CC: client=localhost[127.0.0.1], orig_queue_id=982B41896CB, orig_client=localhost[127.0.0.1]
Jun 27 16:23:50 ucs postfix/cleanup[117678]: 101781896CC: message-id=<27062019141432449221000-1@central.octogate.de>
Jun 27 16:23:50 ucs postfix/smtpd[117682]: disconnect from localhost[127.0.0.1] ehlo=1 xforward=1 mail=1 rcpt=1 data=1 quit=1 commands=6
Jun 27 16:23:50 ucs postfix/qmgr[117662]: 101781896CC: from=<marketing@octogate.de>, size=15700, nrcpt=1 (queue active)
Jun 27 16:23:50 ucs amavis[109592]: (109592-09) Passed CLEAN {RelayedInternal}, LOCAL [127.0.0.1]:45068 [212.8.219.116] <marketing@octogate.de> -> <timo@xxxxx.de>, Queue-ID: 982B41896CB, Message-ID: <27062019141432449221000-1@central.octogate.de>, mail_id: 3a9Twr2m_b-h, Hits: 0.688, size: 14870, queued_as: 101781896CC, 1380 ms
Jun 27 16:23:50 ucs postfix/smtp[117679]: 982B41896CB: to=<timo@xxxxx.de>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.5, delays=0.08/0.01/0/1.4, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 101781896CC)
Jun 27 16:23:50 ucs postfix/qmgr[117662]: 982B41896CB: removed
Jun 27 16:23:50 ucs kopano-dagent[117684]: renovate_encoding: reading data using charset "us-ascii" produced partial results: Invalid or incomplete multibyte or wide character
Jun 27 16:23:50 ucs postfix/lmtp[117683]: 101781896CC: to=<timo@xxxxx.de>, relay=127.0.0.1[127.0.0.1]:2003, delay=0.26, delays=0.02/0.01/0.05/0.19, dsn=2.1.5, status=sent (250 2.1.5 timo@xxxxx.de Ok)
Jun 27 16:23:50 ucs postfix/qmgr[117662]: 101781896CC: removed
Jun 27 16:23:51 ucs kopano-spooler[117688]: Starting kopano-spooler version 8.7.1 (pid 117688 uid 998)
Jun 27 16:23:51 ucs kopano-spooler[117688]: RCPT line gave SMTP error 550 relay not permitted. (no retry)
Jun 27 16:23:51 ucs kopano-spooler[117688]: SMTP: Error while executing command 'DATA'. Response: 503 All RCPT commands were rejected with this error:#012relay not permitted#012Valid RCPT command must precede DATA
Jun 27 16:23:51 ucs kopano-spooler[117688]: E-mail for user timo could not be sent, notifying user: cancel message (40580)
root@ucs:/home/Administrator#


thanks!

#10

Soooo… your spooler doesn’t use the local SMTP server at all but another one. Let’s see the output of

grep smtp_ /etc/kopano/spooler.cfg
ucr search --brief kopano/cfg/spooler

#11
root@ucs:/home/Administrator# grep smtp_ /etc/kopano/spooler.cfg
smtp_server = smtprelaypool.ispgateway.de
smtp_port = 587

root@ucs:/home/Administrator# ucr search --brief kopano/cfg/spooler

… does not give an output


#12

change

smtp_server = [smtprelaypool.ispgateway.de](http://smtprelaypool.ispgateway.de)
smtp_port = 587

to

# smtp_server = [smtprelaypool.ispgateway.de](http://smtprelaypool.ispgateway.de)
# smtp_port = 587

do

systemctl restart kopano-spooler.service

and it will work

rg

Christian


#13

It works now! Thanks for your help!

So kopano-spooler tried to connect Mailrelay directly?