Re: moving messages on imap4 server based on date received

2017-10-08 Thread tech-lists

On Sun, Oct 08, 2017 at 04:35:47PM -0500, Larry Rosenman wrote:

Whether you can run on YOUR server, I do not know, but I've been running 
this script for ~1 year.


Hi, thanks for the script, I've saved it as it may come in useful
one day. Unfortunately I'm not running my own mail server at this
time; I'm using FastMail so need to work around that.

archivemail *nearly* does what's needed, except that it saves to local
disk, whereas what I want is to save it in an archive folder on the
server, without compression or other encoding.

There's an add-on for Thunderbird that does exactly what's needed. It's
called awesome auto-archiver or something like that. Of course the
problem for me there is that it's thunderbird, and I want to run mutt
because it's elegant and lightweight and copes happily with thousands
of emails even on a low-powered netbook.

--
J.


Re: moving messages on imap4 server based on date received

2017-10-08 Thread Larry Rosenman
I use the following cron job on my server using doveadm running on the imap 
server:
lrosenman:~ lrosenman$ ssh tbh.lerctr.org cat bin/archive-mail
#!/bin/sh
PATH=$PATH:/usr/local/bin
#Expects to be run after midnight on the first of the month
#  to archive all the previous months mail
#Date Run:
TODAY=`date "+%Y-%m-%d"`
#last month in /MM
YEAR_LAST_MONTH=`date -v-1d "+%Y/%m"`
#1st of last month as 01-Mon-
FIRST_LAST_MONTH=`date -v-1d "+01-%b-%Y"`
echo 'TODAY=' ${TODAY}
echo 'YEAR_LAST_MONTH=' ${YEAR_LAST_MONTH}
echo 'FIRST_LAST_MONTH=' ${FIRST_LAST_MONTH}
# get a list of all the mailboxes with at least one real message
doveadm -f tab mailbox status vsize \* 2>/dev/null |
sed -e 1d | sort -k 1,1 |
awk  'BEGIN {FS="\t"} {if ($2 > 0)  print $1}' |
while read i
do
   echo `date` start ${i}
   doveadm mailbox create "ARCHIVE/${YEAR_LAST_MONTH}/${i}"
   doveadm -f tab mailbox status messages "${i}"
   doveadm move "ARCHIVE/${YEAR_LAST_MONTH}/${i}" mailbox \
"${i}" BEFORE ${TODAY} SINCE ${FIRST_LAST_MONTH}
   doveadm -f tab mailbox status messages "${i}"
   echo `date` done  ${i}
done
lrosenman:~ lrosenman$

Whether you can run on YOUR server, I do not know, but I've been running this 
script for ~1 year. 


-- 
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 214-642-9640 E-Mail: l...@lerctr.org
US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106
 
 
On 10/8/17, 4:10 PM, "tech-lists"  wrote:

On Thu, Sep 28, 2017 at 03:56:35PM -0400, Dan Ritter wrote:
>On Thu, Sep 28, 2017 at 02:10:22PM +0100, tech-lists wrote:
>> Hello mutt-users@
>>
>> I'm running mutt 1.9.1 (2017-09-22) on freebsd-11-stable.
>>
>> What I'd like to have is, when mutt loads, it scans its subscribed
>> folders and moves the mail based on date received into preconfigured
>> mail folders. Either that, or maybe run another standalone program in a
>> screen or cron that does the same. I don't want to "download" the mail
>> at this stage - it needs to be moved around on the remote server.
>>
>> Can mutt do this, or is there another program that does this with imap4?
>
>If your IMAP server supports SIEVE, that is the easiest way to
>get this done. Sorting will happen at delivery time.

Hi, sorry for the late reply

The reason I can't use SIEVE is because SIEVE rules act at delivery time
only. By delivery time, I mean the time they arrive on the imap server.

What I want to happen is, for emails already in folders on the imap
server, if they're over say 30 days old, for an automatic process to
move them into an archive folder on the same server.

thanks,
-- 
J.





Re: moving messages on imap4 server based on date received

2017-10-08 Thread tech-lists

On Thu, Sep 28, 2017 at 03:56:35PM -0400, Dan Ritter wrote:

On Thu, Sep 28, 2017 at 02:10:22PM +0100, tech-lists wrote:

Hello mutt-users@

I'm running mutt 1.9.1 (2017-09-22) on freebsd-11-stable.

What I'd like to have is, when mutt loads, it scans its subscribed
folders and moves the mail based on date received into preconfigured
mail folders. Either that, or maybe run another standalone program in a
screen or cron that does the same. I don't want to "download" the mail
at this stage - it needs to be moved around on the remote server.

Can mutt do this, or is there another program that does this with imap4?


If your IMAP server supports SIEVE, that is the easiest way to
get this done. Sorting will happen at delivery time.


Hi, sorry for the late reply

The reason I can't use SIEVE is because SIEVE rules act at delivery time
only. By delivery time, I mean the time they arrive on the imap server.

What I want to happen is, for emails already in folders on the imap
server, if they're over say 30 days old, for an automatic process to
move them into an archive folder on the same server.

thanks,
--
J.


Re: moving messages on imap4 server based on date received

2017-09-28 Thread tech-lists

On Thu, Sep 28, 2017 at 03:56:35PM -0400, Dan Ritter wrote:


If your IMAP server supports SIEVE, that is the easiest way to
get this done. Sorting will happen at delivery time.


yep it supports seive, but not every option, hopefully it will support
mive from folder by arrive date, for multiple folders.

thanks,
--
J.


Re: moving messages on imap4 server based on date received

2017-09-28 Thread Dan Ritter
On Thu, Sep 28, 2017 at 02:10:22PM +0100, tech-lists wrote:
> Hello mutt-users@
> 
> I'm running mutt 1.9.1 (2017-09-22) on freebsd-11-stable.
> 
> What I'd like to have is, when mutt loads, it scans its subscribed
> folders and moves the mail based on date received into preconfigured
> mail folders. Either that, or maybe run another standalone program in a
> screen or cron that does the same. I don't want to "download" the mail
> at this stage - it needs to be moved around on the remote server.
> 
> Can mutt do this, or is there another program that does this with imap4?

If your IMAP server supports SIEVE, that is the easiest way to
get this done. Sorting will happen at delivery time.

If your mail server supports procmail, mailfilter, or running
your own delivery programs via a .forward or equivalent, that
is also an easy way to get this done at delivery time.

-dsr-


moving messages on imap4 server based on date received

2017-09-28 Thread tech-lists

Hello mutt-users@

I'm running mutt 1.9.1 (2017-09-22) on freebsd-11-stable.

What I'd like to have is, when mutt loads, it scans its subscribed
folders and moves the mail based on date received into preconfigured
mail folders. Either that, or maybe run another standalone program in a
screen or cron that does the same. I don't want to "download" the mail
at this stage - it needs to be moved around on the remote server.

Can mutt do this, or is there another program that does this with imap4? 


thanks,
--
J.


Moving Messages

2010-04-16 Thread Chuck Smith
Okay I have been using Mutt for a few months with Gmail and love it!

I have a very simple question. When I move a message I use the shortcut
's' and then I have to enter '?' to get to the list of Gmail labels. Is
there anyway to silence that annoying '?' and go straight to the list? 

--
Chuck Smith



signature.asc
Description: Digital signature


Re: Moving Messages

2010-04-16 Thread Michael Elkins

Hi Chuck,

On Fri, Apr 16, 2010 at 02:26:07PM -0400, Chuck Smith wrote:

I have a very simple question. When I move a message I use the shortcut
's' and then I have to enter '?' to get to the list of Gmail labels. Is
there anyway to silence that annoying '?' and go straight to the list?


Sure, just create a macro.  For example:

bind index,pager s 'save-message?'

When you press 's', Mutt will now do the same as if you had type 's' followed 
by '?' previously.


me


pgpl81r2IyN7g.pgp
Description: PGP signature


Re: Moving Messages

2010-04-16 Thread Chuck Smith
On Fri, Apr 16, 2010 at 12:01:32PM -0700, Michael Elkins wrote:
 On Fri, Apr 16, 2010 at 02:26:07PM -0400, Chuck Smith wrote:
 I have a very simple question. When I move a message I use the shortcut
 's' and then I have to enter '?' to get to the list of Gmail labels. Is
 there anyway to silence that annoying '?' and go straight to the list?
 
 Sure, just create a macro.  For example:
 
 bind index,pager s 'save-message?'
 
 When you press 's', Mutt will now do the same as if you had type 's'
 followed by '?' previously.
 

Thanks. That was enough information that set me on the right track. I
ended up using:

macro index,pager s save-message?

Works beautifully. I need to learn more about macros to streamline my
work flow.

Thanks again

--
Chuck


signature.asc
Description: Digital signature


Moving messages...

2001-12-06 Thread Nils Holland

Hi folks,

I hope you won't shout at me because I'm asking my second (presumably)
stupid question in a single day, but let's try:

I have set up a mbox-hook that moves all read messages from my mailbox
folders to somewhere else. However, I'd probably like to move *all*
messages, and not just the read ones.

In short, I'd like it to work like this:

1) I enter a folder containing new messages.
2) I read some of them, but not all.
3) When I leave that folder, I want *all* messages (read and unread) to be
moved to a different location.

Any suggestions on how to do that?

Greetings
Nils



Re: Moving messages...

2001-12-06 Thread Charles Cazabon

Nils Holland [EMAIL PROTECTED] wrote:

 3) When I leave that folder, I want *all* messages (read and unread) to be
 moved to a different location.
 
 Any suggestions on how to do that?

Tag all messages (t, followed by .*), then tagged-move (; followed by s)
to save elsewhere.

Charles
-- 
---
Charles Cazabon [EMAIL PROTECTED]
GPL'ed software available at:  http://www.qcc.sk.ca/~charlesc/software/
---



Re: Moving messages...

2001-12-06 Thread darren chamberlain

Charles Cazabon [EMAIL PROTECTED] said something to this effect on 
12/06/2001:
 Nils Holland [EMAIL PROTECTED] wrote:
  3) When I leave that folder, I want *all* messages (read and unread) to be
  moved to a different location.
  
  Any suggestions on how to do that?
 
 Tag all messages (t, followed by .*), then tagged-move (; followed by s)
 to save elsewhere.

or T~A;s (tag by pattern, ~A is all messages)

(darren)

-- 
Occam's Razor:
The explanation requiring the fewest assumptions is probably the
correct one.



Re: Moving messages...

2001-12-06 Thread Nils Holland

On Thu, Dec 06, 2001 at 11:19:41AM -0600, Charles Cazabon was heard saying:
 darren chamberlain [EMAIL PROTECTED] wrote:
  
  or T~A;s (tag by pattern, ~A is all messages)
 
 Damn shift key :).  I meant T.*;s..., not t.*;s... of course.

Oh yes, that does indeed work! I already thought I was too stupid to get
your first suggestion to work as expected ;-)


Greetings
Nils



Moving messages

2001-09-09 Thread Cliff Sarginson

mmm
Well I looked and looked but I see only a message to
copy a mail message to another folder, not one to move it
(i.e. copy then delete it from source folder).
Am I going blind ?
-- 

Regards
Cliff



Re: Moving messages

2001-09-09 Thread Will Yardley

Cliff Sarginson wrote:
 Well I looked and looked but I see only a message to
 copy a mail message to another folder, not one to move it
 (i.e. copy then delete it from source folder).
 Am I going blind ?

type 's' (to save message).  when you save the message in the target
folder it will be deleted from the source folder.

w

-- 
Sintax error in config file! (line 378)
aborted!

PGP Public Key:
http://infinitejazz.net/will/pgp/



Re: Moving messages

2001-09-09 Thread Ken Weingold

On Sun, Sep  9, 2001, Cliff Sarginson wrote:
 mmm
 Well I looked and looked but I see only a message to
 copy a mail message to another folder, not one to move it
 (i.e. copy then delete it from source folder).
 Am I going blind ?

Save message will copy and mark for deletion.  I think it is bound to
's' by default, though I change it to 'S'.


-Ken



Re: Moving messages

2001-09-09 Thread Cliff Sarginson

On Sun, Sep 09, 2001 at 01:39:59PM -0700, Will Yardley wrote:
 Cliff Sarginson wrote:
  Well I looked and looked but I see only a message to
  copy a mail message to another folder, not one to move it
  (i.e. copy then delete it from source folder).
  Am I going blind ?
 
 type 's' (to save message).  when you save the message in the target
 folder it will be deleted from the source folder.
 
 w
 
ahh, maybe a small tweak to the mutt manual to say save implies
delete from source folder..
Thanks !
-- 

Regards
Cliff



moving messages

2001-07-27 Thread Kalle Hasselström

How can I make a simple command for moving messages between folders? I
don't see how it could be done with a macro that first copies and then
deletes, since copy-message needs an argument from the user (the
destination folder).

-- 
Kalle Hasselström, [EMAIL PROTECTED]

 PGP signature


Re: moving messages

2001-07-27 Thread Christoph Maurer

Am Fre, 27 Jul 2001, schrieb Kalle Hasselström:

 How can I make a simple command for moving messages between folders? I
 don't see how it could be done with a macro that first copies and then
 deletes, since copy-message needs an argument from the user (the
 destination folder).

You can use the save-message command, it does exactly what you want. 

Gruß

Christoph 


-- 
Christoph Maurer - Paul-Röntgen-Straße 7 - D - 52072 Aachen
mailto:[EMAIL PROTECTED] - http://www.christophmaurer.de
On my Homepage: SuSE 7.0 on an Acer Travelmate 508 T Notebook



Re: moving messages

2001-07-27 Thread Ailbhe Leamy

On (27/07/01 07:51), Kalle Hasselström wrote:

 How can I make a simple command for moving messages between folders? I
 don't see how it could be done with a macro that first copies and then
 deletes, since copy-message needs an argument from the user (the
 destination folder).

s saves messages to a different folder. 
T pattern
 - to tag all messages matching a pattern
;s new folder name
 - to move all tagged messages to a new folder

Ailbhe

-- 
Homepage: http://ailbhe.ossifrage.net/



Moving messages

2001-06-06 Thread Gilles CHAUVIN

Hi,

I've subcribed to many mailing-lists and, sometimes for some unknown
reasons, the replies to some messages doesn't appears in the thread.

Is there a way, to select a message and move it inside the thread ?

Thanks for your help.

Gilles.

PS: Excuse me for my bad english ;)



Re: Moving messages

2001-06-06 Thread Christian Lackas

* Gilles CHAUVIN [EMAIL PROTECTED] [010606 17:13]:

Hallo Gilles,

 Is there a way, to select a message and move it inside the thread ?

you can add a In-Reply-To:-Header to the message.

Regards,
 Christian

-- 
Ich lege jetzt letzte Hand an den Rasenmäher...
http://www.lackas.net/ Perl Delphi Linux MP3 Searchengines Domainchecker

 PGP signature


Re: moving messages to other folders

2000-09-12 Thread Suresh Ramasubramanian

Garrick Staples proclaimed on mutt-users that: 

 little arrow).  Did anyone understand that?  It's kinda hard to explain.  
 Kudos to the coder who did that nicety!
 
I know what you mean ;)

 Is there a "move message to a different folder" command?  I have save-hooks 
 setup to copy my various maillist's emails to seperate folders, but that

Press s to save the mail (or c to copy the mail) and enter the folder name (or
tab to display a list of folders)

-- 
Suresh Ramasubramanian + Wallopus Malletus Indigenensis
mallet @ cluestick.org + Lumber Cartel of India, tinlcI
All articles that coruscate with resplendence are not truly auriferous.



Moving messages about IMAP/local

2000-08-16 Thread cgreen

I think the current implementation of directory browsing needs to be
changed somewhat. I've muttered about this before but now I have a
practical situation where it's a real pain.

I want to move some messages from an IMAP server to local folders
(though the same problems would apply moving IMAP to IMAP or local to
IMAP).

So, I use a 'c' command followed by '?' to find and open the required
folder on the IMAP server.  This works fine and I get to the message
I want.  I then use an 's' command followed by a '?' to find the
folder where I want to save the message - this doesn't work because
the browser opens a view of the IMAP server folders - I want a view of
the place I started from, the local folders.

I really think that the browser should do one of the following:-

Always start in the same place ($folder maybe)

Have a special key that will take it back to $folder (i.e. '?'
will browse from where it left off, '!' will go back to $folder)

Have an option in the muttrc file to say whether it starts where
it left off or back at $folder.

-- 
Chris Green ([EMAIL PROTECTED])
  Home: [EMAIL PROTECTED]   Work: [EMAIL PROTECTED]
  WWW: http://www.isbd.co.uk/




Re: Moving messages about IMAP/local

2000-08-16 Thread Brendan Cully

On Wednesday, 16 August 2000 at 05:53, [EMAIL PROTECTED] wrote:
 I think the current implementation of directory browsing needs to be
 changed somewhat. I've muttered about this before but now I have a
 practical situation where it's a real pain.
 
 I want to move some messages from an IMAP server to local folders
 (though the same problems would apply moving IMAP to IMAP or local to
 IMAP).
 
 So, I use a 'c' command followed by '?' to find and open the required
 folder on the IMAP server.  This works fine and I get to the message
 I want.  I then use an 's' command followed by a '?' to find the
 folder where I want to save the message - this doesn't work because
 the browser opens a view of the IMAP server folders - I want a view of
 the place I started from, the local folders.

I agree the browser/folder situation needs work. I'll get there after
I've gotten a batch of robustness fixes done. But, remember when
saving locally that you can do something like s~/TAB and you'll be
taken to your local home directory. I tend to use tab-completion on
local directories myself, and it works well enough.

 I really think that the browser should do one of the following:-
 
 Always start in the same place ($folder maybe)
 
 Have a special key that will take it back to $folder (i.e. '?'
 will browse from where it left off, '!' will go back to $folder)
 
 Have an option in the muttrc file to say whether it starts where
 it left off or back at $folder.
 

-- 
Don't make Godzilla mad!

 PGP signature


moving messages?

2000-05-27 Thread Manuel Arriaga

Hi all,

Is there any straightforward way of moving one message from one mailbox to another? 

Thanks,

Manuel



Re: automatic moving messages to different mailboxes

2000-02-10 Thread Jan Ludewig

On Mon, Feb 07, 2000 at 08:35:41PM +1300, Jamie wrote:
 Also, I just realised that this may not be done through mutt, but
 through some other program, so if it is, just tell me the program.
Try procmail. The filters are quite easy to set up though procmail's
regexes are...well...stupid. Furthermore procmail is really slow
even with highly optimized scripts.
So, if you receive a lot of mails (1000/day) you should think about
using your own perl-script. I did it and *cowaboom* my mails were processed
up to 1000% faster ;).

Jan



automatic moving messages to different mailboxes

2000-02-08 Thread Jamie

I am sure that this question has come up again, and again, but I could
not find an answer anywhere for it.

I have one spool at /usr/spool/$USER, and through that comes all my
email, including heaps of email from mailing lists. 

What I want to be able to do is have mutt automagically, when I recieve
new mail, send the mail from my spool to different message folders
(corresponding to different mailing lists), depending on the sender of
the message. 

Is there a way to do this. 

Also, I just realised that this may not be done through mutt, but
through some other program, so if it is, just tell me the program.

Also, there are a number of letters that come up next to each recieved
email in the index, including N, O etc. I was wondering if there was any
docs on all of these, and a description of what each one means
(specifically, what does F mean, and + mean?)

Thanks muchly

-- 
Jamie 
 -  "Well-timed silence hath more eloquence than speech. "
   - Martin Fraquhar Tupper



Re: automatic moving messages to different mailboxes

2000-02-07 Thread Mikko Hänninen

Jamie [EMAIL PROTECTED] wrote on Mon, 07 Feb 2000:
 What I want to be able to do is have mutt automagically, when I recieve
 new mail, send the mail from my spool to different message folders
 (corresponding to different mailing lists), depending on the sender of
 the message. 
 
 Is there a way to do this. 

Yes.

 Also, I just realised that this may not be done through mutt, but
 through some other program, so if it is, just tell me the program.

Bingo! :-)  The program to do this is called procmail.  Or, a newer
alternative is available, maildrop.  Either will do what you want.
They are quite popular programs, so should be easy to find.  If the
Mutt web page doesn't have links, look for them on freshmeat.net.  But
actually, if you have any sort of common Linux (?) distribution, your
system may have one or both already installed.

 Also, there are a number of letters that come up next to each recieved
 email in the index, including N, O etc. I was wondering if there was any
 docs on all of these, and a description of what each one means
 (specifically, what does F mean, and + mean?)

Look up the section "Status Flags" in the manual.

Some of the characters can be customized by setting the $to_chars
variable (also explained in the manual).

'F' means the message is from you; this depends on your setting up your
$alternates setting properly.

'+' means the message is to you, and you only: no Cc to anyone else, or
any lists, although it might've been Bcc'd somewhere and that wouldn't
show up of course.


Regards,
Mikko
-- 
// Mikko Hänninen, aka. Wizzu  //  [EMAIL PROTECTED]  //  http://www.iki.fi/wiz/
// The Corrs list maintainer  //   net.freak  //   DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy  scifi, the Corrs /
"No more, no more a life without meaning..." -- The Corrs



Re: automatic moving messages to different mailboxes

2000-02-07 Thread Edmund GRIMLEY EVANS

Jamie [EMAIL PROTECTED]:

 What I want to be able to do is have mutt automagically, when I recieve
 new mail, send the mail from my spool to different message folders
 (corresponding to different mailing lists), depending on the sender of
 the message. 

Try procmail. (I just started using it myself instead of exim filter.)

 Also, there are a number of letters that come up next to each recieved
 email in the index, including N, O etc. I was wondering if there was any
 docs on all of these, and a description of what each one means
 (specifically, what does F mean, and + mean?)

Try the manual. In section 2.3.1:

   +   message is to you and you only
   T   message is to you, but also to or cc'ed to others
   C   message is cc'ed to you
   F   message is from you

Edmund



Re: Moving messages

1999-05-10 Thread Ken W

On Mon, May 10, 1999, John R. Sheets wrote:
 Okay, thanks, that makes sense, sorta.  Semantically speaking, 
 "save" seems closer to "copy" than to "copy and delete".  But I 
 guess that's close enough  (c:  Just a little misleading, though.

'Save' will copy and delete the mesage in its current mailbox.  'C'
(or at least that is what I have it bound to) will copy it to another
folder and leave it in the present one as well.


-Ken

-- 
[EMAIL PROTECTED]AIM: ScopusFest



Moving messages

1999-05-10 Thread John R. Sheets

Is there an easy way to move messages to a different folder,
that I'm missing?  I only found the command for copy, but that
means I have to manually delete the message in the current 
folder.   Am I blind?

Thanks, 
John



Re: Moving messages

1999-05-10 Thread Lars Hecking

John R. Sheets writes:
 Is there an easy way to move messages to a different folder,
 that I'm missing?  I only found the command for copy, but that
 means I have to manually delete the message in the current 
 folder.   Am I blind?

 Tag (t) the messages you want to move, tag-save (; s) and enter
 the folder name, return.

-- 
It wasn't that she had a rose in her teeth, exactly.  It was more like
the rose and the teeth were in the same glass.