OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
how to setup postfix in "deliver-only" mode?

From: Andy Spiegl (spiegl+postfixbr-online.de)
Date: Tue May 06 2008 - 14:45:16 CDT


Hi,

I've got a server where a own smtp-server is listening on port 25 for
incoming messages. But it can't deliver outgoing mail. So I want
postfix (2.3.8-2+b1, GNU/Debian etch) to do that job.

I commented out smtpd in master.cf and let my own smtp-server deliver
mails to postfix via /usr/sbin/sendmail. That works great.

But when postfix can't deliver a message and has to create a bounce
message it complains (correctly):

 May 6 14:11:50 sienna postfix/smtp[32686]: D0D552F401B: to=<andyEXAMPLE.COM>, relay=none, delay=0, status=bounced (mail for EXAMPLE.COM loops back to myself)
 May 6 14:11:50 sienna postfix/qmgr[13849]: D0D552F401B: removed

How can I tell postfix to deliver these mails to the listed MX servers
anyway? (although this will be the same server postfix is running, too)

And what I am wondering too: does it really simply delete these bounces?
Can I configure postfix to write them to a local mbox?

Thanks a lot for any hint,
 Andy.

# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = loopback-only
inet_protocols = ipv4
mailbox_command =
mailbox_size_limit = 0
mydestination =
myhostname = sienna.EXAMPLE.COM
mynetworks = 127.0.0.0/8
myorigin = /etc/mailname
recipient_delimiter =
relayhost =
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtpd_use_tls = yes

--
 For every problem there is one solution which is simple, neat, and wrong.
   -- Henry L. Mencken