Postfix Übergabe an Kopano / Postfix-Kopano connection
-
Hallo Kollegen,
ich betreibe einen kleinen Kopano-Server für meine privaten E-Mail Adressen.
Seit einiger Zeit habe ich Probleme mit erhöhtem Spam-Aufkommen und daher habe ich beschlossen mir einen Spam-Filter zu installieren.Ich habe Spamassassine, Amavis und inotify-spamlearn installiert und versuche das jetzt ans Laufen zu kriegen.
Leider habe ich da einige Verständnisprobleme.Bisher habe ich die Mails mit Fetchmail abgeholt und in der fetchmailrc via
mda “/usr/sbin/kopano-dagent userxyz”
an Kopano übergeben. Das hat problemlos funktioniert.
Zum Versenden von Mails habe ich Postfix eingesetzt.Durch die Installation von Spamassassin und Amavis sowie einer zweiten Instanz von Postfix, habe ich jetzt das Problem, dass zwar ausgehende Mails gescannt werden, aber keine eingehenden.
Wenn ich richtig informiert bin, dann muss ich zum Scannen von eingehenden Mails, diese auch an Postfix übergeben.
Das kann ich auch machen, indem ich die Zeile: mda “/usr/sbin/kopano-dagent userxyz” in der fetchmailrc auskommentiere.
Leider kommen dann keine E-Mails mehr im Webinterface an.
Eigentlich müsste Postfix nach dem Scannen der Mails diese „nur“ an den Kopano-dagent übergeben und dann sollte es doch eigentlich wieder genauso funktionieren wie bisher.
Oder liege ich da falsch?Bisher:
Fetchmail --> Kopano-dagent --> Kopano PostfachNeu:
Fetchmail --> Postfix --> Spam-Scan --> Postfix Port 10025 --> Kopano-dagent --> Kopano PostfachHabe ich einen Denkfehler?
Gibt es vielleicht eine einfachere Möglichkeit?
Ich bin für jeden Tipp und jede Hilfe dankbar!Englisch:
Hello fellow colleagues,
I run a small Kopano server for my private email addresses.
For some time now I have problems with increased spam and so I decided to install a spam filter.I have installed Spamassassine, Amavis and inotify-spamlearn and am now trying to get it work.
Unfortunately I have some problems understanding.So far I have fetched the mails with Fetchmail and via fetchmailrc
mda “/ usr / sbin / kopano-dagent userxyz”
handed over to Kopano. That worked without a problem.
I used Postfix to send mail.By installing Spamassassin and Amavis as well as a second instance of Postfix, I now have the problem that outgoing mails are scanned but no incoming ones.
If I am correctly informed, then to scan incoming mail, I have to pass it on to Postfix.
I can also do this by commenting out the line: mda “/ usr / sbin / kopano-dagent userxyz” in fetchmailrc.
Unfortunately, emails no longer arrive in the web interface.
After scanning the mails, Postfix should “only” pass them on to the Kopano-dagent and then it should actually work the same way as before.
Or am I wrong?So far:
Fetchmail --> Kopano-dagent --> Kopano mailboxNew:
Fetchmail --> Postfix --> Spam scan --> Postfix port 10025 --> Kopano-dagent --> Kopano mailboxDo I have a mistake in thinking?
Is there perhaps an easier way?
I am grateful for every tip and every help! -
@lendl said in Postfix Übergabe an Kopano / Postfix-Kopano connection:
If I am correctly informed, then to scan incoming mail, I have to pass it on to Postfix.
If I remember correctly, there was still a way to scan messages in fetchmail for spam before passing it on to the lda, but a quick search did not give the right results.
@lendl said in Postfix Übergabe an Kopano / Postfix-Kopano connection:
Unfortunately, emails no longer arrive in the web interface.
Here it would be interesting to look into the postfix logging as o where he delivers the mail to instead. My guess is he is relaying it back to your mail provider because postfix does not know it should accept mails/deliver mail locally for your domain.
PS: this is an english speaking community so duplicating your post in another language is not really necessary. Don’t be afraid to post in english, the minority of users here are native english speakers and errors happen.
-
Thanks for your quick reply.
A look at /var/log/mail.log shows that the mails are actually being sent back.
So you are right with your assumption.Fetchmail picks up the mails and passes them on to postfix. However, the correct recipient address is not shown in the log file, but the name of the Fetchmail user (catcher@localhost).
May 11 09:42:03 zar-04 amavis[1116]: (01116-09) Passed CLEAN {RelayedInbound}, [::1]:40760 [62.152.165.151] <prvs=04008ace7e=absender@domain.de> -> <catcher@localhost>, Queue-ID: 1C6A341428, Message-ID: <5F8D0516650D5A4D986FD9B2F72ECA430212FD7BBD@vaf30.vaf.local>, mail_id: zLwtY38lEtC6, Hits: 0.012, size: 33375, queued_as: 086A24762A, 869 ms May 11 09:42:03 zar-04 postfix/smtp[7411]: 1C6A341428: to=<catcher@localhost>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.93, delays=0.05/0.01/0/0.87, 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 086A24762A) May 11 09:42:03 zar-04 postfix/qmgr[7158]: 1C6A341428: removed May 11 09:42:03 zar-04 postfix/local[7403]: 086A24762A: to=<catcher@localhost>, relay=local, delay=0.02, delays=0.01/0/0/0.01, dsn=5.4.6, status=bounced (mail forwarding loop for catcher@localhost) May 11 09:42:03 zar-04 postfix/cleanup[7404]: 0CC7D47633: message-id=<20200511074203.0CC7D47633@zar-04> May 11 09:42:03 zar-04 postfix/bounce[7415]: 086A24762A: sender non-delivery notification: 0CC7D47633 May 11 09:42:03 zar-04 postfix/qmgr[7158]: 0CC7D47633: from=<>, size=35621, nrcpt=1 (queue active) May 11 09:42:03 zar-04 postfix/qmgr[7158]: 086A24762A: removed
Postfix obviously does not recognize the recipient email address or does not pass the email on to the Kopano-dagent.
In /etc/postfix/main.cf the entry should actually:
mailbox_command = / usr / sbin / kopano-dagent “$ USER”
do it, or am I wrong? -
@lendl said in Postfix Übergabe an Kopano / Postfix-Kopano connection:
mailbox_command
I would rather recommend to use lmtp for the final delivery. The documentation explains how.
@lendl said in Postfix Übergabe an Kopano / Postfix-Kopano connection:
but the name of the Fetchmail user (catcher@localhost).
You can specify in your fetchmailrc where to deliver to locally. e.g.
is "jsmith" here;