lefcha / imapfilter

IMAP mail filtering utility
MIT License
844 stars 93 forks source link

Imapfilter does not work on Gmail - no real commands executed #280

Open hron84 opened 8 months ago

hron84 commented 8 months ago

I have a following Imapfitler script:

options.subscribe = true
options.timeout = 3600

account1 = IMAP {
    server = 'imap.gmail.com',
    username = 'me@company.com',
    password = '****',
    ssl = 'auto',
}

account1:create_mailbox('GCDS/2023')
account1:subscribe_mailbox('GCDS/2023')

results = account1['GCDS']:arrived_before('01-Jan-2024')

results:move_messages(account1['GCDS/2023'])

The -v output:

S (4): * OK Gimap ready for requests from 2a01:36d:114:a503:6232:504f:15b7:a985 b9mb178907942wrf
C (4): 1000 NOOP
S (4): 1000 OK Nothing Accomplished. b9mb178907942wrf
C (4): 1001 CAPABILITY
S (4): 1001 OK Thats all she wrote! b9mb178907942wrf
C (4): LOGIN * *
S (4): 1002 OK me@company.com authenticated (Success)
C (4): 1003 CAPABILITY
S (4): 1003 OK Success
C (4): 1004 NAMESPACE
S (4): 1004 OK Success
C (4): 1005 LOGOUT
S (4): 1005 OK 73 good day (Success)

No error message, just it does not create either the mailbox, or do the search. I have a few thousands of mails in this folder, I cannot archive it from the common GMail interfaces. Could you help me what goes wrong?

Version: IMAPFilter 2.8.2 Copyright (c) 2001-2023 Eleftherios Chatzimparmpas

lefcha commented 5 months ago

Hm, that is really weird... I'm running imapfilter on a Gmail account daily for the past years, and it works fine.

Where are you storing this config? Is it the default ~/imapfilter/config.lua or somewhere else? What do you get if you do:

$ imapfilter -v -c config.lua -d debug.log

Do you get any more info in the debug.log file?