Install the app
How to install the app on iOS

Follow along with the video below to see how to install our site as a web app on your home screen.

Note: This feature may not be available in some browsers.

MailPlus usage as a client

As an Amazon Associate, we may earn commissions from qualifying purchases. Learn more...

3
0
NAS
DS923+
Router
  1. WRX560
Operating system
  1. Windows
Mobile operating system
  1. Android
Dear all,
already 2 month that I look a lot of forums and blogs on the subject but it seems that what I want to do is not common.
So I ask here the community to advise me :)

Problem: I use a personal mailbox on Gmail (nobody is perfect ;-) and my mailbox is quite full 14,5go/15go max

What I would have: continue to be able to make a search on my old email from everywhere with an internet connection.

Solution: I just want to put all mails older than 2 years on mailPlus in my Syno to liberate some GigaO on my Gmail account. Seems simple here.

So I tried different configuration:
-Export emails and the import into syno => never reach
-Configure a mailBox in my syno (I have a personal domain name) and use "pop3 fetch" feature of mailPlus => never reach

So I already spend 8/10 hours to test and evaluate possibilities, I follow a lot of explanations, especially to configure a personal email with plenty of DKIM, DMARC, etc configurations (that are very complex for newbies and reserved for experts I think). I'm little bit disapointed because my problem seems very simple. But I don't find the easy way to do it.
Has somebody already made something like that or solve that question ?

Many thanks
Regards,
Rémy
 
Welcome to the forum.

How do you access Gmail and MailPlus? Is it only via their webmail, or do you use a mail client that accesses both accounts. The easiest way would be to occasionally to manually move messages from the Gmail IMAP mailboxes to the MailPlus IMAP mailboxes, using a mail client. You may even be able to create rules that can be initiated manually to 'archive' but that depends on the mail client. Doing it this way you don't have to be concerned with the SMTP services and sending from one to the other, you're just doing a drag and drop then letting the IMAP server sync their states with their resprective accounts in the mail client.

The process of copying/moving mail messages from one IMAP account to another using a mail client is how I've migrated between mail services in the past.
 
Upvote 0
Welcome to the forum.

How do you access Gmail and MailPlus? Is it only via their webmail, or do you use a mail client that accesses both accounts. The easiest way would be to occasionally to manually move messages from the Gmail IMAP mailboxes to the MailPlus IMAP mailboxes, using a mail client. You may even be able to create rules that can be initiated manually to 'archive' but that depends on the mail client. Doing it this way you don't have to be concerned with the SMTP services and sending from one to the other, you're just doing a drag and drop then letting the IMAP server sync their states with their resprective accounts in the mail client.

The process of copying/moving mail messages from one IMAP account to another using a mail client is how I've migrated between mail services in the past.

Hello Fredbert,

thanks a lot for your answer.
I only use webmail (no client).
If I understand your proposal, it is a third solution. So if I resume the 3 solutions:
S1-Extract from Gmail, convert format of extraction, import into mailPlus
S2-Import directly from Gmail to MailPlus using imap or pop3
S3-Use a client on my computer, IMAP on gmail, and then, IMAP to MailPlus (your proposal)

Am I right ?
S1 and S2 I already tried but It does not work for me... (I'm maybe not enough geek)
For your solution, I can test. Not sure that I will be able to connect Thunderbird with IMAP protocol to my MailPlus but I will see. What I like in your solution is that each moved message disapear from Gmail so no risk of doublons.

Rémy
 
Upvote 0
Last edited:
Basically, yes. it's an alternative way to trying to get one mail service sending message to the other.

MailPlus has IMAP for accessing the message store, as does Gmail. Thunderbird uses IMAP to access an accounts mailboxes. As I see it doing this archiving is a periodic task, so it shouldn't be too onerous to do it manually. Plus you can keep track of where you get to.
 
Upvote 0
Last edited:
For just 20$/ year Google offers the google one upgrade that allows for 100GB of mails.
 
Upvote 0
For just 20$/ year Google offers the google one upgrade that allows for 100GB of mails.
Yes that's right but I buy a Synology so I would like to use it instead of paying again... :-)
[automerge]1712598450[/automerge]
Basically, yes. it's an alternative way to trying to get one mail service sending message to the other.

MailPlus has IMAP for accessing the message store, as does Gmail. Thunderbird uses IMAP to access an accounts mailboxes. As I see it doing this archiving is a periodic task, so it shouldn't be too onerous to do it manually. Plus you can keep track of where you get to.
Ok many thanks. I will try as soon as I have some hours available :-)
 
Upvote 0
Last edited:
Hi,

I do similar what you're trying to achieve using imapsync in Docker: imapsync

Every morning my emails are synced from my Gmail account to MailPlus and then deleted from my Gmail account. It can be configured depending on your needs (see here: GitHub - imapsync) but here's what I have:

  • folder structure:
Code:
volume1
    docker
        imapsync
            imapsync_settings_gmail.txt
            imapsync.sh

  • file 'imapsync_settings_gmail.txt':
Code:
imapsync_gmail;imap.gmail.com;[gmail username];[gmail app-specific password];[nas ip address];[mailplus username];[mailplus password];--port1 993 --ssl1 --port2 993 --ssl2 --addheader --syncinternaldates --nofoldersizes --nofoldersizesatend --noreleasecheck --gmail1 --subfolder2 Gmail --exclude Spam --exclude All --delete1 --noexpungeaftereach;

This is a parameter file that is passed to the shell script below. Some parameters of note:

--gmail1: applies some pre-defined settings specific to Gmail.​
--subfolder2: stores the e-mails in the defined sub-folder (mine is simply called "Gmail").​
--exclude: defines which folders to exclude from the sync. I exclude "Spam" and "All" folders.​
--delete1: deletes all relevant e-mails from Gmail.​
Additional parameters you might want to try:​
--minage 730: does not sync messages newer than 730 days (2 years) old.​
--dry: add this to do a dry-run without actually syncing anything. You can check the logs to see if it would do what you want.​
  • file 'imapsync.sh': shell script to run imapsync using the parameters defined in the file above:
Bash:
#!/bin/sh
#
# $Id: sync_loop_unix.sh,v 1.13 2022/01/09 09:53:47 gilles Exp gilles $

# Example for imapsync massive migration on Unix systems.
# See also http://imapsync.lamiral.info/FAQ.d/FAQ.Massive.txt
#
# Data is supposed to be in file.txt in the following format:
# host001_1;user001_1;password001_1;host001_2;user001_2;password001_2;;
# ...
# The separator is the character semi-colon ";"
# this separator character can be changed to any character
# by changing IFS=';' in the while loop below.
#
# Each line contains 7 columns. These columns are the 6 parameter values
# for the imapsync command options
# --host1 --user1 --password1 --host2 --user2 --password2
# plus an extra column for extra parameters and a trailing fake column
# to avoid CR LF part going in the 7th parameter extra.
# So don't forget the last semicolon, especially on MacOS systems.
#
# You can also add extra options in this script after the variable "$@"
# Those options will be applied in every imapsync run, for every line.

# The imapsync command below is written in two lines to avoid a long line.
# The character backslash \ at the end of the first line is means
# "the command continues on the next line".
#
# Use character backslash \ at the end of each supplementary line,
# except for the last line.
#

# You can also pass extra options via the parameters of this script since
# they will be in "$@". Shell knowledge is your friend.

# The credentials filename "file.txt" used for the loop can be renamed
# by changing "file.txt" below.

# The file file_failures.txt will contain the lines from file.txt that ended
# up in error, for whatever reason. It's there to notice and replay easily
# the failed imapsync runs. Is is emptied at the beginning of the loop run.
# I let you junggle with it.

file=$1
echo Looping on accounts credentials found in $file
echo
line_counter=0
# Empty the error listing
> file_failures.txt
{ while IFS=';' read n h1 u1 p1 h2 u2 p2 extra fake
    do
        line_counter=`expr 1 + $line_counter`
        successMessage="success sync for line $line_counter "
        failureMessage="$n;$h1;$u1;$p1;$h2;$u2;$p2;$extra;"
        { echo "$n" | tr -d '\r' | egrep '^#|^ *$' ; } > /dev/null && continue # this skip commented lines in file.txt
        echo "==== Starting imapsync with --name $n --host1 $h1 --user1 $u1 --host2 $h2 --user2 $u2 $extra $@ ===="

        if docker inspect -f '{{.Config.Image}}' $n >/dev/null 2>&1
        then
            echo "Using existing container: $n"
            if docker start $n
            then
                echo $successMessage
            else
                echo $failureMessage | tee -a file_failures.txt
            fi
        else
            echo "Creating container: $n"
            if docker run --name $n gilleslamiral/imapsync:latest imapsync --host1 "$h1" --user1 "$u1" --password1 "$p1" \
                                                                           --host2 "$h2" --user2 "$u2" --password2 "$p2" $extra
            then
                echo $successMessage
            else
                echo $failureMessage | tee -a file_failures.txt
            fi
        fi
        echo "==== Ended imapsync with --name $n --host1 $h1 --user1 $u1 --host2 $h2 --user2 $u2 $extra $@ ===="
        echo
    done
} < $file

(It's recommended to use 'passfile1' and 'passfile2' instead of 'password1' and 'password2' but I could never get that to work. This is not an issue unless someone else has access to your logs).

The script checks if an imapsync image exists. If not then the latest version is downloaded. Then imapsync is executed. The container is stopped when the sync is completed.

  • User-defined script scheduled to run daily:
Code:
cd /volume1/docker/imapsync
./imapsync.sh imapsync_settings_gmail.txt

This just runs the shell script with the parameter file as input.

This has been running on my NAS for about a year and works great. Hope it helps.
 
Upvote 0

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

Presuming you set the HB backup with compression, that's consistent with what MailPlus server is...
Replies
7
Views
1,241
I've been working on autodiscover today and added the following records: SRV record -...
Replies
2
Views
192
I must be me, been happening since day one. I've tried all of the suggestion, even re installed...
Replies
2
Views
862
Ever since my loved Email client bit the dust, I've been using Synology's Mail plus server as a client. It...
Replies
0
Views
596

Thread Tags

Tags Tags
None

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending content in this forum

Back
Top