View Full Version : 111 Can't open SMTP stream - exim saslauthd problem...
mikeymike
12-07-2009, 03:06 PM
The problem in short:
1. I cannot send mails. I get "Message not sent. Server replied: Connection refused 111 Can't open SMTP stream." in squirrel...
2. I cannot receive mails. (I can connect using imap and squirrel, but the e-mails are not routed, so no new emails)...
I've spent 12 hours today, trying to fix this but without success... :eek:
This morning:
Everything was working fine, except: thousands and thousand of spam mails were sent using my email server... So I thought that updating exim and dovecot and applying smtp auth would help...
What I did:
1. I installed dovecot and exim using apt-get, and run build as in https://help.ubuntu.com/community/Dovecot and https://help.ubuntu.com/community/Exim4
2. I tried to configure SMTP Authentication according to https://help.ubuntu.com/8.04/serverguide/C/exim4.html
Now I cannot receive new mails, but I can read the old ones using imap or squirrel. I cannot send any mails...
I have tried:
http://help.directadmin.com/item.php?id=16
http://help.directadmin.com/item.php?id=51
http://www.directadmin.com/forum/showthread.php?t=21311
http://ubuntuforums.org/showthread.php?t=736419
and setting exim up using sudo dpkg-reconfigure exim4-config...
Now I'm lost. No mails out, no mails in. I don't know what to do...
:confused:
Thanks for any help!
//Mike
You intalled dovecot and exim with apt-get ? Why?
Try custombuild. Your /etc/exim.conf needs to be patched for use with dovecot.
http://help.directadmin.com/item.php?id=51
And you probably should remove what you installed with apt-get and install via custombuild.
mikeymike
12-08-2009, 09:37 AM
Thank you very much for your help!
I'm a bit confused when it comes to installing and configuring applications on the server. I guess I should do most of the stuff from directadmin/custombuild/...
1. Ok, I uninstalled exim using apt-get remove exim...
2. I run ./build dovecot from /usr/local/directadmin/custombuild/
3. I run ./build exim from /usr/local/directadmin/custombuild/ . The result:
...
Trying to make exim...
/bin/sh: line 0: cd: build-Linux-i386: No such file or directory
make[1]: Entering directory `/usr/local/directadmin/custombuild/exim-4.69'
>>> Creating links to source files...
mkdir: cannot create directory `build-Linux-i386': File exists
*** It appears that ../scripts/MakeLinks was previously interrupted.
*** You need to remove the build directory, and then run 'make' again.
make[2]: Entering directory `/usr/local/directadmin/custombuild/exim-4.69/build-Linux-i386'
make[2]: *** No targets specified and no makefile found. Stop.
make[2]: Leaving directory `/usr/local/directadmin/custombuild/exim-4.69/build-Linux-i386'
make[1]: *** [build-directory] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [go] Error 2
make[1]: Leaving directory `/usr/local/directadmin/custombuild/exim-4.69'
make: *** [go] Error 2
make: *** Waiting for unfinished jobs....
*** The make has failed, do you want to try to make again? (y,n):
4. Then I try this script How to compile exim from source (http://help.directadmin.com/item.php?id=125), where make result in:
...
dbstuff.h:103:16: error: db.h: No such file or directory
In file included from exim.h:433,
from exim_dbmbuild.c:33:
dbstuff.h:529: error: expected specifier-qualifier-list before 'DB'
exim_dbmbuild.c: In function 'main':
exim_dbmbuild.c:150: error: 'DB' undeclared (first use in this function)
exim_dbmbuild.c:150: error: (Each undeclared identifier is reported only once
exim_dbmbuild.c:150: error: for each function it appears in.)
exim_dbmbuild.c:150: error: 'd' undeclared (first use in this function)
exim_dbmbuild.c:151: error: 'DBT' undeclared (first use in this function)
exim_dbmbuild.c:151: error: expected ';' before 'key'
exim_dbmbuild.c:213: error: 'DB_HASH' undeclared (first use in this function)
exim_dbmbuild.c:295: error: 'content' undeclared (first use in this function)
exim_dbmbuild.c:298: error: 'key' undeclared (first use in this function)
exim_dbmbuild.c:298: error: 'R_NOOVERWRITE' undeclared (first use in this function)
make[1]: *** [exim_dbmbuild.o] Error 1
make[1]: Leaving directory `/usr/local/directadmin/custombuild/exim-4.69/build-Linux-i386'
make: *** [go] Error 2
What should I do? :confused:
Regards,
//Mike
Try this:
cd /usr/local/directadmin/custombuild
wget "http://files.directadmin.com/services/debian_5.0/da_exim-4.69.deb"
dpkg -i da_exim-4.69.deb
./build update
./build clean
./build dovecot d
wget -O /etc/exim.conf http://files.directadmin.com/services/exim.conf
wget -O /etc/exim.pl http://files.directadmin.com/services/exim.pl
patch -p0 < /usr/local/directadmin/custombuild/exim.conf.dovecot.patch
/etc/init.d/exim restart
/etc/init.d/dovecot restart
mikeymike
12-08-2009, 01:01 PM
Okidok, I tried it. Dovecot and exim seem to be up and running. But I can't send any mails and I can't receive any new mails...
I get
ERROR:
Message not sent. Server replied:
Connection refused
111 Can't open SMTP stream.
in squirrel mail when trying to send mail...
However, I can send mails from shell using:
exim -v -odf root
This is a test message.
.
What next?
I appreciate very much your help!
//Mike
http://www.directadmin.com/forum/showthread.php?t=21311
Seems strange to me :)
Maybe a firewall is blocking a port.
mikeymike
12-08-2009, 01:42 PM
I ran:
exim -bd -q30m
Now I can receive emails... and send them! Great! Thanks a lot! :D
Previously I had problems with spam mails being sent from my server (that was the begining of everything... Now I can't see any of those in my mail queue. However in /var/log/exim/rejectlog i see thousands of entries of the following:
2009-12-08 21:29:17 H=localhost.localdomain (79-99-2-106.serverhotell.net) [127.0.0.1] F=<smiljan.veber@mercator.si> rejected RCPT <ialreksrejnn@svju.msk.ru>: authentication required
2009-12-08 21:29:17 H=localhost.localdomain (79-99-2-106.serverhotell.net) [127.0.0.1] F=<slelong@rational.com> rejected RCPT <ianiatoliyn@budimir.msk.ru>: authentication required
2009-12-08 21:29:17 H=localhost.localdomain (79-99-2-106.serverhotell.net) [127.0.0.1] F=<smith_christine_e@osburn.net> rejected RCPT <ianiatoliynn@shrnb.msk.ru>: authentication required
2009-12-08 21:30:29 H=localhost.localdomain (79-99-2-106.serverhotell.net) [127.0.0.1] F=<saljhy@yeojoo.ac.kr> rejected RCPT <ianiatoly@vistboss.msk.ru>: authentication required
2009-12-08 21:30:55 H=(79-99-2-106.serverhotell.net) [127.0.1.50] F=<sdfwud@shaw.ca> rejected RCPT <root@products-direct.info>: authentication required
2009-12-08 21:31:12 H=localhost.localdomain (79-99-2-106.serverhotell.net) [127.0.0.1] F=<fatima.fallaz@bol.com.br> rejected RCPT <mail_a.g.etheridge@action-page.de>: authentication required
That's ok, no?
Can I apply SSL on smtp for outgoing mails?
Regards,
Mike
DirectAdmin Support
12-08-2009, 03:48 PM
Hello,
Are those domains yours, on this sever?
svju.msk.ru
action-page.de
etc..
If yes, your /etc/virtual/domains might be empty:
http://help.directadmin.com/item.php?id=113
Check over your entire /etc/virtual directory.
If you need to start the whole thing over, use this:
http://help.directadmin.com/item.php?id=66
however it will wipe out anything that you have (email accounts, password, etc..) so only run it if you don't need the data.
If no.. if they're not your domains, then those messages are fine and correct. Those message would be normal, since don't want to relay them, that would be bad.
This is another checklist you can go through to ensure everything is as it should be:
http://help.directadmin.com/item.php?id=16
John
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.