How to auto delete old emails for cPanel User

email-delete
email-delete

If your mailbox that is always going over-quota or filling up with mail like your default account or your spam box and you don’t want to have to keep logging in and deleting the emails manually below you can find the steps how to auto delete the emails.

  1. Log on to your cPanel Interface.
  2. Go to ”Advanced‘ section.
  3. Click on “Cron Jobs“.
  4. Select the specific time from the lists provided.
  5. You should enter the command to run in the “Command” field.
Note: You should make sure to enter the proper command and the full path to the file.

Check the relevant screen captures:

To do this enter the following information in the following fields:

Minute: 45
Hour: 06
Day: *
Month: *
Weekday: *

Command: /usr/bin/archivemail –quiet –delete –days 10 /home/{USER}/mail/inbox

Make sure you replace {USER} with your actual cPanel username.

Hit the Commit Changes button and wait until sometime after 6:45 AM (assuming you set it up to run at that time) and login to your default email account to see if your emails have been deleted

If everything looks good your default inbox will now have any emails that are older than 10 days automatically deleted

To login into your default email account you use your cpanel username and password

If you wanted to have all the emails deleted that are older than three days you would simply change the –days option to 3

If you wanted to have all emails inside your mail directory including sent mail, spam, etc. that are older than 30 days deleted…
/usr/bin/archivemail –quiet –delete –days 30 /home/{USER}/mail/*

If you had an email account named info @ yourdomain.com and wanted to have all the emails in that inbox that are older than seven days deleted…
/usr/bin/archivemail –quiet –delete –days 7 /home/{USER}/mail/{yourdomain.com}/info/inbox

If you had an email account named info @ yourdomain.com and wanted to have all the emails in your sent-mail folder that are older than twenty-one days deleted…
/usr/bin/archivemail –quiet –delete –days 21 /home/{USER}/mail/{yourdomain.com}/info/sent-mail

Don’t forget to change {yourdomain.com} to your actual domain name !

You can look in your mail directory via your ftp client or the online file manager to see where your mailboxes are located.

NOTE: We *CANNOT* recover mail deleted in this manner, so please use this tutorial at your own risk

 

How to create an SPF record

How to create an SPF recordTo prevent spammers from identifying as your domain, as well as to prevent blacklisting of your domain’s outgoing mail you need SPF records.

To create the  SPF record in your DNS using the following link:

http://www.spfwizard.net/

Using recommended settings and placing relay.dnsdns.com into the “domains that deliver

or relay mail” section will provide you with a record that looks much like this:

YOURDOMAIN.COM. IN TXT “v=spf1 mx a include:relay.dnsdns.com ~all”

Its basic SPF record, means any locations that send email that do not match these locations will be marked as “possible spam” and not as bounced or blocked.

If you are confident in the settings you are using, you can also use hardFail setting to make the record strict.

Difference Between IMAP and POP3

email-Server
email-Server

Difference between IMAP and POP3 and for how long they store mails on the mail server.

IMAP (Internet Message Access Protocol)

Using IMAP, mail server permanently stores the messages. This means that you can access them through any computer as long as you have the correct login details.

Also, unless you use a mail client that synchronizes folders and caches messages, IMAP requires a constant connection while you read email.

This method is more convenient than POP3, it generally requires more dedicated disk space than POP3 because users tend not to delete old email.

However, if  you monitor disk usage and delete old messages when necessary, IMAP is still viable on a mail server with limited resources.

Users and web host generally prefer IMAP due to its convenience. Carefully consider system’s available resources before you choose a courier.

POP (Post Office Protocol)

Using  POP3,  mail server deletes messages when you download them. That means that you can only access messages from the computer that you used to download them.

POP3 don’t require constant connection while you read email.

This system conserves your mail server’s disk resources, it limits how your users can access their email.

What is Shared and Dedicated IP Address

An IP (Internet Protocol) address is Completely separate from your website domain.

IP is a sequence of numbers assigned to every device that accesses the Internet.

ip-address1.1Your Domain is your website’s address, the location where it can be found on the Internet. Each domain name has a IP address assigned to it. Your Server’s IP address is a unique label that allows the Internet, websites, to identify your specific device when it accesses a website.

Additionally to computers and mobile devices, servers also have their own unique IP addresses.

Most Hosting and website providers offer variations on two different types of hosting; Shared Hosting and Dedicated Hosting.

With shared hosting, all of the resources are pooled together to host many sites without regard for who owns the site, how much traffic a site receives, etc.

With dedicated Server hosting, all of a server resources are still applied to a specific set of sites, but the way those resources are allocated is at the discretion of the person renting the server space.

Shared IP and Dedicated IP operate in the same way. While each hosting account has the same IP in a shared hosting scenario, a dedicated IP is an exclusive address that is unique to your hosted server. While a dedicated IP address is exclusively yours, you might choose to serve different sites from that IP address.

In case of shared hosting, there are often hundreds of sites that all hosted on the same server therefore, they all have the same IP address.

In the case of dedicated hosting, sites may share the same hosting provider, but do not all have the same IP address.

There is always quite a common controversial issue: Is it necessary to have a dedicated IP address for your website and why? as you can use shard one. Hosting Site on Shared Server.

Dedicated IP provides with certain crucial advantages, There are number of reasons why it is recommended to use Dedicated IP address for a website, hosted on a Shared server.

Dedicated IP will provide with ability to access server directly without changing DNS settings for the domain name, to check how website is going to look before pointing domain name to the server and launching your website on the web.

Your  website running over a Shared IP address may cause unpredictable difficulties and email service may also be affected in this case. Using dedicated IP, isolates your service from being affected by consequences of abuses made by others. There are some situations when some user, sharing the same IP address with you gets banned or blacklisted for spamming which may possibly affect your email service as well.

For online-store or e-commerce related website, it is quite necessary to grab SSL certificate and Dedicated IP address for the website, in order to provide security for your data. Customers feels more safe making transactions on the website which uses dedicated IP address and SSL Certificate.

How to update SMTP settings on iPhone or iPad (Outgoing Mail Server)

Updating your (SMTP) settings at any point after you have setup your email account on iPhone, below are the steps how you access the Outgoing Server settings, and get hosted email account to work for LINUX hosted clients.

To get done, click on SETTINGS on your iPhone.

iphone-smtp-1
iphone-smtp-1

On SETTINGS SCREEN Scroll down to MAIL > CONTACTS > CALENDARS, and click on that:

iphone-SMTP
iphone-SMTP

Then select the account you need to update the SMTP settings for. As it’s already established, you just select it from the list of email accounts on your iPhone or iPad:

Scroll down to the OUTGOING SERVER on EMAIL INFORMATION page for the select account.

CLICK on the OUTGOING SERVER

Now you will see a list of OUTGOING SERVERS that have been configured on your iPhone or iPad. The one that is currently set to be used with this particular email account is at the top and highlighted: Primary Server. So click on that one.

Now you will see the settings for that PRIMARY OUTGOING SERVER:

iphone-smtp-auth-settings
iphone-smtp-auth-settings

Please check and make sure:

  1. SSL is OFF
  2. Authentication is set to “PASSWORD”
  3. Outgoing Port is set to “587”

Click “Done” on right hand site upper conner

It will VERIFY these settings.

If it does NOT verify, then something is wrong.

1. password is typed in wrong in this particular area Or
2. Did not get saved to this part of the email set up.

So type in the password for your email account again, if you’re getting an error, and see if that helps.

It should verified.ng-Server-settings-on-iPhone-or-iPad.html