Help with Debian Sendmail 

http://www.linuxforums.org/forum/debian-linux-help/29820-need-help-sendmail-8-13-4-1-a.html

I have problem with configuring sendmail 8.13.4-1 on debian woody. When I run " sendmailconfig " and after configuration, it gives with the following error

sendmail.cf sendmail.cf.errors
server:/etc/mail# less sendmail.cf.errors
*** ERROR: FEATURE() should be before MAILER()
*** ERROR: FEATURE() should be before MAILER()
*** ERROR: FEATURE() should be before MAILER()
*** FEATURE(smrsh) must occur before MAILER(local)
*** ERROR: MAILER(local) already included
*** ERROR: MAILER(smtp) already included

I do not know why. I would appreciate for any help or tips to read sendmail configure from scratch in debian.

ko_thu 04-21-2005

Help with Debian Sendmail 

This is a common problem with the Debian package of Sendmail, the error results from a badly formed sendmail.cf file generated by Debian's sendmailconfig script.

In sendmail's configuration files, a requirement is that local mailer programs such as procmail must be specified last after rulesets such as masquarading and so on.

I'm quite sure that Debian is aware of it. I don't see how they could miss something like that. However, it seems they have not fixed it as of yet. This is very odd because it is a long standing problem - over 1 year. Debian normally fixes such things quickly.

The best thing to do is either one of three things:

  1. Complain to the Debian maintainer to fix it.
  2. Rewrite the sendmailconfig script to fix this problem.
  3. Install your own version of sendmail.

I chose 3 because I have a custom sendmail setup for one of the ISPs I do work for. You really dont even have to recompile sendmail - just replace the sendmail.cf file with one that is properly formatted.

If you are familiar with sendmail and m4, this isn't a big deal, but if you aren't it can be really scary.

If anyone needs help with this, just send me a note at via the board or to tj at kewlness.net.

Good luck, T.J. 2006-07-17

Help with Debian Sendmail 

Just move the mailer definitions part in sendmail.mc after all FEATURE() definitions will do. Eg:

$ diff -wu1 /etc/mail/sendmail.mc~ /etc/mail/sendmail.mc
--- /etc/mail/sendmail.mc~      2006-07-17 18:02:25.000000000 +0200
+++ /etc/mail/sendmail.mc       2006-07-17 18:24:36.000000000 +0200
@@ -95,7 +95,2 @@
 dnl #
-dnl # Default Mailer setup
-MAILER_DEFINITIONS
-MAILER(`local')dnl
-MAILER(`smtp')dnl
-
 dnl # Masquerading options
@@ -105,2 +100,7 @@
 FEATURE(`masquerade_envelope')dnl
+dnl # Default Mailer setup
+MAILER_DEFINITIONS
+MAILER(`local')dnl
+MAILER(`smtp')dnl
+
 include(`/etc/mail/tls/starttls.m4')dnl

T

documented on: 2006.07.17