how do we automatically delete spam mails in JUNK folder, if the spam mails have been in Junk folder for 1 week?
This should be done on the server rather than the webmail client. Make a script to delete old files and then call it via cron at regular intervals.
The bash command will do it. Note: the `;` at the end is important.
find /path/to/user/dir -mtime +7 -path '/path/to/JUNK/folder/*' -exec rm -f {} \;
That will delete everything it finds that is older than 7 days so test it carefully before use. If you remove the `-exec rm -f {} \;` it will display a list of everything it found so you can check it.
ok, thank before, it`s work.......
:)