Page 1 of 1
Mutt
Posted: Sat Mar 03, 2018 10:06 am
by nhdesign
Hi,
Per mutt_hep.sh I added to my muttrc
set spoolfile="imaps://
[email protected]/INBOX"
set folder="imaps://
[email protected]/INBOX"
After I enter my passwd the following flashes by
Internal error occurred. Refer to server log for more information. [2018-03-02 13:42:27]
After which mutt opens without any mail and this error across the bottom
Error opening mailbox
Thanks,
Vic
Re: Mutt
Posted: Sat Mar 03, 2018 9:03 pm
by scott
nhdesign wrote:Hi,
Per mutt_hep.sh I added to my muttrc
set spoolfile="imaps://
[email protected]/INBOX"
set folder="imaps://
[email protected]/INBOX"
After I enter my passwd the following flashes by
Internal error occurred. Refer to server log for more information. [2018-03-02 13:42:27]
After which mutt opens without any mail and this error across the bottom
Error opening mailbox
Thanks,
Vic
Hi Vic,
This was an error from Dovecot (the IMAP server software) relating to the filename on the mail spool. On our system, the filename caches the size -- if there is a size cached, and it doesn't match the file on disk, Dovecot reports that as an i/o error.
However, it's also supposed to fix the filename on disk to reflect the proper size of the file. If you use mutt again after this, do you still see the same error?
Regarding why the cached size would be different than the actual size of the file, we haven't figured that out yet, but it could be a procmail rule gone awry. I'll dig into that and see if I can find out anything.
-Scott
Re: Mutt
Posted: Sun Mar 04, 2018 6:07 am
by nhdesign
Fetching message headers... 450/517 (87%)
Internal error occurred. Refer to server log for more information. [2018-03-04 06:04:24]
Is there more to change in my muttrc than those two lines?
--
Vic
Re: Mutt
Posted: Sun Mar 04, 2018 6:12 am
by nhdesign
It works.
I kept trying, the fourth or fifth time it worked.
Sending mail is working too.
Re: Mutt
Posted: Sun Mar 04, 2018 6:29 am
by nhdesign
yup, definitely works.
Re: Mutt
Posted: Sun Mar 04, 2018 10:02 am
by nhdesign
#!/bin/sh
#newmail-semaphore
#20180304
# Anyone?
# Little help?
# The script newmail-maildir written by someone a long time ago does not work with imap.
# I have procmail touch $HOME/.mail-semaphore with every mail that arrives.
# Then have this script run every few minutes by crontab and print an alert to the screen.
# It does not work because I don't know what I am doing. Hopefully you see the intent and can fix it.
# Thanks,
# Vic
### check is mail-semaphore has a later timestamp than mail-semaphore-flag
if [[ "$HOME/.mail-semaphore-flag" -lt "$HOME/.mail-semaphore" ]]
then
### printed $HOME/.mail-semaphore to the screen.
cat $HOME/.mail-semaphore > /dev/tty
touch -r $HOME/.mail-semaphore $HOME/.mail-semaphore-flag
fi
### from my .procmailrc
#
# SEMAPHORE=$HOME/.mail-semaphore
#
# :0c
# *
# | head -1 > $SEMAPHORE
#
#
Re: Mutt
Posted: Sun Mar 04, 2018 2:44 pm
by scott
nhdesign wrote:#!/bin/sh
#newmail-semaphore
#20180304
# Anyone?
# Little help?
# The script newmail-maildir written by someone a long time ago does not work with imap.
# I have procmail touch $HOME/.mail-semaphore with every mail that arrives.
# Then have this script run every few minutes by crontab and print an alert to the screen.
# It does not work because I don't know what I am doing. Hopefully you see the intent and can fix it.
# Thanks,
# Vic
### check is mail-semaphore has a later timestamp than mail-semaphore-flag
if [[ "$HOME/.mail-semaphore-flag" -lt "$HOME/.mail-semaphore" ]]
then
### printed $HOME/.mail-semaphore to the screen.
cat $HOME/.mail-semaphore > /dev/tty
touch -r $HOME/.mail-semaphore $HOME/.mail-semaphore-flag
fi
### from my .procmailrc
#
# SEMAPHORE=$HOME/.mail-semaphore
#
# :0c
# *
# | head -1 > $SEMAPHORE
#
#
Hi Vic,
Your script almost works, except it tries to write to the tty associated with the cron job, instead of your login shell. I don't even think cronjobs have terminals attached to them.
I've written a script -- /usr/local/bin/tellme.pl -- which will write whatever is fed to it on stdin to all terminals associated with your login shells. So, whatever you pipe into it should print on your terminal.
Let me know what you think.
-Scott
Re: Mutt
Posted: Mon Mar 05, 2018 4:16 am
by nhdesign
No luck yet.
This line fails.
if [[ "$HOME/.mail-semaphore-flag" -lt "$HOME/.mail-semaphore" ]]
sh.sonic.net:nhdesign:/home/n/nhdesign 30 % newmail-semaphore
/home/n/nhdesign/bin/newmail-semaphore: line 20: [[: /home/n/nhdesign/.mail-semaphore-flag: syntax error: operand expected (error token is "/home/n/nhdesign/.mail-semaphore-flag")
Should this work from the command line or only from within cron?
sh.sonic.net:nhdesign:/home/n/nhdesign 31 % cat $HOME/.mail-semaphore > /usr/local/bin/tellme.pl
/usr/local/bin/tellme.pl: Read-only file system.
#!/bin/sh
#newmail-semaphore
#20180305
### check is mail-semaphore has a later timestamp than mail-semaphore-flag
if [[ "$HOME/.mail-semaphore-flag" -lt "$HOME/.mail-semaphore" ]]
then
### printed $HOME/.mail-semaphore to the screen.
# cat $HOME/.mail-semaphore > /dev/tty
cat $HOME/.mail-semaphore > /usr/local/bin/tellme.pl
touch -r $HOME/.mail-semaphore $HOME/.mail-semaphore-flag
fi
### from my .procmailrc
#
# SEMAPHORE=$HOME/.mail-semaphore
#
# :0c
# *
# | head -1 > $SEMAPHORE
#
Re: Mutt
Posted: Mon Mar 05, 2018 1:35 pm
by scott
nhdesign wrote:No luck yet.
This line fails.
if [[ "$HOME/.mail-semaphore-flag" -lt "$HOME/.mail-semaphore" ]]
sh.sonic.net:nhdesign:/home/n/nhdesign 30 % newmail-semaphore
/home/n/nhdesign/bin/newmail-semaphore: line 20: [[: /home/n/nhdesign/.mail-semaphore-flag: syntax error: operand expected (error token is "/home/n/nhdesign/.mail-semaphore-flag")
Should this work from the command line or only from within cron?
sh.sonic.net:nhdesign:/home/n/nhdesign 31 % cat $HOME/.mail-semaphore > /usr/local/bin/tellme.pl
/usr/local/bin/tellme.pl: Read-only file system.
#!/bin/sh
#newmail-semaphore
#20180305
### check is mail-semaphore has a later timestamp than mail-semaphore-flag
if [[ "$HOME/.mail-semaphore-flag" -lt "$HOME/.mail-semaphore" ]]
then
### printed $HOME/.mail-semaphore to the screen.
# cat $HOME/.mail-semaphore > /dev/tty
cat $HOME/.mail-semaphore > /usr/local/bin/tellme.pl
touch -r $HOME/.mail-semaphore $HOME/.mail-semaphore-flag
fi
### from my .procmailrc
#
# SEMAPHORE=$HOME/.mail-semaphore
#
# :0c
# *
# | head -1 > $SEMAPHORE
#
Hi,
I'll have to take a closer look at your script (got a dental appt. coming up right now), but thought I'd mention that you'll want to use the "|" character for pipes, such as:
Code: Select all
cat $HOME/.mail-semaphore | /usr/local/bin/tellme.pl
Hope that helps?
-Scott