On Fri, Feb 8, 2008 at 1:04 PM, Christopher E. Brown
<[EMAIL PROTECTED]> wrote:
> rupert wrote:
> > can you please give me an example for this?
> > I created a file mysql-virtual_mailhosts.cf which returns the
> > mailhost and added this query to the transport maps.
> > now the logfile fills with this message
> > backend-B1 postfix/qmgr[18086]: warning: connect to transport
> > backend-B1.fra1.mailcluster: No such file or directory
> > my understanding is that when I return the right value to postfix,
> > postfix by itself than starts the lookup to the right host.
> >
> > cheers
>
>
> Don't have a MySQL map example handy, but I do have an LDAP config used
> during a migration process
>
> # Temp use of the transport map to allow accounts still on old servers
> to function
> transport_maps = ldap:ldaptransport
> ldaptransport_server_host = <redacted>
> ldaptransport_version = 3
> ldaptransport_bind_dn = <redacted>
> ldaptransport_bind_pw = <redacted>
> ldaptransport_search_base = <redacted>
> ldaptransport_scope = sub
> ldaptransport_query_filter =
> (&(mail=%s)(!(mailhost=<localserver>))(mailuserstatus=active))
> ldaptransport_result_format = smtp:[%s]
> ldaptransport_result_attribute = mailhost
>
>
I am trying something like this right now
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf,
proxy:mysql:/etc/postfix/mysql-virtual_mailhosts.cf
mysql-virtual_mailhosts.cf
--
user = mail_admin
password = mail_admin_password
dbname = mail
query = SELECT CONCAT('smtp:[',mailhost,']') FROM users WHERE email='%s'
#query = SELECT mailhost FROM users WHERE email='%s'
hosts = backend-A1
The documentation shows me this:
example.com smtp:bar.example:2025
i tried to put the email address in fromt, but it gave me an
warning: connect to transport [EMAIL PROTECTED] smtp: No such file or directory
what now?
thx
> The critical bits.
>
> The filter should only return for a valid active local (local as in
> within the service group) account where the account name matches the
> incoming name and the target is not the local (as in this specific
> server or delivery group with shared spool) system.
>
> The result_format, smtp: sets the transport type, and the [ ] tells
> postfix that it is a direct target (in the case of smtp:, skip MX lookup
> for the returned name and perform direct delivery to the returned value.
>
>
> In the above example, the domains and accounts maps already restricted
> to "domains valid for the delivery group" and "accounts valid within the
> local group". Since I knew that the only mailhost values in LDAP were
> the new systems or 5 old systems I did a
> != <localserver> filter (if valid but not local must be one of the 5 old
> systems). In the case of a less controlled mailhost attribute, a
> mail=%s && mailhost=A|B|C|D (explicit allow list) might be better. If
> explicit filter, just make sure that the filter on each server
> *excludes* itself.
>
>
> From the listed error message, I am guessing that you are missing the
> result_format bit.
>
>
>
>
>
>
> >
> >
> > On Fri, Feb 8, 2008 at 11:33 AM, Christopher E. Brown
> > <[EMAIL PROTECTED]> wrote:
> >> Gordon Messmer wrote:
> >> > rupert wrote:
> >> >> How can I get postfix to deliver the email to the right host?
> >> >> At the moment postfix creates a new maildir when the recipient is on
> >> >> the remote host.
> >> >> therefore the new mail does not list the new email.
> >> >>
> >> >> havent found a howto that covers this, for now.
> >> >>
> >> >> maybe you have some knowledge about that.
> >> >>
> >> >
> >> > Not I. My experience with postfix is pretty limited. Check in on
> their
> >> > user list...
> >>
> >> If you are splitting a domain across multiple servers without a shared
> >> access mail spool postfix needs to
> >>
> >> 1) Be aware of the list of valid users
> >>
> >> 2) known where to send it (local/non-local)
> >>
> >>
> >> To get 2, a transport map with a SMTP target of the mailhost can be used
> >>
> >>
> >> Postfix would then
> >>
> >> 1) perform LDAP/MySQL/other lookup to determine if domain is valid for
> >> local accept
> >> 2) Lookup address to determine if exists
> >> 3) Accept message
> >> 4) check the transport map (transport map lookup returns mailhost and
> >> search filter is mailhost != this systems mailhost value)
> >> a) no transport map lookup return (when mailhost =
> <localmailhost>),
> >> deliver local
> >> b) transport map returns a targer (when mailhost !=
> <localmailhost>),
> >> deliver via smtp:<mailhost> target
> >>
> >> When setup correctly this works much like the PROXY function in courier
> >> POP/IMAP.
> >>
> >>
> >> --
> >> ------------------------------------------------------------------------
> >> Christopher E. Brown <[EMAIL PROTECTED]> desk (907) 550-8393
> >> cell (907) 632-8492
> >> IP Engineer - ACS
> >> ------------------------------------------------------------------------
> >>
>
>
> --
>
>
> ------------------------------------------------------------------------
> Christopher E. Brown <[EMAIL PROTECTED]> desk (907) 550-8393
> cell (907) 632-8492
> IP Engineer - ACS
> ------------------------------------------------------------------------
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users