especifica a interface do usuário correta com a opção -u
offlineimap -u Noninteractive.Quiet # right
offlineimap -u NonInteractive.Quiet # WRONG!
Fedora instalado.
# cat /etc/redhat_release | awk ' { print F "> " $0; print ""; }'
Fedora release 14 (Laughlin)
Instalado o offlineimap do yum, porque hoje eu sou preguiçoso.
# yum info offlineimap | awk ' { print F "> " $0; print ""; }'
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Installed Packages
Name : offlineimap
Arch : noarch
Version : 6.2.0
Release : 2.fc14
Size : 611 k
Repo : installed
From repo : fedora
Summary : Powerful IMAP/Maildir synchronization and reader support
URL : http://software.complete.org/offlineimap/
License : GPLv2+
Description : OfflineIMAP is a tool to simplify your e-mail reading. With
: OfflineIMAP, you can read the same mailbox from multiple
: computers. You get a current copy of your messages on each
: computer, and changes you make one place will be visible on all
: other systems. For instance, you can delete a message on your home
: computer, and it will appear deleted on your work computer as
: well. OfflineIMAP is also useful if you want to use a mail reader
: that does not have IMAP support, has poor IMAP support, or does
: not provide disconnected operation.
E eis que toda vez que executo o offlineimap e tento redirecionar a saída em um crontab, isso não funciona. Abaixo está meu .offlineimaprc
.
[general]
ui = TTY.TTYUI
accounts = Personal, Work
maxsyncaccounts = 3
[Account Personal]
localrepository = Local.Personal
remoterepository = Remote.Personal
[Account Work]
localrepository = Local.Work
remoterepository = Remote.Work
[Repository Local.Personal]
type = Maildir
localfolders = ~/mail/gmail
[Repository Local.Work]
type = Maildir
localfolders = ~/mail/companymail
[Repository Remote.Personal]
type = IMAP
remotehost = imap.gmail.com
remoteuser = [email protected]
remotepass = password
ssl = yes
maxconnections = 4
# Otherwise "deleting" a message will just remove any labels and
# retain the message in the All Mail folder.
realdelete = no
[Repository Remote.Work]
type = IMAP
remotehost = server.company.tld
remoteuser = username
remotepass = password
ssl = yes
maxconnections = 4
Eu tentei TTY.TTYUI
, NonInteractive.Quiet
e NonInteractive.Basic
com diferentes variações. Com ou sem redirecionamento, as entradas do crontab que eu tentei causam problemas.
$ crontab -l | awk ' { print F "> " $0; print ""; }'
*/5 * * * * offlineimap >> ~/mail/logs/offlineimap.log 2>&1
*/5 * * * * offlineimap
Eu sempre recebo o mesmo erro ERRO: Nenhum UIs foi encontrado utilizável! . O que estou fazendo errado?
Se você usar a versão 6.3+ do offlineimap, especifique:
offlineimap -u quiet
Eu sei que o OP especificou a versão 6.2, no entanto, alguém procurando o ServerFault e encontrando a resposta acima pode não estar ciente de que os sinalizadores de interface do usuário foram alterados.