procmail
[Top] [All Lists]

Re: rename carbon copy

2005-03-29 17:33:48
On Tue, Mar 29, 2005 at 06:52:25PM -0500, Jeremy Armitage wrote:
I'm trying to create an archive of all the messages i receive, which
is simple enough.  However, the naming convention leaves a bit to be
desired.

# backup all messages
:0c:
backup

the above will store files in the backup directory, with file names like:
msg.0KB  msg.8HB  msg.EVB

I wonder if there is any way I can have procmail store the files with
filenames that are a bit more descriptive, like having the date of
when the message was reveived, and perhaps the sender too.

As per "man procmailrc", the "msg." prefix is set from the $MSGPREFIX
var.  To change it, change the value of that var.

You could do:

  MSGPREFIX = `date +%y%d%m`

and then your recipe.

You might want to review the searchable list archives at
www.procmail.org for pure procmail ways to find the date,
so you won't have to run the date command on every incoming
message.

-- 
dman



____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>