email - How to mark read mails as unread in Postfix - Unix & Linux Stack Exchange
In our postfix server, the mail directories cur
and new
are under /home/<user>/Maildir
. I don't have much of an experience with mail servers, but I am aware that new e-mails land in the new
folder first, and once read, they get moved to the cur
folder.
[root@imap01 cur]# ls | head -5
1414497605.Vfd02I42dcbM893399.imap01.xyz.com:2,S
1414497605.Vfd02I42dceM901537.imap01.xyz.com:2,S
1414497606.Vfd02I42dcfM227925.imap01.xyz.com:2,S
1414584047.Vfd02I42deeM736282.imap01.xyz.com:2,S
1414584047.Vfd02I42df0M736415.imap01.xyz.com:2,S
[root@imap01 cur]#pwd
/home/userabc/Maildir/cur
[root@imap01 cur]#
The :2,S
suffix is getting added to the files once they are moved to cur
. Now my questions are:
- How can I mark a read mail as unread through commandline?
- Is it as simple as moving the mail from
cur
folder tonew
folder? - Is it as simple as removing the
:2,S
suffix from the mail files ?
Turns out that all we had to do was to combine the last 2 steps I had asked in the question.
Copy the e-mail file, (ie. 141443305.abc123abc.imap01.xyz.com:2,S) from /home/<user>/Maildir/cur
to /home/<user>/Maildir/new
and rename it by removing the :2,S
suffix. This process marks the read mail as unread.
Không có nhận xét nào:
Đăng nhận xét