Get mail from old RoundcubeMail

NethServer Version: 7
Module: RoundcubeMail 1.5.2

Hi
I have a mail server that works in some years now with no problem.
To tell the truth I have forgot most how I did to make it work :smiley: but now I was trying to see if I can export my mail from RoundcubeMail to plain textfiles but what I can see this is so old version so it can only export one mail att the time and that is impossible for me.

Then I did try to connect to my thunderbird mail client but no luck
Did find a little mini guide from here
IMAP settings for Outlook and Thunderbird - Support - NethServer Community
But I get no error or anything so nut sure why.
I did look in the dovecot settings and I have enable imap and is port 143 and the service is ok.

I just want to export my mail, even if I have to use terminal but not sure how to do it??

You should use ns8-imapsync to import your emails to a ns8 mail stack

Hmm well maybe, I was not thinking about upgrade my mailserver to Nethserver just yet but maybe?
I did just want to export my mail that is alot of fail2ban that I have collect so I can add the IP address to my new proxy :slight_smile:

1 Like

Do not understand the meaning of retrieving the mail of fail2ban in plain text to use the IP in your new proxy. The ip are most probably obsoletes

Sometime rather to give us what you think is the solution please explain what is the issue

If you want to extract IP from your mail then grep/sed and bash is your friend to extract and populate a list of IP

Still do not get what you want to do :wink:

Since installing my mail server, I’ve been running fail2ban, and over the years, many IP addresses have been banned. I now have nearly 1,000 IP addresses that I plan to add to a blacklist on my proxy server, so I can block them as early as possible. Even if some of the IP addresses are old, it doesn’t matter if I block them anyway, as there’s no guarantee the owners have fixed their issues. What I’ve done is set up fail2ban to send me an email with the IP address and related information every time an address is blocked. This is the data I want to extract so I can import these IP addresses into my proxy’s blacklist.

The idea is to update the blacklist every time I receive a fail2ban report. Currently, fail2ban is set to block IPs for just two weeks. It might be possible to extend the duration, but if I can extract the IPs, I can block them permanently.

That’s why I want to retrieve this data. I only need to do it once, but I haven’t found a command to do this via the command line.

ok you want to invent the wheel again (no offense), this is how crowdsec works, people were asking to me, are you sure that crowdsec works…why ? I have no ban ???

because crowdsec maintains a ban list about 250 000 IP (or more) and share it to you

upgrade to NS8 :stuck_out_tongue:

Hmm ok, I have to see what I going to do :slight_smile:

1 Like

I can answer my own question. I ended up creating a completely new mail server and didn’t move anything over, but for those who want to get their mail out, you can do it with mutt, which you first install and run, for example, this code.
It creates an mbox file of all your emails that you can then download.

mutt -f /var/lib/nethserver/vmail/Your email address/Maildir/ -e 'set mbox_type=mbox; set confirmcreate=no; set delete=no; push "T.*<enter>;s/home/mail.mbox<enter><quit>"'

Don’t forget to add your email address :slight_smile: