Spam Email Move and then Delete after X Amount of Days

Discussion in 'Installation/Configuration' started by b00gz, Mar 31, 2008.

  1. b00gz

    b00gz New Member

    What I would like to do is move all incoming mail that is marked as spam for all users to a Junk imap folder and then after 30 days if the email is still there delete it. It would be cool if there was someway on the day before the mail was going to be deleted if the users would get a message that says you have X amount of junk mail messages that are going to be deleted.
  2. b00gz

    b00gz New Member

    No one has done this before?
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    To move the spam mails to a folder, you can modify the spamassassin procmail recipe. The templates for the procmail recipes are in /root/ispconfig/isp/conf

    To delete the mails and send a warning message, you will have to write a script that goes daily trough all user spam directories, sends a warning and deletes the mails one day later. I'am not aware of such a script for ISPConfig.
  4. b00gz

    b00gz New Member

    Where can I setup new variables like {PREFS_FILE} ? I want to create one called {JUNK_EMAIL}

    Also How can I automatically create a Junk Email Imap Folder during the creation of the user?
  5. falko

    falko Super Moderator ISPConfig Developer

    You'd have to modify the source code of the files in /root/ispconfig/scripts/lib/classes.

Share This Page