DO NOT use SMTP for this. Use a different transport.
The Postfix SMTP client has several safety measures in place to
prevent it from connecting to the local machine.
1 - the SMTP client eliminates the local machine from the list of
mail exchangers for the destination.
2 - the SMTP client refuses to talk to hosts that reply to HELO
(EHLO) with its own hostname.
Instead I suggest making a transport table entry:
/etc/postfix/main.cf:
transport_maps = hash:/etc/postfix/transport
mydestination =
/etc/postfix/transport:
bentium.net internal:
.bentium.net internal:
And set up a pipe transport named "internal" that pipes the mail
into your favorite qmail interface.
internal unix - n n - - pipe
user=nobody argv=/usr/sbin/sendmail ${recipient}
Look Mom! Postfix interfaces with qmail, and there's no unsafe
shell glue involved at all.
なかなか強烈。