[Catalyst] SMTP vs sendmail

Carl Johnstone catalyst at fadetoblack.me.uk
Fri Aug 31 12:23:19 GMT 2007


> SMTPing to localhost usually doesn't make much sence - it is slow and as
> you mentioned already it causes trouble when the daemon is down or slow.
>
> So either you want to do queueing overhead, dns resolving and SMTPing to
> the *remote* host yourself or you simply open(MAILER,"|sendmail @args").

Using |sendmail means you've got the overhead of forking a separate process, 
SMTP to localhost the overhead is making the socket connection. Once it gets 
to your MTA it'll pretty much do the same in either case.

Piping to sendmail also has the disadvantage that in many cases it'll leave 
www-user at hostname.example.com in the headers, using SMTP means your message 
doesn't get mangled.

To be honest the best solution to to make use of your ISPs outgoing mail 
gateway/smarthost. It'll be the most reliable mail server on their network, 
and you've only got the overhead of an outgoing socket connect.

Carl




More information about the Catalyst mailing list