Page 1 of 1

Handing off to other servers

Posted: Fri Jun 15, 2007 5:20 pm
by kluss0
I came across this post which suggests that you can use something like this:

Code: Select all

omaddent -e "S=System/G=Tracking/OU1=internet/IA=mailman@lists.company.com=mailman@company.com"


to pass e-mail from the scalix server to another mail server. However, when I do this, Scalix passes the mail on to sendmail on localhost and the mail sits in the mailq and eventually comes back as undeliverable. The message in mailq is Deferred: Connection timed out with company.com .

What I am trying to do is run Mailman on an internal server (lists.comapny.com), and allow people from outside to send mail to the lists. So that mail should go to mailman@company.com from the outside, where Scalix (omsmtpd) should then send it to mailman@lists.company.com . From my mail server, I can use the mail command to send mail directly to mailman@lists.company.com, so I know that the smtp works. What I don't understand is why is Scalix handing the mail off to sendmail when there is an entry in the directory for it?

Thanks,
Kenny

Re: Handing off to other servers

Posted: Sat Jun 16, 2007 4:44 am
by btisdall
kluss0 wrote:What I don't understand is why is Scalix handing the mail off to sendmail when there is an entry in the directory for it?


Scalix uses sendmail for outbound smtp, so that's to be expected. Can you successfully send an email to mailman@lists.company.com from a Scalix connected client?

Posted: Sat Jun 16, 2007 8:26 am
by kluss0
Yes, mail to and from lists.company.com is fine internally. The problem is that if I send mail to mailman@company.com the scalix server won't pass the e-mail despite having the entry in the directory.

Posted: Sat Jun 16, 2007 8:58 am
by btisdall
I must admit I don't know how this is supposed to work... (Dave?)

If I do this I get a bounce message from omsmtpd saying:

Code: Select all

Recipient name not found at destination


Where this refers to the 'real' address specified on the command line.

Would creating a standard user & setting up a redirect with sxaa meet your requirement Kenny?

Posted: Sat Jun 16, 2007 9:11 am
by kluss0
I was thinking about that. If I use sxaa --redirect with the --retain option, it should leave the headers intact and allow Mailman to process the mail. I'll have to give that a shot.

Thanks,
Kenny

Posted: Mon Jun 18, 2007 12:17 pm
by KevinAnderson
what are the results from "dig -tMX lists.company.com"?

I suspect that the issue is that sendmail on the Scalix server doesn't know where to pass the message. If that's the case, you could either add the MX entry to your internal DNS, or use a mailertable entry to define it for sendmail.

This is assuming the user is actually valid on the lists server.

Thanks
Kev.

Posted: Mon Jun 18, 2007 2:22 pm
by kluss0
Kevin,

dig comes up empty because lists is not listed as a mail exchanger, it is just a host running sendmail and mailman.

It is my understanding that by adding the address to the directory using:

Code: Select all

 omaddent -e "S=List/G=Mailman/OU1=internet/IA=mailman@lists.company.com=mailman@company.com"


that sendmail shouldn't be involved. However, that proving to be false, sendmail does know what to do with the e-mail if I send it from the command line on the scalix server (company name replaced with 'company'):

[root@postal sys]# mail -v mailman@lists.company.com
Subject: test
test
.
Cc:
mailman@lists.company.com... Connecting to [127.0.0.1] via relay...
220 postal.company.com ESMTP Sendmail 8.13.1/8.13.1; Mon, 18 Jun 2007 12:45:18 -0400
>>> EHLO postal.company.com
250-postal.company.com Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
>>> MAIL From:<root@postal.company.com> SIZE=48 AUTH=root@postal.company.com
250 2.1.0 <root@postal.company.com>... Sender ok
>>> RCPT To:<mailman@lists.company.com>
>>> DATA
250 2.1.5 <mailman@lists.company.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 l5IGjI9v025088 Message accepted for delivery
mailman@lists.company.com... Sent (l5IGjI9v025088 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 postal.company.com closing connection

Also works for mail sent to mailman without the hostname/fqdn:

[root@postal sys]# mail -v mailman
Subject: test2
test2
.
Cc:
mailman... Connecting to [127.0.0.1] via relay...
220 postal.company.com ESMTP Sendmail 8.13.1/8.13.1; Mon, 18 Jun 2007 12:54:17 -0400
>>> EHLO postal.company.com
250-postal.company.com Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
>>> MAIL From:<root@postal.company.com> SIZE=34 AUTH=root@postal.company.com
250 2.1.0 <root@postal.company.com>... Sender ok
>>> RCPT To:<mailman@postal.company.com>
>>> DATA
250 2.1.5 <mailman@postal.company.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 l5IGsHpu026842 Message accepted for delivery
mailman... Sent (l5IGsHpu026842 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 postal.company.com closing connection

and the accompanying mail.log entry:

Jun 18 12:54:17 postal sendmail[26842]: l5IGsHpu026842: from=<root@postal.company.com>, size=323, class=0, nrcpts=1, msgid=<200706181654.l5IGsHiq026841@postal.company.com>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Jun 18 12:54:17 postal sendmail[26841]: l5IGsHiq026841: to=mailman, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30034, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (l5IGsHpu026842 Message accepted for delivery)
Jun 18 12:54:18 postal sendmail[26847]: l5IGsHpu026842: to=mailman@lists.company.com, ctladdr=<root@postal.compnay.com> (0/0), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=30548, relay=lists.company.com. [10.0.0.20], dsn=2.0.0, stat=Sent (l5IGp6Ir014128 Message accepted for delivery)


The problem seems to be somewhere in the handoff from Scalix to sendmail. Scalix accepts the mail, but it's not finding the directory entry that should be converting mailman@company.com to mailman@lists.company.com. I have tried adding an entry in /etc/aliases as well, and that doesn't work, either if the mail comes through Scalix first (works correctly from the command line as seen above). Whenever I send from the outside, it goes right through Scalix to sendmail, and it gets deferred:

l5IGUdcX023708 5 Mon Jun 18 12:30 <klussier@<email redacted>.net>
(Deferred: Connection timed out with company.com.)
<mailman@company.com>

Thanks,
Kenny

Posted: Tue Jun 19, 2007 10:53 am
by kluss0
I have found a few ways of doing what I am trying to accomplish:

http://www.scalix.com/wiki/index.php?ti ... os/Forward
http://www.scalix.com/wiki/index.php?ti ... on_Plugins

However, they both say to create an internet user, then use sxaa --user email@company.com:

omaddu -n <account>/<mailnode>/internet-addr=<email@domain.com> --swa N --class limited --lock-password
sxaa --user <email@domain.com> --redirect <redirected@newdomain.com>

Unfortunately, sxaa doesn't let you use an email address as a username, and if it is an internet-only user, it complans that there is no user directory:

omshowu : [OM 8040] The user can't be found, or has been deleted.

Unable to determine user's home directory

What I have found is that I can create a standard user and use sxaa to redirect the mail and it seems to work OK. I'm still not sure why the other method no longer works.

Thanks,
Kenny