On Tue, Mar 10, 2015 at 02:33:08AM +0000, Mick wrote:

> >With SQL tables you can make union queries that neatly solve the
> >problem at hand.  Something along the lines of:
> >
> >     SELECT sasl_login
> >     FROM sender_to_login
> >     WHERE sender_to_login.sender = '%u@%d' -- unlike %s, no partial keys
> >     UNION
> >     SELECT sasl_login
> >     FROM anysender_login
>
>
> I get the basics of how MySQL works, though UNION and unlike are new to me.
> Perhaps -- denotes a comment?

Yes -- denotes a comment.

> I understand how to read and write to them at
> least. What are %u, %d and %s?

You'd have to look at postfix.org documentation I'm afraid.
One of:

    http://www.postfix.org/pgsql_table.5.html
    http://www.postfix.org/mysql_table.5.html
    http://www.postfix.org/ldap_table.5.html


> smtpd_sender_login_maps =        SELECT sasl_login
>       FROM sender_to_login
>        <snip>
> 
> ... could you? Clear as mud, but thanks for trying to explain it.

Again, postfix.org documentation:

    main.cf:
        smtpd_sender_login_maps = pgsql:/etc/postfix/sasl_sender.cf

    sasl_sender.cf:
        ... database connection settings ...
        query = SELECT ...

> >Well, for simple indexed files via postmap, no comma in the key
> >column. Just optional commas between the RHS elements.
>
> RHS? Royal Horticultural Society ;-)

How about right-hand-side.

> Don't want to ever spend that much time banging my head against a brick wall
> again.

It'll get easier, but not if you're unwilling to read the documentation.
First read the book, for the concepts, then the docs for the latest
up-to-date details.

> >If you've not yet read the Postfix book by Ralf and Patrick, do.
>
> Thanks for your input. All questions asked n this message are rhetorical, so
> no reply expected.  Without working commented examples I simply won't get it.

The book has those.  The official documentation contains short
examples, not complete system walk-throughs.  Enjoy the book.

-- 
        Viktor.

Reply via email to