nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Synchronization Problem


From: Kevin Cosgrove
Subject: Re: Synchronization Problem
Date: Fri, 24 Jul 2020 09:47:15 -0700

Hi Norman,

I've used fetchmail, and didn't need to resort to what you're doing. Here's the gist of my fetchmailrc (without indentation)

set logfile /var/log/fetchmail
set daemon 300
set postmaster "windomain/kevin"
poll lookout.comp(without indentation)anyname.com protocol IMAP:
folder INBOX;
keep; # doesn't work with '-a'
mda "slocal -verbose"
password "imappassword";

slocal would drop my mail into /var/mail/spool/kevin from which I could grab it with inc.  My setup was more complicated than that actually, as I used spamassassin. My .maildelivery, used by slocal, would filter expected spam into a spam spool file.  I also had email from lists such as this tagged and deposited into a list spool file.

I have a ~/.xmhcheck file containing (without indentation)

inbox /var/spool/mail/kevin
grey /login/kevin/Mail/spamspool
lists /login/kevin/Mail/listspool

Something in xmh, exmh, or inc would grab mail from those spools and deposit it into the right email folders as numbered messages. I've lost track of how that worked.

The email server machine that I ran for 10-15 years died about 18 months ago, and I've only partially resurrected what I used to do, as I want to get on board with all the new fangled email security goodies out there for servers, e.g. TLS. Why that matters to you is that I don't have a complete picture for you to get this working using our preexisting mail tools. Maybe someone else will be able to help fill in the gaps?

Best-o-luck, and stay healthy!
Kevin


On Fri, Jul 24, 2020 at 9:04 AM <norm@dad.org> wrote:
fetchmail runs off a deamon and deposits emails which are in fine nmh format
but do not have a numeric names. So I run this script:

___________________
#!/bin/bash
newmh
dir=/home/norm/fetchdir/new
#for i in "$dir"/*
while true
do
  yes="no"
  for i in $(find $dir -mindepth 1 -type f)
    do
        refile -file $i +neo
        yes=true
     done
  test $yes == true && refile all -src +neo +inbox && spiel 2 mail
  sleep 300
done
_______________

Note 1: newmh is a bash function:
______________
newmh ()
{
    local oldContext="${MHCONTEXT-context}";
    local path=`mhpath +`;
    export MHCONTEXT=,"$oldContext.$$";
    cp "$path/$oldContext" "$path/$MHCONTEXT"
}
_______________

Note 2: spiel is a perl script which ultimately calls paplay, a pulseaudio
utility; paplay gives me no control over its timing or anyway to know
when it's done.

My problem is thatI and this script can step on each other's toes.

For example, I might interactively do:

scan +inbox
rmm last

But after the scan is complete and before I do the rmm, the script might
have put a new message in +inbox, which rmm would remove.

What to do??


    Norman Shapiro



reply via email to

[Prev in Thread] Current Thread [Next in Thread]