Showing posts with label mail server. Show all posts
Showing posts with label mail server. Show all posts

Saturday, 10 December 2011

Forward Outgoing email

Forward Outgoing email in cPanel
------------------------------------------------

I like to forward all incoming and outgoing email from my domain to another gmail or yahoo account. I am running with cPanel server. How should I do this. Also the emails that are being forwarded should not be know to any one. Unseen delivery of mails from my domain to another email account.

Solution:

This is the method you can do it via back end. Consider you have a domain say "hemanth.com". You have 15 email accounts in that domain. You need all incoming and outgoing mails to another email account unknowingly to them. Just follow this method.

-----------------------



1. To create a blind carbon copy, go to /etc/ and create a new file:
Code:
cp cpanel_exim_system_filter cpanel_exim_system_filter2
2. Add the following at the bottom of the new file (/etc/cpanel_exim_system_filter2):
Code:
if ("$h_to:, $h_cc:, $h_bcc" contains "domain.com")
then
unseen deliver "hemanth@domain.com"
endif
if $sender_address: contains "domain.com"
then
unseen deliver "hemanth@domain.com"
endif
Now, go to WHM > Exim Configuration Editor and change the system filter to the new path (/etc/cpanel_exim_system_filter2).

Above, please replace
domain.com with the domain name you want to have all emails incoming and outgoing sent to the blind carbon copied address. Please ensure the receiving address for the incoming and outgoing emails is not on the same domain as those you are using for the forwarding, since you might end up creating some type of loop otherwise.




451 Temporarily unable to process your email. Please try again later.

451 Temporarily unable to process your email. Please try again later.
--------------------------------------------------------------------------------------------------

I was trying to send emails. The mails are sent out from my account. But It didn't deliver. I am not sure what was the reason. I have checked my logs in the cPanel server. My mail server is exim. When I grepped the logs I have saw the following error message.

=========
# grep 1RYqhH-002hK2-Ej /var/log/exim_mainlog
2011-12-09 11:00:27 1RYqhH-002hK2-Ej <= test@domain.com
H=localhost (x1.oryon.net) [127.0.0.1] P=esmtpa A=dovecot_login:test@shinfujilabels.com.sg S=951 id=sig.2324d3bc9c.20111209110022.753133gzynv0jwzq@142.17.3.30
T="Test mail"
2011-12-09 11:00:27 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1RYqhH-002hK2-Ej
2011-12-09 11:00:29 1RYqhH-002hK2-Ej == enquiry@domain.com R=dk_lookuphost T=dk_remote_smtp defer (-44): SMTP error from remote mail server after RCPT TO:<enquiry@domain.com>: host eziprint.com.sg [69.89.31.245]: 451 Temporarily unable to process your email. Please try again later.
=========

I have searched in google and I couldn't find any possible solution. Then I have searched many possible solutions but ended up in tragedy. What is the final solution.????

The solution is simple. When you have tried to send mails if there was some issue with remote mail server to deliver mails it will give a remote SMTP error. Exim will store the same message in the exim_database. Even after the remote mail server issue is fixed the mails will be failed. When you are trying to send your mails will be sent out but it will remail in the exim queue with the above error message.


The only solution is to clear the exim database. Use the following commands to clear the exim database and then try to send mails. The issue is fixed.


[root@host]#/script/exim_tidydb

After this run this command in the server.


]# /usr/sbin/exim_tidydb -t 1d /var/spool/exim retry
]# /usr/sbin/exim_tidydb -t 1d /var/spool/exim reject
]# /usr/sbin/exim_tidydb -t 1d /var/spool/exim wait-remote_smtp


 Watch the junk dissappear. You will see loads of junk being deleted. A good thing! If you cPanel installation is relativly new you will see a few messages being removed. If your cPanel installation is more mature you may see hundreds of messages being removed.




After this restart your exim mail server.


/etc/init.d/exim restart


Thats it the issue is fixed. Now try to send/receive mails from your domain it will be delivered fine.

Friday, 2 December 2011

Outlook Configuration Steps


Please Configure Outlook using the following steps:

1. Open Outlook.

2. Select Tools --> Accounts (You will get window that consists of options for adding and removing accounts).

3. Select Add--> Mail. (You will get a window which asks your Display Name. This is the name that appears in the From field of the messages you are sending).

Display Name:

4. Click Next.

5. Enter the Email address for which you want to configure the mail client.

6. Click Next (You will directed to a window. Enter the following details).

Select My incoming mail server is : POP3
Incoming mail server : mail.domainame.com
Outgoing mail server : mail.domainname.com

7. Click Next (You will get a window that will ask for Internet Mail Logon details).

Account Name: (Enter the email id for which you want to configure the email client).

Password :

8. Click Next.

9. Click Finish.

10. Now click on the Properties Button. (Tool-->Accounts-->Properties).

11. Select the Advanced tab. Make sure that the port number for smtp server is 25 and pop server is 110.