Koozali.org: home of the SME Server

Mails from SME Network to external server classified as Spam

Offline antares2001

  • **
  • 21
  • +0/-0
Mails from SME Network to external server classified as Spam
« 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.

cc_skavenger

Mails from SME Network to external server classified as Spam
« Reply #1 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

Offline antares2001

  • **
  • 21
  • +0/-0
Mails from SME Network to external server classified as Spam
« Reply #2 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.

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Mails from SME Network to external server classified as
« Reply #3 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.
...

Offline antares2001

  • **
  • 21
  • +0/-0
Mails from SME Network to external server classified as Spam
« Reply #4 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.

Offline raem

  • *
  • 3,972
  • +4/-0
Mails from SME Network to external server classified as Spam
« Reply #5 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
...

Offline antares2001

  • **
  • 21
  • +0/-0
Mails from SME Network to external server classified as Spam
« Reply #6 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.

Offline raem

  • *
  • 3,972
  • +4/-0
Mails from SME Network to external server classified as Spam
« Reply #7 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 ?
...

Offline antares2001

  • **
  • 21
  • +0/-0
Mails from SME Network to external server classified as Spam
« Reply #8 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:

Offline raem

  • *
  • 3,972
  • +4/-0
Mails from SME Network to external server classified as Spam
« Reply #9 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.
...

Offline antares2001

  • **
  • 21
  • +0/-0
Mails from SME Network to external server classified as Spam
« Reply #10 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)

Offline raem

  • *
  • 3,972
  • +4/-0
Mails from SME Network to external server classified as Spam
« Reply #11 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 ?
...

Offline raem

  • *
  • 3,972
  • +4/-0
Mails from SME Network to external server classified as Spam
« Reply #12 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.
...

Offline antares2001

  • **
  • 21
  • +0/-0
Mails from SME Network to external server classified as Spam
« Reply #13 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)
[...]

Offline raem

  • *
  • 3,972
  • +4/-0
Mails from SME Network to external server classified as Spam
« Reply #14 on: August 06, 2007, 02:46:35 PM »
antares2001

What is the name & web site of your Internet Service Provider ?
...