utility to move messages stored by qmail

This is a discussion on utility to move messages stored by qmail within the alt.comp.mail.qmail forums, part of the Mail Servers and Related category; I plan to use qmail with vpopmail. my question is does anyone know of a utility (I can run server ...


Go Back   Usenet Forums > Mail Servers and Related > alt.comp.mail.qmail

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-16-2004
Andrew Crook
 
Posts: n/a
Default utility to move messages stored by qmail

I plan to use qmail with vpopmail.

my question is does anyone know of a utility (I can run server side) I can
use to move messages from one user to another? e.g. by sender/date/subject
etc
any other options would be nice


AndiC


Reply With Quote
  #2 (permalink)  
Old 07-16-2004
Joerg Backschues
 
Posts: n/a
Default Re: utility to move messages stored by qmail

Andrew Crook wrote:

> my question is does anyone know of a utility (I can run server side) I can
> use to move messages from one user to another? e.g. by sender/date/subject
> etc
> any other options would be nice


What's about procmail?


Greetings
Jörg Backschues

Reply With Quote
  #3 (permalink)  
Old 07-16-2004
Andrew Crook
 
Posts: n/a
Default Re: utility to move messages stored by qmail

rough example

move a@xyz.tld to b@xyz.tld from c@other.tld or

move a@xyz.tld to b@xyz.tld subject "test"

Such a utility exist?

AndiC

"Andrew Crook" <andrew@NOSPAM_andicrook.demon.co.uk> wrote in message
news:cd8a6s$a8q$1$8302bc10@news.demon.co.uk...
> I plan to use qmail with vpopmail.
>
> my question is does anyone know of a utility (I can run server side) I can
> use to move messages from one user to another? e.g. by sender/date/subject
> etc
> any other options would be nice
>
>
> AndiC
>
>



Reply With Quote
  #4 (permalink)  
Old 07-16-2004
Joerg Backschues
 
Posts: n/a
Default Re: utility to move messages stored by qmail

Andrew Crook wrote:

> rough example
>
> move a@xyz.tld to b@xyz.tld from c@other.tld or
>
> move a@xyz.tld to b@xyz.tld subject "test"
>
> Such a utility exist?


You can use condredirect in .qmail-files to redirect mails.


Greetings
Jörg Bacxkschues

Reply With Quote
  #5 (permalink)  
Old 07-16-2004
Andrew Crook
 
Posts: n/a
Default Re: utility to move messages stored by qmail

yes I will use that however this is for mail that has already gone through
for one reason or another

AndiC

"Joerg Backschues" <jbks-news@tca-os-news.de> wrote in message
news:40f7af72$0$293$f4da8220@news.eplus-online.de...
> Andrew Crook wrote:
>
> > my question is does anyone know of a utility (I can run server side) I

can
> > use to move messages from one user to another? e.g. by

sender/date/subject
> > etc
> > any other options would be nice

>
> What's about procmail?
>
>
> Greetings
> Jörg Backschues
>



Reply With Quote
  #6 (permalink)  
Old 07-16-2004
Joerg Backschues
 
Posts: n/a
Default Re: utility to move messages stored by qmail

Andrew Crook wrote:

>>> my question is does anyone know of a utility (I can run server side) I
>>> can use to move messages from one user to another? e.g. by
>>> sender/date/subject


>> What's about procmail?


> yes I will use that however this is for mail that has already gone through
> for one reason or another


It's possible to do this with standard unix tools (find, grep, mv, cp).

Look at my example:
find ~user/Maildir/.spam/{cur,new} -type f -ctime +14 | xargs rm -f


Greetings
Jörg Backschues

Reply With Quote
  #7 (permalink)  
Old 07-16-2004
Andrew Crook
 
Posts: n/a
Default Re: utility to move messages stored by qmail

Thanks

I really wish to be able to do this from the command line only when needed

AndiC

"Joerg Backschues" <jbks-news@tca-os-news.de> wrote in message
news:40f7b36f$0$287$f4da8220@news.eplus-online.de...
> Andrew Crook wrote:
>
> > rough example
> >
> > move a@xyz.tld to b@xyz.tld from c@other.tld or
> >
> > move a@xyz.tld to b@xyz.tld subject "test"
> >
> > Such a utility exist?

>
> You can use condredirect in .qmail-files to redirect mails.
>
>
> Greetings
> Jörg Bacxkschues
>



Reply With Quote
  #8 (permalink)  
Old 07-16-2004
Andrew Crook
 
Posts: n/a
Default Re: utility to move messages stored by qmail

thanks greet I was not sure if it was safe to so that

i think maildircmd will do the trick as i can use formail

vpopmail. will still let me do that? I am not sure how it sets up the mail
boxes for virtual domains etc

thats if i use it

AndiC


"Joerg Backschues" <jbks-news@tca-os-news.de> wrote in message
news:40f7b49b$0$287$f4da8220@news.eplus-online.de...
> Andrew Crook wrote:
>
> >>> my question is does anyone know of a utility (I can run server side) I
> >>> can use to move messages from one user to another? e.g. by
> >>> sender/date/subject

>
> >> What's about procmail?

>
> > yes I will use that however this is for mail that has already gone

through
> > for one reason or another

>
> It's possible to do this with standard unix tools (find, grep, mv, cp).
>
> Look at my example:
> find ~user/Maildir/.spam/{cur,new} -type f -ctime +14 | xargs rm -f
>
>
> Greetings
> Jörg Backschues
>



Reply With Quote
  #9 (permalink)  
Old 07-16-2004
Thomas Krug
 
Posts: n/a
Default Re: utility to move messages stored by qmail

> "Joerg Backschues" <jbks-news@tca-os-news.de> wrote in message
> news:40f7b36f$0$287$f4da8220@news.eplus-online.de...
>> Andrew Crook wrote:
>>
>>> rough example
>>>
>>> move a@xyz.tld to b@xyz.tld from c@other.tld or
>>>
>>> move a@xyz.tld to b@xyz.tld subject "test"
>>>
>>> Such a utility exist?

>>
>> You can use condredirect in .qmail-files to redirect mails.
>>



You could use something like:


maildirectories='cur new'
sourcedir=/home/vpopmail/bin/vuserinfo -d a@xyz.tld
destdir= /home/vpopmail/bin/vuserinfo -d b@xyz.tld

cd $sourcedir/Maildir
for m in $maildirectories
do
find $m -type f -exec mv {} $destdir/Maildir/new \;
done


Add some if/test statement and a call to 822headers if you want to test for
a certain subject.

Best regards
Thomas.



Reply With Quote
  #10 (permalink)  
Old 07-16-2004
Andrew Crook
 
Posts: n/a
Default Re: utility to move messages stored by qmail


> You could use something like:
>
>
> maildirectories='cur new'
> sourcedir=/home/vpopmail/bin/vuserinfo -d a@xyz.tld
> destdir= /home/vpopmail/bin/vuserinfo -d b@xyz.tld
>
> cd $sourcedir/Maildir
> for m in $maildirectories
> do
> find $m -type f -exec mv {} $destdir/Maildir/new \;
> done
>
>
> Add some if/test statement and a call to 822headers if you want to test

for
> a certain subject.
>
> Best regards
> Thomas.
>
>
>


I like it!!!

AndiC


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:19 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0