Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: antares2001 on August 02, 2007, 12:27:49 PM

Title: Mails from SME Network to external server classified as Spam
Post by: antares2001 on August 02, 2007, 12:27:49 PM
Hello!

I've got a problem: I have set-up a network with the SME Server. The clients from the network however do not use the SME server as SMTP (as this is a dynamic address), but use an external mailserver with static IP which hosts the company's domain.

My problem is, that mails get marked as spam with the following explanation even if they are sent to an email address on the same domain (eg. tobi@example.com -> mark@example.com):

Code: [Select]
Content analysis details:   (4.4 points, 3.0 required)

 pts rule name              description
---- ---------------------- --------------------------------------------------
 1.3 TRACKER_ID             BODY: Incorporates a tracking ID number
 0.0 HTML_MESSAGE           BODY: HTML included in message
 1.2 RCVD_IN_SORBS_WEB      RBL: SORBS: sender is a abuseable web server
                            [89.172.37.234 listed in dnsbl.sorbs.net]
 0.0 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
                            [89.172.37.234 listed in zen.spamhaus.org]
 2.0 RCVD_IN_SORBS_DUL      RBL: SORBS: sent directly from dynamic IP address
                            [89.172.37.234 listed in dnsbl.sorbs.net]
 1.7 RCVD_IN_NJABL_DUL      RBL: NJABL: dialup sender did non-local SMTP
                            [89.172.37.234 listed in combined.njabl.org]
-1.8 AWL                    AWL: From: address is in the auto white-list


The IP 89.172.37.234 however isn't the IP of the external mailserver but the dynamically assigned address to the router in the LAN.

The SMTP Proxy in SME-Server webinterface is turned off and I have added the information for an external mailserver.

Where's the problem here? It seems to be using the SME's SMTP instead of the external mailserver.

Thank you in advance for your advices.
Title: Mails from SME Network to external server classified as Spam
Post by: cc_skavenger on August 03, 2007, 07:11:53 AM
Read the Manual....  SME has a SMTP proxy enabled by default.  This allows the server to scan the e-mail with the antivirus that is installed.  You need to turn this proxy off to fix your issue.

HTH
Title: Mails from SME Network to external server classified as Spam
Post by: antares2001 on August 03, 2007, 10:54:50 AM
Hello!

To quote my first post:

Quote
The SMTP Proxy in SME-Server webinterface is turned off and I have added the information for an external mailserver.


So I have disabled this proxy but this still happens.

Of course I've consulted the manual first.
Title: Re: Mails from SME Network to external server classified as
Post by: raem on August 03, 2007, 11:40:06 AM
antares2001

As I read it, the problem is not with your sme server
The issue is caused primarily by your sme servers dynamic external IP address being listed on external black lists.
Your external smtp server is referring to these lists and "correctly" blocking mail from you.

I suggest turning the sme servers smtp proxy back on, and then adding your ISP's mail server details in the email server manager panel (not the delegate mail server field). Then configure your email clients to send via the sme mail server.

Mail will then be sent via your ISP and your ISPs IP "should not" be blacklisted.
Title: Mails from SME Network to external server classified as Spam
Post by: antares2001 on August 06, 2007, 10:52:04 AM
Hello and thanks for your answers!

I'm a bit confused where to enter what now... Would it be a big problem to provide one or two screenshots?

Another problem is that - if I use the SME server directly as SMTP server in my mail programs - and send a mail to anybody outside the LAN, the mail is not delivered and admin gets the following mail:

Quote
Hi. This is the qmail-send program at xyz.lan.
I tried to deliver a bounce message to this address, but the bounce bounced!

<----@-----.com>:
Sorry, I couldn't find any host named localhost. (#5.1.2)

--- Below this line is the original bounce.

Return-Path: <>
Received: (qmail 19757 invoked for bounce); 6 Aug 2007 08:54:48 -0000
Date: 6 Aug 2007 08:54:48 -0000
From: MAILER-DAEMON@xyz.lan
To: ----@-----.com
Subject: failure notice

Hi. This is the qmail-send program at xyz.lan.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<----@-----.net>:
Sorry, I couldn't find any host named localhost. (#5.1.2)

--- Below this line is a copy of the message.

Return-Path: <----@-----.com>
Received: (qmail 19751 invoked by uid 453); 6 Aug 2007 08:54:47 -0000
X-Virus-Checked: Checked by ClamAV on xyz.lan
Received: from Unknown (HELO [192.168.1.60]) (192.168.1.60)
    by xyz.lan (qpsmtpd/0.40) with ESMTP; Mon, 06 Aug 2007 10:54:47 +0200
Message-ID: <46B6E1D2.5060900@-----.com>
Date: Mon, 06 Aug 2007 10:54:42 +0200
From: ---- ---- <----@-----.com>
User-Agent: Thunderbird 2.0.0.0 (X11/20070326)
MIME-Version: 1.0
To:  ----@-----.net
Subject: Test
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Test


For privacy reasons I've changed names and domains.

Delivery to users known to the SME server works without any problems (name@xyz.lan).

Thanks a lot.
Title: Mails from SME Network to external server classified as Spam
Post by: raem on August 06, 2007, 11:42:32 AM
antares2001

Quote
I'm a bit confused where to enter what now...


Unfortunately my advice and cc_skavenger's advice conflict.
The details of your setup are a bit vague.

To follow my advice do this:
Server manager/Configuration/Email/Change e-mail delivery settings/SMTP server/Address of Internet provider's mail server
eg mail.yourISP.com

Also enable your smtp proxy again
Server manager/Security/Proxy settings/SMTP Proxy status
Set this to Enabled
Title: Mails from SME Network to external server classified as Spam
Post by: antares2001 on August 06, 2007, 11:46:35 AM
Hello!

Thanks. I've done this and get the problematic message I've just added to my upper post whenever anybody is trying to send a mail to a receiver outside the LAN.

What could be the problem here?

Thanks a lot for your help.
Title: Mails from SME Network to external server classified as Spam
Post by: raem on August 06, 2007, 12:31:12 PM
antares2001

Quote
....I have added the information for an external mailserver.


Originally you said the above.
Do you have a server (ie your external mail server IP) configured in the Delegate mail server field ?
Title: Mails from SME Network to external server classified as Spam
Post by: antares2001 on August 06, 2007, 12:52:56 PM
Hello!

So perhaps to make all a bit clearer:

I have a SME server up and running for a local network which is named example.lan (so it does not interfere with the example.com domain that is hosted externally for web and mail).

The SME server is behind an internet router which gets a dynamic IP address. So far the SMTP proxy is turned off.

I can use the SME server's SMTP server to send emails inside the LAN (e.g. from a@example.lan to b@example.lan).

Now I want to send mails through the SME server from e.g. a@example.com (who's corresponding SME account is a@example.lan) to anyone on the internet.

And here's my problem. Mails that are sent through the SME server (when proxy is turned on) don't get through but deliver a qmail error message and are lost. The message in /var/log/qmail/current is e.g.:

Quote
@4000000046b6e6c91e2717e4 new msg 2656775
@4000000046b6e6c91e272b6c info msg 2656775: bytes 564 from <a@example.lan> qp 24942 uid 453
@4000000046b6e6c91e67f174 starting delivery 20: msg 2656775 to remote someone@somewhere.com
@4000000046b6e6c91e682054 status: local 0/10 remote 1/20
@4000000046b6e6c91f2aa91c delivery 20: failure: Sorry,_I_couldn't_find_any_host_named_localhost._(#5.1.2)/
@4000000046b6e6c91f2ce754 status: local 0/10 remote 0/20
@4000000046b6e6c91fb90a54 bounce msg 2656775 qp 24944
@4000000046b6e6c91fba4e8c end msg 2656775


I have added my external provider's information to the SME webinterface (external mailserver's name example.com, username and password for SMTP authentication).

When I send a mail through the HORDE webmail interface on the SME server, I get the same logfile entry in qmail and the admin gets a failure notice from the mailer daemon as stated above.

I hope this is now clearer for you.

Here a screenshot: (http://img172.imageshack.us/img172/544/bildschirmfotosl2.th.png) (http://img172.imageshack.us/my.php?image=bildschirmfotosl2.png)
Title: Mails from SME Network to external server classified as Spam
Post by: raem on August 06, 2007, 01:19:39 PM
antares2001

Quote
I have added my external provider's information to the SME webinterface (external mailserver's name example.com, username and password for SMTP authentication).


This should be the mail server address for your Internet Service Provider (ISP) and NOT for your external hosted domain eg
mail.yourISP.com
not
mail.example.com
(You said your external domain is example.com)

You only need to enter user and password information if your ISP requires authenticated SMTP login.
Title: Mails from SME Network to external server classified as Spam
Post by: antares2001 on August 06, 2007, 01:57:01 PM
The domain example.com handles the mail for example.com (rootserver). And SMTP requires authentication. The values entered are the same as users enter in Outlook or Thundebird.

The problem is that the example.com server even does not show any contact from the SME server in the logs. So the problem seems to be in the qmail configuration of the SME server (see also the error messages from the SME server where it sais that localhost is unknown).

Quote
delivery 20: failure: Sorry,_I_couldn't_find_any_host_named_localhost._(#5.1.2)
Title: Mails from SME Network to external server classified as Spam
Post by: raem on August 06, 2007, 02:20:44 PM
antares2001

Your original issue is that mail sent from your sme server using a dynamic IP connection provided by your Internet Service Provider eg telecom.de, is being detected as spam. This is happening because your connection from your sme server to your example.com mail server is using a dynamic IP.
This dynamic IP is given out by your ISP eg telecom.de.
As all dynamic IPs are listed on blacklists these days, then your mail is being detected as spam by the example.com mail server.

In effect this means that your sme server mail server (example.lan) is not reputable.
To circumvent this detection you need to send your mail via a reputable mail server eg your ISP's mail server which would have a name like mail.telecom.de. It will then deliver mail to the mail.example.com mail server and as mail.telecom.de will undoubtedly be using a static IP, then your mail will not be detected as spam.

What is the name & web site of your Internet Service Provider ?
Title: Mails from SME Network to external server classified as Spam
Post by: raem on August 06, 2007, 02:34:57 PM
antares2001

Quote
The domain example.com handles the mail for example.com (rootserver). And SMTP requires authentication. The values entered are the same as users enter in Outlook or Thundebird.
The problem is that the example.com server even does not show any contact from the SME server in the logs.


In addition to my comments in the previous message.

You say that your clients are using mail.example.com, which means they are trying to deliver messages directly to the external mail server at mail.example.com.

Obviously no messages will go via your sme server in that configuration.

You need to enable SMTP Proxy in your sme server, configure your ISPs mail server as mentioned previously, and you need to change the email clients on your LAN to use mail.example.lan as their mail server.
That way mail will be sent via your sme server, and then via your ISP, and then delivered to mail.example.com.
Title: Mails from SME Network to external server classified as Spam
Post by: antares2001 on August 06, 2007, 02:44:13 PM
What you say is exactly what I've done and what delivered/es me the qmail error messages.

Code: [Select]

# cat /var/log/qmail/current
[...]
delivery 20: failure: Sorry,_I_couldn't_find_any_host_named_localhost._(#5.1.2)
[...]
Title: Mails from SME Network to external server classified as Spam
Post by: raem on August 06, 2007, 02:46:35 PM
antares2001

What is the name & web site of your Internet Service Provider ?
Title: Mails from SME Network to external server classified as Spam
Post by: raem on August 06, 2007, 02:51:02 PM
antares2001

What does this show, and please do not obfuscate it (delete or hide it).

config show SMTPSmartHost
Title: Mails from SME Network to external server classified as Spam
Post by: antares2001 on August 06, 2007, 02:56:28 PM
The ISP is T-Com and the connection is a standard T-DSL Connection.

Anway - the SMTP server for example.com is Postfix on the server example.com.
Title: Mails from SME Network to external server classified as Spam
Post by: raem on August 06, 2007, 03:24:40 PM
antares2001

Quote
The ISP is T-Com and the connection is a standard T-DSL Connection


I'm guessing that is www.t-com.hr
If so then the setting for smtp mail server in server manager that you should be using is something like
mail.t-com.hr
(depending of course on what the exact name of their mail server is).

Quote
the SMTP server for example.com is Postfix on the server example.com


That is not relevant. You want to send your mail via the t-com smtp mail server.
Title: Mails from SME Network to external server classified as Spam
Post by: antares2001 on August 06, 2007, 03:34:54 PM
So I am not able to use the example.com mailserver? I don't really get the reason for that, because that is the server I'd like to use (there's some statistics done, further checks, ...).

Is there any possibility to use the SMTP-Server of example.com?
Title: Mails from SME Network to external server classified as Spam
Post by: raem on August 06, 2007, 03:54:15 PM
antares2001

Quote
I don't really get the reason for that, because that is the server I'd like to use (there's some statistics done, further checks, ...).


Read my earlier explanations, the example.com server is treating your mail as spam. The report is in your first post that shows this.

Quote
Is there any possibility to use the SMTP-Server of example.com?


You say you have already tried using the smtp server of example.com and you get errors or your mail gets detected as spam.
You have to contact whoever is administering mail.example.com and get them to totally whitelist all mail coming from your sme server or your LAN, rather than score it as spam.

I personally don't think you have your system setup correctly but you seem unwilling to provide sufficient details that would help determine this.
Title: Mails from SME Network to external server classified as Spam
Post by: raem on August 06, 2007, 04:16:26 PM
antares2001

As an experiment to see if what I'm suggesting fixes your problem, can you use your ISPs mail server ie mail.t-com.hr or smtp.t-com.hr or whatever it is (find out from T-Com what the correct name is of course).

If it works then you have an answer. Once you have identified the problem, you will then need to find a workaround that uses mail.example.com (if possible).
Title: Mails from SME Network to external server classified as Spam
Post by: antares2001 on August 06, 2007, 04:38:42 PM
I've actually found one error in the SME configuration.

The config-file /var/qmail/control/smtproutes contained the line

Code: [Select]
:localhost:26

what I've now changed to

Code: [Select]
:127.0.0.1:26

and there is no more an error message that localhost can't be found. So this is definitely a configuration problem of qmail on the SME server.

I can't understand this as the SMTP server of example.com wouldn't treat the mails as spam if the SME server logged into example.com's mailserver. But SME didn't do that when mail was sent but always acted itself as SMTP. In example.com's logs are no login-trys of the SME server. :-(

I will now try another SMTP server to see if this fixes the problem.
Title: Mails from SME Network to external server classified as Spam
Post by: raem on August 06, 2007, 04:48:42 PM
antares2001

Quote
The config-file /var/qmail/control/smtproutes contained the line
:localhost:26
what I've now changed to
:127.0.0.1:26


In that file on my server it says the name of my ISPs mail server
eg
mail.telstra.com.au

What changes have you made to your server ?
What contribs have you installed ?
Title: Mails from SME Network to external server classified as Spam
Post by: antares2001 on August 06, 2007, 04:59:43 PM
Actually this did it.

Now email works fine with no problems.

The SMTP Proxy of SME takes the mail, logs in at examle.com's SMTP, sends the mail from there and everything is perfect.

No false-spam marking, no problems.

Hope this will help anyone who gets into the same troubles as me. Obviously qmail can't resolve localhost to 127.0.0.1 although it is written down in the /etc/hosts file.

Thank you anyway for your assistance.
Title: Mails from SME Network to external server classified as Spam
Post by: antares2001 on August 06, 2007, 05:22:22 PM
Quote from: "RayMitchell"
antares2001

Quote
The config-file /var/qmail/control/smtproutes contained the line
:localhost:26
what I've now changed to
:127.0.0.1:26


In that file on my server it says the name of my ISPs mail server
eg
mail.telstra.com.au

What changes have you made to your server ?
What contribs have you installed ?


Actually I made no big changes to my server. I've never touched anything connected to email except from the web interface.

I've installed some contribs like SARG, ... which are from the contribs.org site.

But the error message I was mentioning above is in fact correctly pointing to this. But as I've never used qmail before I wasn't able to figure it out immediately. Obviously the regerneration-script in /etc/e-smith/templates doesn't enter the correct information there.

But another question - isn't that 127.0.0.1:26 correct? I mean this is the SMTP proxy, isn't it? This takes the mail, scans it for viruses and then sends it through the SMTP server of example.com.

So far so good... it's doing the job now and I am happy :-) Anyhow the developers should be informed of this so they can build-in extra control mechanisms for that. (Why doesn't it resolve localhost to 127.0.0.1???)

The server was before 7.1.3 and I've upgraded to 7.2

P.S.: As I am no native english speaker I'd like to apologize for my mistakes and errors and perhaps wrong constructed sentences.