E-Mail for Public Folder is delivered wrong

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

Burner
Posts: 11
Joined: Wed Jul 18, 2007 5:45 pm

E-Mail for Public Folder is delivered wrong

Postby Burner » Wed Jul 18, 2007 5:55 pm

Hi!

I have set up a new Scalix Server. Today I installed and configured additionally the clamav and mailwasher services (Thanks for the great support and tutorials here!)

Things are getting better and better, i have successfully scanned outgoing and incoming mails, but one serious problem.

I've added an public folder for fetching some generally mail adresses (like info@...) but the mail do not appear.

I've tested this again trying to connect to the smtp server and putting some testmail directly to the service. The mail is accepted _but_ sent to the provider instead of delivering it do the maildir. It is relayed and sent back because there's no mailbox at the providers matching the internal adress.

All Userxy@host.com are delivered, but the info@host.com is sent back to the provider assuming it's an external mail...

I've deleted the public folder, deleted the public folder email entry and created both again, but still the same...

Any Ideas?

Thanks in advance

Matthias

Burner
Posts: 11
Joined: Wed Jul 18, 2007 5:45 pm

Postby Burner » Thu Jul 19, 2007 3:24 am

Some further note:

This problem occurs with _every_ public folder assigned some e-mail address. So these addresses are not recognized to be valid and the mail is relayed to the internet.

Is it possible that the mail filtering of mailwasher and or clamav is the problem? Is it possible to put the mailserver in a debug mode and try to find the mistake?

Thanks again

Matthias

btisdall
Scalix Star
Scalix Star
Posts: 373
Joined: Tue Nov 22, 2005 12:13 pm
Contact:

Postby btisdall » Thu Jul 19, 2007 7:22 am

Have the addresses actually been assigned as you want? Try searching the system directory, e.g. like this:

Code: Select all

omsearch -e "(INTERNET-ADDR=info@host.com)"


To fix the looping problem, make sure that your domains are listed in /etc/mail/local-host-names, so that any non-existent users are properly rejected.
Ben Tisdall
www.redcircleit.com
London

Burner
Posts: 11
Joined: Wed Jul 18, 2007 5:45 pm

Postby Burner » Thu Jul 19, 2007 9:54 am

Hello Ben,

thanks for your reply.

This is the reply of omsearch:
[root@scalix mail]# omsearch -e "(INTERNET-ADDR=gemuesekiste@rollende-gemuesekiste.com)"
S=+BB/OU1=scalix/DDT1=BB/DDV1=01 Gemeinsamer Posteingang/INTERNET-ADDR=gemuesekiste@rollende-gemuesekiste.com/EX-CDA-DIRECTORY=1

So, seems to be correct...

local-host-names contained no entries....i've inserted the "rollende-gemuesekiste.com"
entry. But i don't understand why the users are delivered correctly with the same domain without the entry.


Another telnet localhost 25 try:

[root@scalix mail]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 scalix.gemuesekiste.local ESMTP Sendmail 8.13.8/8.13.8; Thu, 19 Jul 2007 15:36:54 +0200
helo localhost
250 scalix.gemuesekiste.local Hello localhost.localdomain [127.0.0.1], pleased to meet you
mail from: mgoetz@bluetaurus.de
250 2.1.0 mgoetz@bluetaurus.de... Sender ok
rcpt to: gemuesekiste@rollende-gemuesekiste.com
550 5.1.1 gemuesekiste@rollende-gemuesekiste.com... User unknown

Before the edit the mail was accepted but relayed, no it's not accepted...

Before upgrading to Scalix 11.1 and integration of mailwasher and clamav this worked... but i don't know which step causes the problem...

Matt

btisdall
Scalix Star
Scalix Star
Posts: 373
Joined: Tue Nov 22, 2005 12:13 pm
Contact:

Postby btisdall » Thu Jul 19, 2007 11:25 am

What happens if you telnet to your host's IP address & try to deliver to your BB? (I'm assuming Scalix is listening here).
Ben Tisdall

www.redcircleit.com

London

Burner
Posts: 11
Joined: Wed Jul 18, 2007 5:45 pm

Postby Burner » Thu Jul 19, 2007 11:52 am

It's a litte difficult..:wink:

I have some mailboxes at the hoster... there we have the rollende-gemuesekiste.com domain. Then I have the provider for the internet access and the customer well-known and often used mail adress.

i'm fetching the mails using fetchmail on the scalix host and deliver it to the localhost / scalix.gemuesekiste.local configured for rollende-gemuesekiste.com. Outgoing mails are relayed to the providers rollende-gemuesekiste.com domain smtp server.

I know this is not the best way of implementation but works.....

Perhaps i try to disable the filters for mailwasher and clamav another time and enable them in two steps.

What do you think?

btisdall
Scalix Star
Scalix Star
Posts: 373
Joined: Tue Nov 22, 2005 12:13 pm
Contact:

Postby btisdall » Thu Jul 19, 2007 11:55 am

Cross-purposes - I just meant telnetting to your Scalix box's IP or hostname rather than localhost.
Ben Tisdall

www.redcircleit.com

London

KevinG
Posts: 25
Joined: Fri Jul 13, 2007 4:56 am
Location: Cheltenham, UK

Postby KevinG » Thu Jul 19, 2007 12:11 pm

Burner wrote:i'm fetching the mails using fetchmail on the scalix host and deliver it to the localhost / scalix.gemuesekiste.local configured for rollende-gemuesekiste.com. Outgoing mails are relayed to the providers rollende-gemuesekiste.com domain smtp server.

I think that is your problem. You should not be delivering it to localhost, you should be delivering it to the IP address of your ethernet card. Scalix listens for new mail on port 25 of the IP address of your ethernet card, but it leaves sendmail listening on port 25 at localhost.

btisdall
Scalix Star
Scalix Star
Posts: 373
Joined: Tue Nov 22, 2005 12:13 pm
Contact:

Postby btisdall » Thu Jul 19, 2007 12:19 pm

KevinG wrote:
Burner wrote:i'm fetching the mails using fetchmail on the scalix host and deliver it to the localhost / scalix.gemuesekiste.local configured for rollende-gemuesekiste.com. Outgoing mails are relayed to the providers rollende-gemuesekiste.com domain smtp server.

I think that is your problem. You should not be delivering it to localhost, you should be delivering it to the IP address of your ethernet card. Scalix listens for new mail on port 25 of the IP address of your ethernet card, but it leaves sendmail listening on port 25 at localhost.


Sendmail should know how to forward mail for Scalix users on if it's properly configured, so either should work (and does here).
Ben Tisdall

www.redcircleit.com

London

KevinG
Posts: 25
Joined: Fri Jul 13, 2007 4:56 am
Location: Cheltenham, UK

Postby KevinG » Thu Jul 19, 2007 12:32 pm

btisdall wrote:Sendmail should know how to forward mail for Scalix users on if it's properly configured, so either should work (and does here).

Yes it probably should. However, on my box with a default install of CentOS and a default install of Scalix it doesn't. I'm guessing the same is happening to him.

Kevin

btisdall
Scalix Star
Scalix Star
Posts: 373
Joined: Tue Nov 22, 2005 12:13 pm
Contact:

Postby btisdall » Thu Jul 19, 2007 12:52 pm

Hmmm, this config should happen as part of the standard install. I only have a v10 box to hand right now, but AFAIK the only change on v11 is that the config is done via m4 rather than omsendin:

Code: Select all

bentis@kramer:~$ grep -i scalix /etc/mail/sendmail.cf
Scalix Mappers and Trusted User
Komuser program /opt/scalix/bin/ommapsmtp
Komxport program /opt/scalix/bin/ommapsmtp -x
Tscalix
# The following lines were inserted for Scalix.  Ignore the preceding comment.
Rscalix         $#omxport$@ $( omxport $w $) $:scalix
Rscalix < @ $=w . >     $#omxport$@ $( omxport $1 $) $:scalix
Rscalix:$-:$+   $# scalix $@ $1 $: $2
# End of Scalix lines.  The Remaining names must be local
### Scalix mailers
Mscalix,  P=/opt/scalix/bin/unix.in, E=\n,  F=PDFMXmnu,  A=unix.in -s $h
Momxport,  P=/opt/scalix/bin/xport.in,  F=LMn, A=xport.in -s $h $u
Ben Tisdall

www.redcircleit.com

London

KevinG
Posts: 25
Joined: Fri Jul 13, 2007 4:56 am
Location: Cheltenham, UK

Postby KevinG » Thu Jul 19, 2007 1:06 pm

Ben,

I've only started playing with Scalix this week, so I'm just reporting what I am seeing, not questioning your knowledge.

It looks to me that Scalix listens on the IP address of eth0 port 25. It receives mail for addresses configured within Scalix but passes mail for unknown addresses on to sendmail at localhost port 25. In that way it makes sendmail responsible for handling bounces. If sendmail then handed it back to Scalix wouldn't that setup a mail loop?

Kevin

btisdall
Scalix Star
Scalix Star
Posts: 373
Joined: Tue Nov 22, 2005 12:13 pm
Contact:

Postby btisdall » Thu Jul 19, 2007 1:21 pm

KevinG wrote:Ben,

I've only started playing with Scalix this week, so I'm just reporting what I am seeing, not questioning your knowledge.
Kevin


Hey Kevin,

I didn't take it that way for a moment, I included those lines from sendmail as I was interested to see how they compared from the same command run on your system.

Regarding mail loops, that's what /etc/mail/local-host-names is for, it lets sendmail know that the host it's running on is the final destination for the domains therein. If sendmail receives a message to one of those domains that it can't deliver to Scalix or a local user it gives up, rather than forwarding on to the MX for the domain (i.e. itself), which creates the loop.

Best,

Ben.
Ben Tisdall

www.redcircleit.com

London

Burner
Posts: 11
Joined: Wed Jul 18, 2007 5:45 pm

Postby Burner » Thu Jul 19, 2007 1:28 pm

Ok, understand the problem...

fetchmail delivers to (part of fetchmailrc)

smtphost scalix.gemuesekiste.local
is gemuesekiste@rollende-gemuesekiste.com

aka. the scalix hostname / ip address.

The following test with no entries in local-host-names

telnet scalix.gemuesekiste.local 25
Trying 192.160.2.3...
Connected to scalix.gemuesekiste.local (192.160.2.3).
Escape character is '^]'.
220 scalix.gemuesekiste.local ESMTP Scalix SMTP Relay 11.1.0.10849; Thu, 19 Jul 2007 18:42:22 +0200 (CEST)
(....)
rcpt to: gemuesekiste@rollende-gemuesekiste.com
250 2.1.5 gemuesekiste@rollende-gemuesekiste.com... Recipient ok

The Mail is relayed to the provider and returns to the sender with mailbox unknown

Now i've added the rollende-gemuesekiste.com hostname in local-host-names and restarted sendmail.

The same telnet try (to scalix.gemuesekiste.local aka. the scalix server):
The mail is first accepted but then discarded with user unknown (gemuesekiste@rollende-gemuesekiste.com)

This is the maillog:
Jul 19 18:58:02 scalix sendmail[5323]: l6JGvujH005323: from=mgoetz@bluetaurus.de, size=264, class=0, nrcpts=1, msgid=<2166.10071184864278.scalix.gemuesekiste.local>, proto=ESMTP, relay=root@localhost
Jul 19 18:58:02 scalix sendmail[5325]: l6JGw2F3005325: from=<mgoetz@bluetaurus.de>, size=546, class=0, nrcpts=1, msgid=<2166.10071184864278.scalix.gemuesekiste.local>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Jul 19 18:58:02 scalix sendmail[5323]: l6JGvujH005323: to=gemuesekiste@rollende-gemuesekiste.com, delay=00:00:06, xdelay=00:00:00, mailer=relay, pri=30264, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (l6JGw2F3005325 Message accepted for delivery)
Jul 19 18:58:03 scalix sendmail[5331]: l6JGw2F3005325: to=<gemuesekiste@rollende-gemuesekiste.com>, delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=120546, relay=post.strato.de. [192.67.198.79], dsn=2.0.0, stat=Sent (queued as N00d4dj6JFbIEq)


I disabled the input filters for mailwasher and clamav but still the same. After viewing the logs you notice the two relays... first for localhost and then sendmail relays to post.strato.de

I don't understand why the users mail is delivered and the mail for the public folders is relayed...

Here's some headers for delivered mail (directly on the machine, the same way with telnet scalix-hostname 25) for a user:

Return-Path: <mgoetz@bluetaurus.de>
Received: from scalix.gemuesekiste.local (localhost.localdomain [127.0.0.1])

by scalix.gemuesekiste.local (8.13.8/8.13.8) with ESMTP id l6JHP0lm005423

for <userX@rollende-gemuesekiste.com>; Thu, 19 Jul 2007 19:25:00 +0200
Received: from scalix.gemuesekiste.local (root@localhost)

by scalix.gemuesekiste.local (8.13.8/8.13.8/Submit) with ESMTP id l6JHOu9Z005422

for userX@rollende-gemuesekiste.com; Thu, 19 Jul 2007 19:24:56 +0200
Received: from local (scalix.gemuesekiste.local [192.160.2.3])

by scalix.gemuesekiste.local (Scalix SMTP Relay 11.1.0.10849)

via ESMTP; Thu, 19 Jul 2007 19:24:59 +0200 (CEST)


:cry:

btisdall
Scalix Star
Scalix Star
Posts: 373
Joined: Tue Nov 22, 2005 12:13 pm
Contact:

Postby btisdall » Thu Jul 19, 2007 1:42 pm

Ok, my BBs look a bit different to yours, specifically, yours don't have the CN attrib, perhaps this is causing the issue. Can you try creating a new BB using the howto in the wiki & see how you go?

http://www.scalix.com/wiki/index.php?ti ... ic_Folders
Ben Tisdall

www.redcircleit.com

London


Return to “Scalix Server”



Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron