SMTP Relay and Sendmail interaction

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

nkm
Posts: 11
Joined: Mon Oct 02, 2006 8:30 am
Location: Greece

SMTP Relay and Sendmail interaction

Postby nkm » Thu Nov 30, 2006 6:09 am

Hi all

Simple question, as I understand it, the SMTP Relay process listens on port 25, accepts e-mails and if SMTPFILTER=TRUE passes the message to sendmail, where it does it's thing, and passes it back.

However my question is where do I configure RBL testing, as sendmail sees the IP of the machined that relayed the message as 127.0.0.1.

Looking for best practice sort of thing

Regards

Valerion
Scalix Star
Scalix Star
Posts: 2730
Joined: Thu Feb 26, 2004 7:40 am
Location: Johannesburg, South Africa
Contact:

Postby Valerion » Thu Nov 30, 2006 7:16 am

I usually set up a relay server (in the DMZ) that's in front of Scalix. That machine can then do basic checking (relaying, RBL, etc), and send Scalix the messages that remains. Alternatively you can let sendmail do all the mail relaying, instead of the SMTP Relay, which will still allow for this kind of filtering. I am not sure if any of the other milters can do this, but that is also possible.

nkm
Posts: 11
Joined: Mon Oct 02, 2006 8:30 am
Location: Greece

Postby nkm » Thu Nov 30, 2006 8:43 am

How do I configure sendmail to do this and still allow sendmail and DMTP Relay to interact (both on same server).

Regards

Valerion
Scalix Star
Scalix Star
Posts: 2730
Joined: Thu Feb 26, 2004 7:40 am
Location: Johannesburg, South Africa
Contact:

Postby Valerion » Thu Nov 30, 2006 9:14 am

To have sendmail listen directly to incoming mail you will have to disable the SMTP relay.

1) omsetsvc -a smtpd n
2) omoff -d0 -w smtpd
3) edit sendmail.mc and change
DAEMON_OPTIONS(`Port=smtp, Addr=127.0.0.1, Name=MTA')dnl
to
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
4) Rebuild sendmail.cf
5) omsendin

In Scalix's case sendmail either needs to listen to the incoming port itself, if you have to know the relay address, or the process passing the information to it needs to handle the RBL, which SMTP Relay can't do as of yet. It may be possible to have a milter read the headers and determine the relays in between, but I don't know of such a milter.

grahamk
Posts: 134
Joined: Fri Mar 02, 2007 4:53 am

Postby grahamk » Mon May 21, 2007 9:16 am

Great answer Valerion, I'm not sure if people will also need to restart sendmail?

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

Postby btisdall » Mon May 21, 2007 12:24 pm

grahamk wrote:Great answer Valerion, I'm not sure if people will also need to restart sendmail?


omsendin takes care of that.
Ben Tisdall
www.redcircleit.com
London

dbroll

Postby dbroll » Wed Jan 16, 2008 3:30 pm

If I apply this solution, I can send mail through the Outlook connector but I can no longer send mail through SWA. I must have something misconfigured somewhere... any ideas?

Thanks!

techsharp
Posts: 436
Joined: Tue Jan 16, 2007 9:01 pm

Postby techsharp » Wed Jan 16, 2008 3:48 pm

dbroll:

Here is the post I made and Valerion gives the config for SWA as well

viewtopic.php?t=9747

dbroll

Postby dbroll » Wed Jan 16, 2008 4:05 pm

Thanks techsharp!

I will try it out.

techsharp
Posts: 436
Joined: Tue Jan 16, 2007 9:01 pm

Postby techsharp » Wed Jan 16, 2008 5:39 pm

No problem-

basically edit the swa.properties file in /var/opt/scalix/??/webmail

edit the smtpServer line and add :587 to the end of it - for example

swa.email.smtpServer=emailserver.net:587

after that restart tomcat and webmail should work great.

dougp23
Posts: 229
Joined: Thu Feb 15, 2007 2:42 pm

Postby dougp23 » Wed Apr 30, 2008 2:22 pm

OK, so I thought I would resurrect this thread after a few PMs between me and techsharp.

Here are the changes summarized, Valerion and techsharp can correct me if I am wrong.

STEP 1.

In sendmail.mc change

DAEMON_OPTIONS(`Port=smtp, Addr=127.0.0.1, Name=MTA')dnl

to

DAEMON_OPTIONS(`Port=smtp,Name=MTA')dnl

Rebuild sendmail.cf ( m4 sendmail.mc > sendmail.cf)

STEP2.

Setup the webmail interface.

Edit /var/opt/scalix/xx/webmail/swa.properties

Find the line that starts with

swa.email.smtpServer and add a :587 to the end of the line. For instance, if the line was
swa.email.smtpServer=mail.mymail.com
it should now be
swa.email.smtpServer=mail.mymail.com:587

STEP3.

Edit smtpd.cfg to not listen on port 25

Uncomment SUBMIT=ON. Right above this line add
SMTP=OFF

Find the section that starts with
[SUBMIT]
And add your server name with the port 587 directive, i.e.

[SUBMIT]
Listen=mail.mymail.com:587

Reboot the box just to restart everything!
Check out my "Life with Scalix" blog at
http://swifttide.com/blog

ra
Posts: 30
Joined: Thu Dec 07, 2006 5:34 am

Postby ra » Fri May 02, 2008 4:54 am

Hi,

Will this configuration allow Sendmail to log all incoming and outgoing email in/var/log/maillog?

dougp23
Posts: 229
Joined: Thu Feb 15, 2007 2:42 pm

Postby dougp23 » Fri May 02, 2008 2:41 pm

Where sendmail logs messages is a function of syslog, but under CentOS4, it is /var/log/maillog.

If you use a different Linux, then:

$ grep mail /etc/syslog.conf
# Log anything (except mail) of level info or higher.
* .info;mail.none;authpriv.none;cron.none
/var/log/messages
# Log all the mail messages in one place.
mail.* /var/log/maillog

You would then see where it is logging all mail messages.
Check out my "Life with Scalix" blog at

http://swifttide.com/blog

Valerion
Scalix Star
Scalix Star
Posts: 2730
Joined: Thu Feb 26, 2004 7:40 am
Location: Johannesburg, South Africa
Contact:

Postby Valerion » Thu May 08, 2008 7:18 am

If its just logging you want you can add SMTPFILTER=TRUE to the smtpd.cfg, that will force all emails to go through sendmail, though SMTP Relay is still the primary listener.

phillsky

Postby phillsky » Wed Jun 11, 2008 3:23 am

I have tried to configure scalix and sendmail for this, but it won't work. This is what I have done.

in smtpd.cfg

# Uncomment the following lines to enable the Submission and LMTP listeners
SUBMIT=OFF
SUBMIT=ON
#LMTP=ON

[SUBMIT]
LISTEN=server.mydomain.com:587

in swa.properties

swa.email.smtpServer=server.mydomain.com:587

in sendmail.cf
O DaemonPortOptions=Port=smtp,Name=MTA

restarted tomcat and smtpd and sendmail

lsof -i :25
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
sendmail 22551 root 4u IPv4 12764794 TCP *:smtp (LISTEN)

lsof -i :587
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
omsmtpd 29099 root 4u IPv4 12786539 TCP server.mydomain.com:submission (LISTEN)

Mail in works as expected, but no one can send emails from the webclient. If i do a
omstat -a i see this
SMTP Relay Partially Abor 09:56:05

and in the fatal log i see this.
ERROR SMTP Relay (SMTPD Relay Pr) Wed Jun 11 09:56:05 2008
[OM.DMON 2171] The SMTP Relay could not listen on port 25.
Pid of logging process: 29093

I can't figure out why it still thinks it should listen on port 25


Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 3 guests