Skip to content

How to create a cron job to remove catchall emails from building up?

I saw a really good post on it here but the guy who posted it had images to help make a cron job and since then have been deleted.

I think it's something very useful that can save time and money so I'd like to bring the topic back up.  :)

Comments

  • Not sure why you need this but since that post, deleting emails has been implemented in SER. So basically if you only need it for SER then you don't need to set a cron job for that as you can set it in SER directly.
    Thanked by 1Deeeeeeee
  • HinkysHinkys SEOSpartans.com - Catchalls for SER - 30 Day Free Trial
    @eliezer
    Note that using SER for this is really inefficient. SER needs to send a delete signal for each email individually (which adds up quite fast when you have thousands of emails in your inbox).

    Without giving you any specific code we use, basically you should create a script that deletes all files older than X days in the email account's folder (make sure to do it on both "new" and "cur" folders) and run it once / day. 

    You can find the code to delete files in a folder that are older than X days online with minimal effort.
    Thanked by 1Deeeeeeee
Sign In or Register to comment.