-
-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
understanding nametrans #547
Comments
Is this reproducible? |
It happens every single time I sync, I can't see my "Sent" mail because they get deleted |
As soon as offlineimap sync is done? Without any new sync? What deletes them? |
As soon as offlineimap is done and I resync neomutt. Offlineimap itself deletes the mails from my computer |
Also, after it deletes from the "Sent" folder, it creates a new "Sent Mail" folder and starts downloading the same mails that have just been deleted, but these ones are ept in the machine after the sync though. Any idei of why is this happening? |
This sounds like a nametrans issue but I still don't get how emails are deleted. You said offlineimap is done so it's not offlineimap which is deleting the emails. It only sync the deletions back to the server. What's the output of |
Ok, I think I got it. Check your nametrans: local: remote: If you have a folder called |
The output of |
Here's the output of offlineimap --info:
I'll be honest that I don't exactly understand the 'nametrans' part of the config file, and I couldn't figure out what to change based on this output.. I had copied a config file from someone else, and it worked just fine, but I wanted to change 'Sent Mail' to be simply 'Sent', and then I started running into problems |
That's it. nametrans allows to rename folders. It requires one rule to translate folder names from the remote to the local (in the remote section) and another rule to translate in the opposite direction. I'm not sure you can remove the '[Gmail]/Sent Mail' because it's the Gmail name. You should connect to the gmail webmail and remove all the other sent folders and do the same in your local maildir (you might like to make a backup). Currently it's a big mess! Run I think your current nametrans rules are correct to get what you want, now. So, it should be fine on next sync. If not, re-run |
I had to tweak namtrans a little bit, but now that I got how it works I managed to do it (:
Thanks a lot for the help (: |
Thank you for the feedback! |
General informations
offlineimap -V
): offlineimap v7.2.0, imaplib2 v2.57 (bundled), Python v2.7.15, OpenSSL 1.1.0h 27 Mar 2018Configuration file offlineimaprc
[general]
ui = ttyui
accounts = Gmail
[Account Gmail]
localrepository = Gmail-Local
remoterepository = Gmail-Remote
[Repository Gmail-Local]
type = GmailMaildir
localfolders = ~/Mail/Gmail
nametrans = lambda f: '[Gmail]/' + f if f in ['Drafts', 'Starred', 'Important', 'Spam', 'Trash', 'All Mail', 'Sent Mail', 'Sent'] else f
[Repository Gmail-Remote]
type = Gmail
remotehost = imap.gmail.com
ssl = yes
starttls = no
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
auth_mechanisms = XOAUTH2
nametrans = lambda f: f.replace('[Gmail]/', '') if f.startswith('[Gmail]/') else f
Steps to reproduce the error
"Folder Sent [acc: Gmail]:
Syncing Sent: Gmail -> GmailMaildir
Copy message UID 7 (1/149) Gmail-Remote:Sent -> Gmail-Local:Sent
"
[...]
"Folder Sent [remote name [Gmail]/Sent] [acc: Gmail]:
Syncing [Gmail]/Sent: Gmail -> GmailMaildir
Deleting 149 messages (7:155) in GmailMaildir[Sent]
"
The text was updated successfully, but these errors were encountered: