[Gllug] Small send-only mail transport agent
Nix
nix at esperi.demon.co.uk
Sat Mar 9 17:46:23 UTC 2002
On 06 Mar 2002, Dave Cridland uttered the following:
> On Tue, 2002-03-05 at 14:39, John Edwards wrote:
>> On a related topic, has anyone got any suggestions for a mail daemon that
>> will just send email rather than receieve it ?
>
> Sendmail, but run it with -q 15m instead of -bd. Then it won't serve
> [E]SMTP at all. Or run it with just -q, via CRON.
You don't even need to do that; applications that send mail should do so
by either talking directly to the upstream MTA, or by running
/usr/sbin/sendmail, which'll do all the sending for you.
> It's very unfashionable to mention sendmail, these days, but it does
> work, and does everything. It is a little tricky to get your head around
> it's configuration concepts, but it's actually not as hard to learn as
> people seem to think. (Although I can't figure out the M4 stuff to save
> my life.)
I found the M4 stuff much easier to deal with than the non-M4 stuff. I
think I agree with (Eric Allman?) when he says that sendmail.cf should
be considered a binary file unless absolutely necessary...
(FWIW my config for a simple forwarder is 32 lines long (with comments);
the config for the MTA on the firewall is 47 lines. These generate 32K+
sendmail.cfs...)
>> 2. Send email onto another mail relay.
>
> If you want *all* email sent to a *single* MTA, use the Smart Host
> stuff. Otherwise it'll just happen. Smart Host is probably better, since
> it's lighter on resources that way.
Definitely so if, like me, you run a single MTA to accept mail from
remote sites; you can use it as a smarthost, too, with no effort bar a
few RELAY_DOMAIN entries in your smarthost's mc file.
>> 3. Queue mail locally if the relay is unavailable.
>
> It'll just happen. More accurately, sendmail queues mails anyway - it's
> a config option that's normally set - then tries to get them out
> immediately. You can configure it to try sending on first, then queue,
> but you run more of a risk of losing email.
Further, with a
define(`SMTP_MAILER_FLAGS',`e')
the MTA assumes that all SMTP-accessible mailers are expensive enough to
require a queue run to send. Then you arrange to do regular queue runs
only when online (from cron or something).
Combine that with FALLBACK_MX, and you have direct delivery to remote
systems when online followed by falling back to going via an ISP
smarthost (but beware the DUL if you do that).
>> I know most mail servers such as exim can be setup this way, but I would
>> rather avoid a fully featured MTA if possible for reasons of performance
>> (some of the boxes are 33MHz 486's with 16MB of RAM) and for security (if
>> it can't recieve mail then it can't be act as an open relay).
>
> Sendmail is actually lighter than people think.
Quite so. 3Mb VSZ, 344K RSS on my little 8Mb 486 here (doing reception,
transmission, and substantial header rewriting).
> It's also capable enough
> to handle things sensibly under load - just tell it not to bother doing,
> for instance, queue runs when the load is high.
And it's set up to stop doing more and more (eventually to stop
listening) when the load gets high enough.
--
`Frankly I wonder whether you are not writing your posts from underneath a
bridge.' --- Jason Clifford, to a particularly dense troll
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list