Skip to contentSkip to conversation

sendmail blues

DISCUSSION Yuri Csapo 4 participants 9 messages Nov 6, 2009 – Nov 8, 2009

lore
Share & tools
lore

Yuri Csapo

author
#0 lore raw

Hi all, I've an unusual (for me) problem:

- I'm running RHEL release 3 (taroon). I know, I know. Nothing I can do - it's the application vendor's requirement.
- This application also MUST have some Sun MTA installed and running, even if we don't use it - and we don't. This MTA sits on ports SMTP, SSMTP, IMAP and POP, HTTP and HTTPS and provides services to the application only, NOT TO THE OS.
- We still need to be able to mail admin stuff such as logwatch and others. RedHat comes with sendmail and we are trying to keep this box as close as possible to default configuration.
- The sendmail queue runner by itself is not enough because I can't find a way to make it expand aliases - root messages end up going to [email protected], which is not where I want them to go.
- Sendmail won't start because the silly Sun app is squatting on port 25.
- If I use DaemonPortOptions to tell sendmail to listen on a different port then I get sendmail to start but I haven't found a way to make the queue runner send to that port on localhost. The runner ends up connecting to port 25, which is the Sun MTA, who proceeds to deny the connection.

Does anybody know how to do one of the following:

- make the sendmail queue runner expand aliases
- make the queue runner send to a port other than 25
- make sendmail behave like in the good old days and forgo the need for the queue runner

Some options that have crossed my mind but which I'm trying to avoid:

- redirect port 25 using iptables
- modify sendmail's source and recompile (ugh)
- give up on sendmail and install exim or postfix or something that can be understood by someone who hasn't read the Bat Book in the last 6 years and who is not particularly inclined to read it again.

Any other ideas?

TIA

Yuri

Signature · 15 lines
Yuri Csapo
Academic Computing & Networking
Colorado School of Mines
CT-256
Phone:  (303) 273-3503
Fax:      (303) 273-3475
Email:   [email protected]

Please use the following link to open a service request:
http://helpdesk.mines.edu
===========================================
With a PC, I always felt limited
by the software available.
On Unix, I am limited only by my knowledge.
--Peter J. Schoenster

begin:vcard
fn:Yuri Csapo
n:Csapo;Yuri
org:Colorado School of Mines;CCIT email;internet:[email protected] title:System Administrator tel;work:(303) 273-3503 x-mozilla-html:FALSE version:2.1
end:vcard

#1 lore raw

Yuri,

Another possibility: why not configure the 'killer' MTA application to use other ports: 20025 instead of 25, etc. (adding 20000 to each seems like a good idea). After all, you don't use it. It's logical it should sit there, but out of the way. The other road is much more bumpy, I can assure you.

Gerardo

Quoted 58 lines · Yuri Csapo

Hi all, I've an unusual (for me) problem:

- I'm running RHEL release 3 (taroon). I know, I know. Nothing I can do - it's the application vendor's requirement.
- This application also MUST have some Sun MTA installed and running, even if we don't use it - and we don't. This MTA sits on ports SMTP, SSMTP, IMAP and POP, HTTP and HTTPS and provides services to the application only, NOT TO THE OS.
- We still need to be able to mail admin stuff such as logwatch and others. RedHat comes with sendmail and we are trying to keep this box as close as possible to default configuration.
- The sendmail queue runner by itself is not enough because I can't find a way to make it expand aliases - root messages end up going to [email protected], which is not where I want them to go.
- Sendmail won't start because the silly Sun app is squatting on port 25.
- If I use DaemonPortOptions to tell sendmail to listen on a different port then I get sendmail to start but I haven't found a way to make the queue runner send to that port on localhost. The runner ends up connecting to port 25, which is the Sun MTA, who proceeds to deny the connection.

Does anybody know how to do one of the following:

- make the sendmail queue runner expand aliases
- make the queue runner send to a port other than 25
- make sendmail behave like in the good old days and forgo the need for the queue runner

Some options that have crossed my mind but which I'm trying to avoid:

- redirect port 25 using iptables
- modify sendmail's source and recompile (ugh)
- give up on sendmail and install exim or postfix or something that can be understood by someone who hasn't read the Bat Book in the last 6 years and who is not particularly inclined to read it again.

Any other ideas?

TIA

Yuri

--
Yuri Csapo
Academic Computing & Networking
Colorado School of Mines
CT-256

Phone:  (303) 273-3503
Fax:      (303) 273-3475
Email:   [email protected]

Please use the following link to open a service request:
http://helpdesk.mines.edu
===========================================
With a PC, I always felt limited
by the software available.
On Unix, I am limited only by my knowledge. --Peter J. Schoenster

#3 lore raw
In reply to Yuri Csapo
Quoted 3 lines · Yuri Csapo

Hi all, I've an unusual (for me) problem:
- give up on sendmail and install exim or postfix or something that can be understood by someone who hasn't read the Bat Book in the last 6 years and who is not particularly inclined to read it again.

well, if you install postfix you can make it listen on localhost only, and have its queue connect to the right place.

ubuntu default postfix config from any installation has the correct configuration, you just have to comment out these 2 lines:
default_transport = error
relay_transport = error

it should be a very easy install

Quoted 7 lines

Any other ideas?

TIA

Yuri

author
#2 lore raw
In reply to Gerardo Juarez-Mondragon

Gerardo,

Thank you for your reply. It is a good idea. I just need to check if it impacts the application as it may be that it e-mails itself on port 25. I'll check.

Yuri

Quoted 73 lines · Gerardo Juarez-Mondragon

Yuri,

Another possibility: why not configure the 'killer' MTA application to use other ports: 20025 instead of 25, etc. (adding 20000 to each seems like a good idea). After all, you don't use it. It's logical it should sit there, but out of the way. The other road is much more bumpy, I can assure you.

Gerardo

Quoted 50 lines · Yuri Csapo

Hi all, I've an unusual (for me) problem:

- I'm running RHEL release 3 (taroon). I know, I know. Nothing I can do - it's the application vendor's requirement.
- This application also MUST have some Sun MTA installed and running, even if we don't use it - and we don't. This MTA sits on ports SMTP, SSMTP, IMAP and POP, HTTP and HTTPS and provides services to the application only, NOT TO THE OS.
- We still need to be able to mail admin stuff such as logwatch and others. RedHat comes with sendmail and we are trying to keep this box as close as possible to default configuration.
- The sendmail queue runner by itself is not enough because I can't find a way to make it expand aliases - root messages end up going to [email protected], which is not where I want them to go.
- Sendmail won't start because the silly Sun app is squatting on port 25.
- If I use DaemonPortOptions to tell sendmail to listen on a different port then I get sendmail to start but I haven't found a way to make the queue runner send to that port on localhost. The runner ends up connecting to port 25, which is the Sun MTA, who proceeds to deny the connection.

Does anybody know how to do one of the following:

- make the sendmail queue runner expand aliases
- make the queue runner send to a port other than 25
- make sendmail behave like in the good old days and forgo the need for the queue runner

Some options that have crossed my mind but which I'm trying to avoid:

- redirect port 25 using iptables
- modify sendmail's source and recompile (ugh)
- give up on sendmail and install exim or postfix or something that can be understood by someone who hasn't read the Bat Book in the last 6 years and who is not particularly inclined to read it again.

Any other ideas?

TIA

Yuri

--
Yuri Csapo
Academic Computing & Networking
Colorado School of Mines
CT-256

Phone:  (303) 273-3503
Fax:      (303) 273-3475
Email:   [email protected]
Quoted 8 lines

Please use the following link to open a service request:
http://helpdesk.mines.edu
===========================================
With a PC, I always felt limited
by the software available.
On Unix, I am limited only by my knowledge. --Peter J. Schoenster

--
To unsubscribe from this list: send the line "unsubscribe linux-admin" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 15 lines
Yuri Csapo
Academic Computing & Networking
Colorado School of Mines
CT-256
Phone:  (303) 273-3503
Fax:      (303) 273-3475
Email:   [email protected]

Please use the following link to open a service request:
http://helpdesk.mines.edu
===========================================
With a PC, I always felt limited
by the software available.
On Unix, I am limited only by my knowledge.
--Peter J. Schoenster

begin:vcard
fn:Yuri Csapo
n:Csapo;Yuri
org:Colorado School of Mines;CCIT email;internet:[email protected] title:System Administrator tel;work:(303) 273-3503 x-mozilla-html:FALSE version:2.1
end:vcard

author
#4 lore raw
In reply to Max Gribov

Max,

Thank you for your reply. Listening on localhost only won't help unfortunately, as the Sun app sits on that too. A pity, as it would have been easy to do that on sendmail - and it's not every day that you can use the words 'easy' and 'sendmail' in the same sentence :)

Yuri

Quoted 23 lines · Max Gribov
Quoted 3 lines · Yuri Csapo

Hi all, I've an unusual (for me) problem:
- give up on sendmail and install exim or postfix or something that can be understood by someone who hasn't read the Bat Book in the last 6 years and who is not particularly inclined to read it again.

well, if you install postfix you can make it listen on localhost only, and have its queue connect to the right place.

ubuntu default postfix config from any installation has the correct configuration, you just have to comment out these 2 lines:
default_transport = error
relay_transport = error

it should be a very easy install

Quoted 6 lines

Any other ideas?

TIA

Yuri

Signature · 15 lines
Yuri Csapo
Academic Computing & Networking
Colorado School of Mines
CT-256
Phone:  (303) 273-3503
Fax:      (303) 273-3475
Email:   [email protected]

Please use the following link to open a service request:
http://helpdesk.mines.edu
===========================================
With a PC, I always felt limited
by the software available.
On Unix, I am limited only by my knowledge.
--Peter J. Schoenster

begin:vcard
fn:Yuri Csapo
n:Csapo;Yuri
org:Colorado School of Mines;CCIT email;internet:[email protected] title:System Administrator tel;work:(303) 273-3503 x-mozilla-html:FALSE version:2.1
end:vcard

#5 lore raw
Quoted 5 lines · Yuri Csapo

Max,

Thank you for your reply. Listening on localhost only won't help unfortunately, as the Sun app sits on that too. A pity, as it would have been easy to do that on sendmail - and it's not every day that you can use the words 'easy' and 'sendmail' in the same sentence :)

try commenting out in /etc/postfix/master.cf:
smtp inet n - - - - smtpd

that way smtp wont run on a tcp socket
local delivery should be ok

Quoted 28 lines

Yuri

Quoted 23 lines · Max Gribov
Quoted 3 lines · Yuri Csapo

Hi all, I've an unusual (for me) problem:
- give up on sendmail and install exim or postfix or something that can be understood by someone who hasn't read the Bat Book in the last 6 years and who is not particularly inclined to read it again.

well, if you install postfix you can make it listen on localhost only, and have its queue connect to the right place.

ubuntu default postfix config from any installation has the correct configuration, you just have to comment out these 2 lines:
default_transport = error
relay_transport = error

it should be a very easy install

Quoted 6 lines

Any other ideas?

TIA

Yuri

#6 lore raw
In reply to Yuri Csapo
Quoted 5 lines · Yuri Csapo

Does anybody know how to do one of the following:

- make the sendmail queue runner expand aliases
- make the queue runner send to a port other than 25
- make sendmail behave like in the good old days and forgo the need for the queue runner

Sendmail only uses submit.cf if it exists, otherwise it uses sendmail.cf. Also, you can force a particular configuration with the -Ac and -Am switches.

However: if /usr/sbin/sendmail isn't setuid-root (like it was in the "good old days"), direct delivery (bypassing the submission queue) won't work for anyone other than root.

FWIW, the rationale behind having a separate MSP is to eliminate the need for sendmail to be setuid-root; instead, the sendmail binary is setgid to the "smmsp" group.

When sendmail is invoked by a normal user, setgid-smmsp is sufficient to add the message to the submission queue. The daemon is started by root, and runs with root privilege, so it is capable of completing the delivery process.

BTW, Local delivery shouldn't require that anything is listening on port 25. However, you may have to tell sendmail what constitutes "local"; it's possible that sendmail is treating "localhost" as a normal (remote) domain rather than a local one.

Signature · 1 line
Glynn Clements <[email protected]>
author
#7 lore raw

Glynn,

Thank you for the thorough answer - reminded me of "the good old days."

Quoted 3 lines · Glynn Clements

Sendmail only uses submit.cf if it exists, otherwise it uses sendmail.cf. Also, you can force a particular configuration with the -Ac and -Am switches.

I was not aware of this. I'll do some tests Monday.

Quoted 3 lines

FWIW, the rationale behind having a separate MSP is to eliminate the need for sendmail to be setuid-root; instead, the sendmail binary is setgid to the "smmsp" group.

I understand the rationale. And I suppose it makes sense these days when a lot of people running Linux are desktop users who have no idea and no desire to learn better. Sendmail was hit hard in the early days of the Eternal September because of this, so they had to do something. OTOH I always thought it very silly how everybody runs away from the root user, designing mechanisms to prevent its use (i.e. root can't log on to a default install of Ubuntu). It ends up turning sudo into Linux's version of Microsoft's OK button - people use without reading, understanding or caring, compounding the problem. Of course you shouldn't be root for your day-to-day tasks but there's nothing wrong with using root when that's required. It's a matter of common sense and best practices. Sorry for the rant, you just happened to push one of my buttons... <sm>

Quoted 6 lines

BTW, Local delivery shouldn't require that anything is listening on port 25. However, you may have to tell sendmail what constitutes "local"; it's possible that sendmail is treating "localhost" as a normal (remote) domain rather than a local one.

Local delivery is not what I'm looking for. I want this box to forward along to our smart host.

Thanks

Yuri

#8 lore raw
Quoted 7 lines · Yuri Csapo
Quoted 4 lines

BTW, Local delivery shouldn't require that anything is listening on port 25. However, you may have to tell sendmail what constitutes "local"; it's possible that sendmail is treating "localhost" as a normal (remote) domain rather than a local one.

Local delivery is not what I'm looking for. I want this box to forward along to our smart host.

If it wasn't for the need to expand aliases locally, you could just use:

FEATURE(msp', smarthost.mydomain.com')dnl

and not run the "normal" sendmail daemon.

If the Sun MTA doesn't use port 587, try:

	FEATURE(`msp',`[127.0.0.1]',`MSA')dnl

in submit.mc and:

	FEATURE(`no_default_msa')dnl
	DAEMON_OPTIONS(`Port=587, Name=MSA, M=E')dnl

in sendmail.mc.

This should force the MSP to send to port 587, and the main daemon to listen *only* on port 587.

The cf files don't provide any way to specify an arbitrary port, but you could always modify feature/msp.m4 to allow this (LOCAL_MAILER_ARGS needs to be set to "TCP $h <port>" when MAILER(`local') is processed), or just modify submit.cf manually.

Signature · 1 line
Glynn Clements <[email protected]>