hMailServer as Backup-MX

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
gruenie
Senior user
Senior user
Posts: 299
Joined: 2004-01-23 03:25
Location: Germany, Halle

hMailServer as Backup-MX

Post by gruenie » 2014-01-22 21:57

Hi to all again after some time!

I try to install one hMailServer as a Backup-Mx and I'm quite sure that I did all as suggested in the documentation (setting up a SMTP-route to the target mailserver).
The Backup-MX receives new messages (if the other is unreachable) but it is impossible to forward them to the target server when it is back online.
After enabling logging I get the following error-message (anyway if I set the target address as ip or hostname):

"SMTPC" 8768 0 "2014-01-22 20:37:27.131" "TCP" "SMTPDeliverer - Message 1 - Connection failed: Host name: xxx.xxx.xxx.xxx, message: Die angeforderte Adresse ist in diesem Kontext ungültig"

I have bno idea why the message is in German - but it means: "The requested address is invalid in this context." Has anyone an idea what that means and where the problem can be?

Thanx for any suggestions in advance.

Gruenie
Errare humanum est, sed in errare perseverare diabolicum!

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMailServer as Backup-MX

Post by Bill48105 » 2014-01-22 22:59

Hi. That error must be passed back from Windows likely from DNS lookup. Do dns/mx lookup from command-prompt for that same server/ip & see what you get. Look closer at the logs for anything out of the ordinary. Could be typo or misconfiguration in hmail but hard to say without seeing your logs & settings. :)
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

gruenie
Senior user
Senior user
Posts: 299
Joined: 2004-01-23 03:25
Location: Germany, Halle

Re: hMailServer as Backup-MX

Post by gruenie » 2014-01-23 01:01

HI Bill,

thanx for the answer!
I tryed dns/mx lookups and all seems to be ok (host->IP and IP->host) on both machines (Backup-MX and MX).
Furthermore I think that is not the problem because I also tried to set the IP of the MX in the rout of the Backup-MX.

What do you need in the protokoll (and on which server) to see more? I will do it.
Maybe I have a misconfiguration in the Backup-MX?

Gruenie
Errare humanum est, sed in errare perseverare diabolicum!

gruenie
Senior user
Senior user
Posts: 299
Joined: 2004-01-23 03:25
Location: Germany, Halle

Re: hMailServer as Backup-MX

Post by gruenie » 2014-01-23 01:17

Hi Bill,
again me.
What I have to setup in the Backup-MX.
I thought just a route in Settings->SMTP->Routes.
Or what else?
If I undertsand right I don't have to setup the backup-domain under "Domains"?!

Gruenie
Errare humanum est, sed in errare perseverare diabolicum!

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMailServer as Backup-MX

Post by Bill48105 » 2014-01-23 01:22

gruenie wrote:Hi Bill,
again me.
What I have to setup in the Backup-MX.
I thought just a route in Settings->SMTP->Routes.
Or what else?
If I undertsand right I don't have to setup the backup-domain under "Domains"?!

Gruenie
NO don't add the domain like regular domains. The domain being in Route is enough if you set internal vs external options right.

I still say that error is from Windows & not hmail. Google the german error & find it places like:
http://support.microsoft.com/kb/819124/de
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

gruenie
Senior user
Senior user
Posts: 299
Joined: 2004-01-23 03:25
Location: Germany, Halle

Re: hMailServer as Backup-MX

Post by gruenie » 2014-01-23 10:19

Hello Bill,

again thanx for the answer, your time and the advice.
Now I also think so, that it has to do with windows - just because of the German text in the error message because hmailserver would not give german descriptions.
From all what I find out after your advice it seems to be the following:
WSAEADDRNOTAVAIL (10049)
Cannot assign requested address.
The requested address is not valid in its context. Normally results
from an attempt to bind to an address that is not valid for the local
machine, or connect/sendto an address or port that is not valid for a
remote machine (e.g. port 0).
The reason for all thtat is obviousely to find in the Backup-MX because the MX alone works fine.
Although it is obviously not a problem of hmailserver, do you have any ideas where I could find the solution or what I could try to localize the causes?

So it seems that my settings for the Backup-MX are right (I did not set an domain under "Domains"), just the route.
Strange is, that the Backup-MX is able to recieve the messages but is unable to send them on the same port (25).
Before I had another server with the same public IP at the place where the new machine with the hmailserver-Backup-MX is running now. On the old machine worked Symantec Antivirus for SMTP-Gteways as a pre-Mailserver and all was fine.
I'm thankful for any advice!

Gruenie
Errare humanum est, sed in errare perseverare diabolicum!

gruenie
Senior user
Senior user
Posts: 299
Joined: 2004-01-23 03:25
Location: Germany, Halle

Re: hMailServer as Backup-MX

Post by gruenie » 2014-01-23 16:55

Hi Bill,

the problem is solved!
Its neither a problem of hmailserver nor of Windows 7!
The problem is "Symantec Endpoint Protection Small Business 12.1"!

After many hours of reseach I found the following posting here:
http://www.hmailserver.com/forum/viewto ... 86#p122686 .

The posting is from 2011 and the user was speaking about "Norton Antivirus"; so I tried a similar solution and deactivated the "Webmail Protection" and "Protection for Outlook" in SEP SMB 12.1 - and now all wokred as it should!
Very strange! I have no idea about the deeper causes, but the effect is as mentioned.
So I reinstalled SEP SMB 12.1 and unchecked the "Email-Protection" in one of the first screens in the installation precess. I did it because if you just disable the 2 mentioned features in the full installation you always get a warning that it is disabled...

I don't know if that problem happens in other configurations too.
My configuration is:
Windows 7 x64, SEP SMB 12.1 (newest version) and hMailServer 5.4 - Build 1950.

Nevertheless thank you for your help again. As always you did a great job!

By the way: Do you know somebody who got SEP SMB 12.1 up and running together with hMailServer as an integrated "external" virus scanner?
But I will open a new thread for it.

Gruenie
Errare humanum est, sed in errare perseverare diabolicum!

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMailServer as Backup-MX

Post by Bill48105 » 2014-01-23 17:32

Hey Gruenie,
Ahh yeah that'd explain it. It was acting as firewall or transparent proxy and why it's bad idea on a mail server. :)

Sorry can't say I do know but if it gives command-line scanner & known result codes it should be possible. Understand though that except for very low usage servers command-line scanners are normally a bad idea since they usually cause very heavy load & memory usage when they start up & load defs. Multiple that by however many concurrent SMTP sessions you allow & can bring server to its knees. Now if it is client/server based like clamd+clamc, or database-based doing queries vs loading defs then it might not be so bad. Best option on server is likely ClamD with the ClamC client built into hmail.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

gruenie
Senior user
Senior user
Posts: 299
Joined: 2004-01-23 03:25
Location: Germany, Halle

Re: hMailServer as Backup-MX

Post by gruenie » 2014-01-23 22:58

Hai Bill,

well, but nevertheless the behaviour of Symantec Endpoint Protection looks strange for me.
The both disabled/uninstalled parts of it are "Webmail Protection" and "Protection for Outlook".
What has the short-time storing and "forwarding" of an *.eml-file to do with a webmail-system or outllok and why SEP prevent the delivery of every mail in the data-folder of hMS, anyway whether there is a virus?

Anyway, luckily we got it. :-)

About the other question I will answer in the other thread.

Thanx again.

Gruenie
Errare humanum est, sed in errare perseverare diabolicum!

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMailServer as Backup-MX

Post by Bill48105 » 2014-01-24 00:17

gruenie wrote:Hai Bill,

well, but nevertheless the behaviour of Symantec Endpoint Protection looks strange for me.
The both disabled/uninstalled parts of it are "Webmail Protection" and "Protection for Outlook".
What has the short-time storing and "forwarding" of an *.eml-file to do with a webmail-system or outllok and why SEP prevent the delivery of every mail in the data-folder of hMS, anyway whether there is a virus?

Anyway, luckily we got it. :-)

About the other question I will answer in the other thread.

Thanx again.

Gruenie
You saw the reason yourself. The AV/firewall transparently blocks the connection causing errors. Confusing errors. In addition the AV scan causes timing delays at the file system level & can cause problems or worse it can delete the file & hmail is left hanging with no file.
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

gruenie
Senior user
Senior user
Posts: 299
Joined: 2004-01-23 03:25
Location: Germany, Halle

Re: hMailServer as Backup-MX

Post by gruenie » 2014-01-24 00:26

LOL, yes you are right.
But is that the sense and the task of a virus scanner to do such things?
That was my question and outrage! ;-)
Errare humanum est, sed in errare perseverare diabolicum!

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: hMailServer as Backup-MX

Post by Bill48105 » 2014-01-24 00:30

gruenie wrote:LOL, yes you are right.
But is that the sense and the task of a virus scanner to do such things?
That was my question and outrage! ;-)
Right indeed that is the purpose of a real-time AV scanner & in a workstation environment where a person is using the computer & can read dialogs & act on it is one thing but but also the reason it should not be used like that in a server environment too. :)

In the end odds are hmail will survive but don't complain when you get weird errors in logs, user's yelling about errors in email clients & clients or users complaining about bouncing with cryptic "file missing" errors instead of useful "infected email blocked" emails.
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

gruenie
Senior user
Senior user
Posts: 299
Joined: 2004-01-23 03:25
Location: Germany, Halle

Re: hMailServer as Backup-MX

Post by gruenie » 2014-01-24 01:37

You're talking out of my soul! :-)
That is what I meant!
Errare humanum est, sed in errare perseverare diabolicum!

Post Reply