On 11/12/2009 1:59 PM, Mark Washenberger wrote:
Hi all,

Is it possible to set up special transport rules for the cleanup or
pickup daemons? Does that question even make sense?

What I have is something like this:

transport_maps = proxy:mysql:/etc/postfix/mysql_local.cf
<http://mysql_local.cf>, hash:/etc/postfix/relay.cf <http://relay.cf>

mysql_local.cf <http://mysql_local.cf> picks out traffic destined for
email addresses hosted on this box
relay.cf <http://relay.cf> sends all of the rest of the messages out to
the relay server

The problem I'm trying to solve is that I really need all forwarded mail
and vacation messages that originate on this server through sendmail to
go to the relay server, even if the final destination is an email
address that is on the same server (i.e. a user that returns non-null in
the mysql_local.cf <http://mysql_local.cf> query).

I'm pretty sure that all the mail I want to send to the relay is coming
to postfix through the sendmail->postdrop->maildrop->pickup->cleanup
path, whereas all the mail that I want delivered locally will come over
smtpd. So I was thinking I could just override default_transport or
transport_maps for pickup or cleanup. However, this doesn't seem to
work. Anybody got any bright ideas?

Thanks!
Mark

transport_maps are a global parameter, you can't override it in master.cf.

Low-brow workaround: add
  -o content_filter=smtp:[relay.example.com]
to the "pickup" service line in master.cf. Omit the "[]" braces if you want postfix to perform an MX lookup on the hostname.

High-level workaround: use multiple postfix instances. The "default" postfix instance is where you mung the transport used by pickup

  -- Noel Jones

Reply via email to