IMAPsync


Imapsync is a program to synchronise two IMAP mailboxes, mailbox trees or servers.

imapsync installation

——————

You can  install imapsync on the server using the following commands.

perl -MCPAN -e "install Test::Inter"
perl -MCPAN -e "install Parse::RecDescent"
perl -MCPAN -e "install Getopt::Long"
perl -MCPAN -e "CPAN::Shell->force(qw(install Date::Manip));"
perl -MCPAN -e "CPAN::Shell->force(qw(install Mail::IMAPClient));"
perl -MCPAN -e "CPAN::Shell->force(qw(install Term::ReadKey));"

wget http://packages.sw.be/imapsync/imapsync-1.350-1.el5.rf.noarch.rpm
rpm -i --nodeps imapsync-1.350-1.el5.rf.noarch.rpm

Syntax to use imapsync :

imapsync --host1 <Source_Server> --user1  <source_server_username> --password1 <source_server_pass> --host2 <Desination_Server> --user2   <Destination_Server_username> --password2 <Destination_Server_pass>
example :

imapsync --host1 source.com --user1  user@source.com --password1 XXXXXXX --host2 localhost --user2  user@destination.com --password2 XXXXXX
That's all...!!!

sh: /usr/local/bin/sendmail-logger: No such file or directory


Issue: I got the above error while trying to send mail from a test php file after enabling mail() function on the server.

sh: /usr/local/bin/sendmail-logger: No such file or directory

Solution:

1.copy /usr/local/lib/php.ini to the user’s document root and change the ownership.

# cp  /usr/local/lib/php.ini /home/username/public_html

#chown username.username /home/username/public_html/php.ini

2.Then edit /home/username/public_html/php.ini

# vi /home/username/public_html/php.ini

Now change the php.ini as described below.

sendmail_path = “/usr/sbin/sendmail -t -i” –> enable this
;sendmail_path = /usr/local/bin/sendmail-logger—> comment this

That’s all………!!!

 

lowest numbered MX record points to localhost


Issue: I got the above error from /var/log/exim_mainlog while sending mails from a domain hosted in my server

temporarily rejected RCPT <email@domainname.tld>: lowest numbered MX record points to local host

Solution :

Check if the domain MX is pointing to remote or not.

If the domain is using our server as MX,

The reason for the error message is the domain “domainname.tld” is missing from the /etc/localdomains file of your server. The difference between the /etc/localdomains and /etc/remotedomains  files is that, they decide whether the email has to be delivered locally OR to a remote server respectively and is checked by the exim mail server.

To fix the issue, edit the file:

# vi /etc/localdomains

and place the domain name entry there. There is no need to restart the ‘exim’ s service

Also please check if the domain is listed in /etc/remotedomains and comment the entry if it’s present there.

That’s all……!!!

cpanel Could not edit password file : Permission denied


Issue: I got this error while changing the email account’s password through cpanel.

Solution:

Check permissions of passwd file in /home/username/etc/domain.com/

The correct permissions should be the following:

-rw-r–r– 1 username mail  196 Dec  3  2005 passwd
-r–r–r– 1 username mail 1088 Dec  3  2005 passwd,v

Try to change the password now.

That’s all……!!!!

Cannot create an email account through cpanel


Error:

File open for /home/tricks/etc/tricks4linux.com/passwd failed with error No such file or directory

I got this error while creating an email account through cpanel.

Solution:

Please check the home directory of the account through the server. You should see that the “etc” directory is missing in your home directory.

Please create a new directory “etc” with the permission 750 and with ownership “user.mail”

i.e; #cd /home/tricks/

# mkdir etc

#chown tricks.mail etc

#chmod 750 etc

Now please try to create a mail account through the cpanel.

Thats all………..!!!!!!!!

Frozen mails


Frozen mails are mails to invalid mail accounts. If the mail can’t be delivered for an account, the mail will be added in the queue and exim will try a couple of times to deliver the mail as per the settings in the RETRY CONFIGURATION in exim configuration file.

If the mail cannot be delivered after eight days (timeout_frozen_after) the mail will be marked as frozen.

Frozen mail Count
——————
exim -bpr | grep frozen | wc -l

Clear frozen mails
——————–

exim -bpr | grep frozen | awk {‘print $3′} | xargs exim -Mrm

OR

exiqgrep -z -i | xargs exim -Mrm

internal problem in domain_filter router :unable to set gid=12 or uid=501 : failure to transfer data from subprocess: status=0100 readerror=’Success–>


While sending mails from the email account on directadmin i got the above error on email error log

Solution:

Please run the folowing commands on the server terminal

chmod u+s /usr/sbin/exim;
service exim restart

Try to send emails now.

Thats all…….!!!!

max defers and failures per hour (5/5 (100%)) allowed


I got the error from the mail error log while sending a mail from an account.

Solution:

That means that this accounts fail/defer percentage per hour is 100%. If your limit set within the WHM is 100% or lower mail will now be rejected when that account sends more email.

Here’s how you can change the threshold or disable this feature!

Log into the WHM as root
Click tweak settings
Click the Mail tab
Scroll down and find the “Maximum percentage of failed or deferred messages a domain may send per hour” setting
Change the % or you can disable this feature by selecting the Unlimited option

Blog Stats

  • 37,402 hits