LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-08-2006, 02:29 AM   #1
alienDog
Member
 
Registered: Apr 2004
Location: Europe
Distribution: Debian, Slackware
Posts: 505

Rep: Reputation: 48
postfid/dovecot .maildir problem (loooots of "new" messages)


Ok, here's the deal: We had to switch to another mailserver (an rsync "mirror" of the original) after a hardware-failure. We're using postfix/dovecot and the mail gets delivered to .maildirs in users homes. The problem is that after the switch lots of old messages got marked as new, so currently we have hundreds and hundreds of mails that show up as new mail in the mail-client (thunderbird), but are actually old. Any ideas?
 
Old 12-08-2006, 08:22 PM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Here's a shell script I run from crontab to "read" anything in my spam folder. You could run something similar to fix your problem.

Quote:
#!/bin/bash
shopt -s nullglob

cd ~/Maildir/.Spam/new

# move files in new to cur - this happens when you view folder

if [ $( ls | wc -l ) -gt 0 ]
then cp * ../cur; rm *;
fi

cd ~/Maildir/.Spam/cur

# It also seems that filesnames of messages have ":2," added when folder viewed

for filename in *net ;do

newfile=$(echo $filename ":2," | tr -d " ")
mv $filename $newfile

done

#for filename in *['a'-'z'] ;do

# newfile=$(echo $filename ":2," | tr -d " ")
# mv $filename $newfile

#done

# Read messages have a capital S on the end (I guess for Seen)

for filename in *"," ;do

newfile=$(echo $filename "S" | tr -d " ")
mv $filename $newfile

done

cd ~/Maildir/.sa-learn/new

# move files in new to cur - this happens when you view folder

if [ $( ls | wc -l ) -gt 0 ]
then cp * ../cur; rm *;
fi

cd ~/Maildir/.sa-learn/cur

# It also seems that filesnames of messages have ":2," added when folder viewed

for filename in *net ;do

newfile=$(echo $filename ":2," | tr -d " ")
mv $filename $newfile
edit - btw - I use Postfix/Dovecot

Last edited by billymayday; 12-08-2006 at 08:24 PM.
 
  


Reply



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 On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Proposed solution for "status" (aka "problem solved") indicator demerson3 LQ Suggestions & Feedback 12 04-08-2006 02:15 PM
Problem with "3Com", "3CRSHPW_96 Wireless LAN PC Card " Adil_uk Linux - Wireless Networking 0 12-18-2005 05:45 PM
problem "make"ing gtk+ "/usr/bin/env: perl -w" caid Linux - Newbie 8 07-29-2005 04:51 AM
What does "SFW2-INext-DROP-DEFLT" in my messages log file mean? TrulyTessa Linux - Networking 11 12-22-2004 09:28 AM
Boot messages not the same as "dmesg" or "/var/log/messages"? massai Linux - General 5 03-10-2004 12:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration