2009/10/12 mouss <mo...@ml.netoyen.net>

> Srdan Dukic a écrit :
> > 2009/10/12 Wietse Venema <wie...@porcupine.org
> > <mailto:wie...@porcupine.org>>
> >
> >     Srdan Dukic:
> >     > Hi,
> >     >
> >     > I have a program which currently uses the '/usr/sbin/sendmail'
> >     command to
> >     > send mail through postfix, but am looking for a replacement for
> >     this command
> >     > as it is slow. I can see that there is a socket under
> >     > '/var/spool/postfix/private/smtp' and was wondering if it was
> >     possible to
> >     > use this to send mail instead of going through the sendmail
> >     binary? I've
> >     > looked through the documentation but can't seem to get an answer.
> >     Is this
> >     > possible? Do I have the right socket?
> >     >
> >     > I've connected to the socket, but it doesn't give the standard SMTP
> >     > responses, but instead after entering a 'HELO ...' line, it comes
> >     back with
> >     > 'status' and then just waits.
> >
> >     Instead of using the UNDOCUMENTED postfix-internal sockets, use
> >     the Postfix SMTP socket.
> >
> >     Programs that manipulate UNDOCUMENTED postfix-internal resources
> >     are not supported.
> >
> >            Wietse
> >
> >
> > Are there any non-internet, unix domain socket(s) which can be used to
> > send mail to the smtp daemon? i.e. is there any *documented* way to give
> > mail to postfix for remote delivery that doesn't involve the tcp/ip
> > stack (other than the sendmail binary).
> >
>
> sendmail does not involve tcp. it uses internal interfaces.
>
> submission using smtp (over tcp) is faster.
>
> if that's not fast for you, then bypass your postfix and send directly
> to remote hosts. this is what some (many?) mass mailers do.
>
> all that said, if you give more details, people here could give you
> helpful suggestions.
>

I'm doing some work for an ISP and their current system for generating
billing email takes way too long to send out the billing emails (The same
MTA is also used for internet usage notifications etc...). The program which
generates the mail runs on the same machine as the MTA and uses
'/usr/sbin/sendmail' to send email.

After reading about the performance benefits of unix sockets vs. internet
sockets[1] it made no sense to go through the whole TCP handshake (ACK's
etc...) and related context switches when it was really internal
communication. I was just curious if there was a mechanism in place for this
or not. Seeing as how there is not, I will just use SMTP to localhost, which
seems to be the next best option.

[1]
http://lists.freebsd.org/pipermail/freebsd-performance/2005-February/001143.html

Thank you
-- 
Srđan Đukić

Reply via email to