Archive

Archive for the ‘E-mail Management’ Category

Exim incomplete transaction: unexpected disconnection while reading SMTP command

November 5th, 2008 No comments

Recently I’ve had a problem like this. I didn’t make any changes, but my account refused to send mail at all. When my logs were read, here is what I got:

2008-09-22 06:50:37 H=MY IP (SERVER) [MY IP] incomplete transaction (connection lost) from <my@email.com>
2008-09-22 06:50:37 from MY IP (SERVER) [MY IP]

I thounght that’s related to my IP (as my IP is a dynamic one). But everything was ok with other servers and I has to investigate the issue.  I’ve tried many solutions, but found no one on the Internet. As usually, I had to figure it out by myself.

The solution was quite simple and was not related to the server. The only thing I had to do was to change the timeout value in my E-mail client (that’s The Bat!). While the default timeout value is 60 seconds, setting it to 120 solves the issue.

This solution should help you on busy servers, that are processing big amounts of data and your e-mails will be always sent in time!

Exim Problem: unable to set gid or uid (euid=8): domain_filter router

October 30th, 2008 1 comment

Today I’ve noticed a strange thing after Directadmin software update. , the thing that is really necessary for any server. I’ve started to look through log files to identify the problem. Here is what I have at the moment.

My mainlog (/var/log/exim/mainlog) is full of messages like this:

2008-10-30 19:27:02 exim 4.67 daemon started: pid=16453, -q15m, listening for SMTP on port 25 (IPv4) port 587 (IPv4)
2008-10-30 19:27:03 1KvZad-0001Ra-TE =12 or uid=510 (euid=8): domain_filter router (recipient is luna@mydomain.com)
2008-10-30 19:27:03 1KvZad-0001Ra-TE (recipient is luna@mydomain.com): : status=0100 readerror=’Success’

Messages are not delivered and I’m trying to investigate the issue. paniclog has messages similar to the shown above.

What are the ideas? First of all I’ve checked all the file permissions and they were ok. I’ve compared them to the permissions of a working server and found no difference. Then I’ve checked domain_filter setting of exim.conf: everything seems to be good too.

The idea came fromone of the numerous mailing lists. And it was simple enough to solve my issue. I just had to add a sticky bit to exim executable with one command. Here is what I had before:

The command I had to enter was

This solved all the issues after exim reboot. The most strange thing is that at another server such a software update came without anything like this: all the permissions were OK. Just preventing you from spending so much time: if you’re getting a problem like this, most probably you will be able to solve it with one single command.

Starting dovecot: Fatal: listen(993) failed: Address already in use

October 2nd, 2008 No comments

On some servers Dovecot doesn’t start automatically after reboot. That is a fault of the system administrator, but if you need to bring it back working there is a solution, that seems to be effective with all instances of listen() failed.

Let’s take we’re trying to start dovecot and getting the following error:

Fatal: listen(993) failed: Address already in use means that something else is listening the same port. We need to identify the process, that’s why we need to run

lsof -i :993

This will show us which processes are listening port 993. In order to start Dovecot we need to kill these processes to make this port free. Command output will show us PID numbers of all running processes we need to kill so this will not be so hard to do.

We need to achieve the moment when lsof -i :993 does not return any process. When no process is listenenng this port, we can start Dovecot as usually by entering service dovecot start. That’s all, enjoy :)

How to fix “Mailbox in Use” Error in DirectAdmin

July 25th, 2008 No comments

Today I went back from my short trip to the country. First of all I decided to check my mail, and when I did it, I got the following error in my E-mail client: !25.07.2008, 19:20:39: FETCH . That’s not the first time when such an error happens and I already know the solution – I think it’ll be useful for all server administrators (By the way, It’s Sysadmin’s day today).

When you get the message that mailbox is used, you must have some lock files, that prevent using locked mailboxes. It is not so easy to find out the reason why these files appear (If you know, just write about it in comments). The solution is obvious – to find and destroy these files.

Mailbox lock files are usually located at /var/spool/virtual/. You fill find domain name folders there and your e-mail account lock files should be right there. Just check them. I usually use locate to find these files – their number shouldn’t be big.

After you delete these files, your mailboxes will start working as usual.