Divers question about NS8

NethServer Version: 8.3
Module: a few


Email Rspamd – did we have a solution don’t using the imapsynch? I don’t get it, that the Email System check the outgoing but not the incoming mail also is there no possibility to migrate the existing database of rspamd?

Dolibar – is there a Plan for Migration?

1 Like

Hi

IMAPsync synchronizes imap folders, not incoming mail. Strictly seen, these bypass the built in mail system.

I did suggest a solution a while back using an independant VM or Container to provide imapsync features, and to use postfix as a local MTA to forward the mails to the real smtp incoming queue of NS8 mail. That works, but it was a concrete idea for a user with the same issue as you have.
It was also to provide an idea for the dev team, how a solution could look like.

Not ideal, but a working workaround and also step toward a solution…

My 2 cents
Andy

Here’s my original “idea”:

and confirmed by the user:

:slight_smile:

3 Likes

Thank you very much Andy… i did also thought about this solution but i also thought to go a way that i held my old NS7 just for bringing emails inside the network and then, via imapsynch distribute to the NS8 System. The NS7 is not reachable from the Internet in that idea, just transport Emails from outside WITH the original RSpamd into the LAN and thats all. Till i got a better solution…

1 Like

what i now saw is: Imapsync does not integrate with Piler: messages copied by Imapsync are not archived. So no RspamD, no Archiving by using the NS8 with standard options?

Hi @hucky,

take a look at Proxmox Mail Gateway. I have set this up here as a VM in front of my NS8. I receive the mails via the mail gateway and for a few days now I have also been sending them via it. This has the advantage that the NS8 is no longer the first point of contact from the Internet.

2 Likes

Did you already try the fetchmail app?

3 Likes

Hello Markus, i tried it, but was not successful to bring up, endet 404 page not found error if i try to open the status.fetchmail_webapp
fetchmail.xxxxxxxx.de. Is there maybe somewhere a example to configure it?

Question about Crowdsec, this is not similar to Fail2ban, right? There is no possibility to check things like attempts against apache-auth. etc, right?

Fetchmail setup: GitHub - mrmarkuz/ns8-fetchmail

Crowdsec works similar, see also GitHub - NethServer/ns8-crowdsec and CrowdSec — NS8 documentation

3 Likes

did not see it, sorry. will try it today

@mrmarkuz is there a way to proof if things are running ok? like a manual activating the fetchmail after build the conf ?

I didn’t test but it should work to run the command from the cronjob:

Enter environment:

runagent -m fetchmail1

Enter container:

podman exec -ti fetchmail sh

Run job:

fetchmail -d0 -v -f /etc/fetchmail/fetchmailrc -L /var/log/fetchmail.log

did not work by entering the container is an error no container with name or ID “fetchmail-app” found: no such container
[fetchmail1@ns8 state]$ silly thing, as i start i had a situation that the mail from the testaccount was downloaded but doesn´t reach the mailaccount on NS8. After that i saw i had a error in the ip adress, i changed it and safe the file but then it did not work never again.
this is the config:
poll pop.gmx.net tracepolls proto pop3 uidl auth password port 995 timeout 60
user “xxx@gmx.de” password “password” ssl keep is internns8@mailccount.de smtphost <192.168.100.206>

u think its right?

Sorry, it’s fetchmail instead of fetchmail-app, I corrected my previous post.

You can check the names of the containers by using:

podman ps

hmm, nope, doesn´t work here :frowning:

What exactly is not working? Which error do you get?

Are there containers when you execute podman ps in the user environment?

Did you configure fetchmail once by clicking save in the settings?

by [quote=“mrmarkuz, post:12, topic:25349”]
runagent -m fetchmail1 return is working directory: /home/fetchmail1/.config/state
podman exec -ti fetchmail sh result is / #
fetchmail -d0 -v -f /etc/fetchmail/fetchmailrc -L /var/log/fetchmail.log returns with WARNING: Running as root is discouraged

Are there entries in /var/log/fetchmail.log in the container?

yes, there are, this are the last entry
fetchmail: pop.gmx.net key fingerprint: 1A:EF:49:31:84:6C:87:8D:11:5E:2A:E6:C1:48:08:AF
fetchmail: SSL/TLS: using protocol TLSv1.3, cipher TLS_AES_256_GCM_SHA384, 256/256 secret/processed bits
fetchmail: POP3< +OK POP server ready H migmx002 1MoxX2-1t1KBC3X9a-00pn3k
fetchmail: POP3> USER XXX@gmx.de
fetchmail: POP3< +OK password required for user “XXX@gmx.de
fetchmail: POP3> PASS *
fetchmail: POP3< +OK mailbox “XXX@gmx.de” has 2 messages (272865 octets) H migmx002
fetchmail: POP3> STAT
fetchmail: POP3< +OK 2 272865
fetchmail: POP3> UIDL
fetchmail: POP3< +OK
fetchmail: POP3< 1 1MKK1v-1twgZi0gAx-00XM2m
fetchmail: POP3< 2 1McYL1-1t6V010aSr-00hFf7
fetchmail: POP3< .
fetchmail: 2 messages for XXX@gmx.de at pop.gmx.net (272865 octets).
fetchmail: POP3> LIST 1
fetchmail: POP3< +OK 1 202956
fetchmail: POP3> TOP 1 99999999
fetchmail: POP3< +OK
fetchmail: reading message XXX@gmx.de@pop.gmx.net:1 of 2 (202956 octets) (log message incomplete)
fetchmail: getaddrinfo(“<192.168.100.206>”,“smtp”) error: Name does not resolve
fetchmail: SMTP connect to <192.168.100.206> failed
fetchmail: POP3> QUIT
fetchmail: POP3< This is a multipart message in MIME format.
fetchmail: SMTP transaction error while fetching from XXX@gmx.de@pop.gmx.net and delivering to SMTP host <192.168.100.206>
fetchmail: 6.4.38 querying pop.gmx.net (protocol POP3) at Thu, 13 Feb 2025 15:31:14 +0000 (UTC): poll completed
fetchmail: Query status=10 (SMTP)
fetchmail: normal termination, status 10

i have the wrong SMTP host. which one do i have to use. I pointed to the NS8 Machine

I think you need to remove “<” and “>” from the IP.
I just used them in the docs to show that you need to insert something.