Auto-delete pop email to integrate with Gmail
I do not like to manage pop accounts on our server. I encourage all our clients to use email forwards to Gmail, or Google Apps. Here is another solution that almost works:
1. Set up a forward to a gmail account (this is easy to do in cpanel)
2. Set up a cpanel pop account so that gmail will allow client to send mail from his domain (this is easy Change the "From" address when replying or forwarding - Gmail Help)
3. Create some way for cpanel to auto-delete email in the inbox to avoid the email box from growing and growing. I would like to just keep the last 100mgs, or keep nothing once an email is forwarded?
I need help from some tech genius with the third step.
Thank you
-
I just thought of this. Not sure if it will work. If Google just wants an authenticated pop account to send, perhaps we can just use user@domain.com (where 'user' is the cpanel username and the password is the cpanel user password). I tried to add this but Google rejected it with this error: Authentication failed. Please check your username/password. [Server response: 535 Incorrect authentication data code(535) ] Any other ideas? 0 -
. Create some way for cpanel to auto-delete email in the inbox to avoid the email box from growing and growing. I would like to just keep the last 100mgs, or keep nothing once an email is forwarded?
Hello :) You can create the email account and then setup an account or user-level filter that discards email after it's forwarded: User Level Filtering - Documentation - cPanel Documentation Thank you.0 -
I am not sure how to do this with filtering to discard after it is forwarded but I use this in a cron. # delete the emails after 5 days for dir in cur new do find "/home/HOMEDIR/mail/DOMAINNAME/EMAIL/$dir/" -type f -mtime +5 -delete done [/code/0 -
I am not sure how to do this with filtering to discard after it is forwarded
You can add multiple actions to a filter rule in the order you want them to happen, as documented at: How to Configure Mail Filters - cPanel Knowledge Base - cPanel Documentation Thank you.0 -
cPanelMichael, I put that comment there saying I personally did not see how to make a filter that would delete the email after it is forwarded. If you use a forwarder you do not use filters. Thus what would you write in a filter to know that it was indeed forwarded and then deleted. I personally did not need to know this information the original poster did. I was letting him know how I would handle this. I think if you wanted to post something for his post then you could reply to his #3 Create some way for cpanel to auto-delete email in the inbox to avoid the email box from growing and growing. I would like to just keep the last 100mgs, or keep nothing once an email is forwarded? but thanks for the reply. It would be nice to know what to put into a filter to answer what he wants. I've read the documentation and still would not have a better answer for beyondbeyond. 0 -
If you use a forwarder you do not use filters.
You can actually use a filter instead of a forwarder by using the "Redirect to email" action that's documented at: How to Configure Mail Filters - cPanel Knowledge Base - cPanel Documentation Thank you.0 -
thanks 0 -
I do not like to manage pop accounts on our server. I encourage all our clients to use email forwards to Gmail, or Google Apps. Here is another solution that almost works: 1. Set up a forward to a gmail account (this is easy to do in cpanel) 2. Set up a cpanel pop account so that gmail will allow client to send mail from his domain (this is easy Change the "From" address when replying or forwarding - Gmail Help) 3. Create some way for cpanel to auto-delete email in the inbox to avoid the email box from growing and growing. I would like to just keep the last 100mgs, or keep nothing once an email is forwarded? I need help from some tech genius with the third step. Thank you
I think I have a solution. I tried all sorts of account-level filters only to run into all sorts of BCC handling problems. Instead, I made the Gmail destination account check the originally forwarded account via POP3 (Gmail settings > Accounts > Check mail from other accounts). It may seem silly to forward the messages to begin with and then have gmail go back again but it solved all the issues. Because it it forwarded from the server it arrives at gmail's inbox much faster. Otherwise you have to wait for Gmail next POP3 cycle, which you can't control, and can take up to an hour I believe. Gmail's POP3 checking will then delete the messages accomulating on the server. At most you get about an hour worth of emails pilled up at the server. Not the most elegant solution in terms of traffic but I couldnt find better. Regards,0
Please sign in to leave a comment.
Comments
8 comments