On Thu, May 24, 2018 at 2:18 PM, Gilles Chehade <[email protected]> wrote:

> Hi,
>
> I have just committed a major change in smtpd that'll require smtpd.conf
> to be rewritten before your update to the new code.
>
> The new grammar is not TOO different from the former one, a lot of stuff
> remains exactly identical, but the ruleset is now split into two parts:
>
> - a named action
> - a matching pattern which is associated to a named action
>
> In effect, instead of having:
>
>     accept from any for local deliver to mbox
>
>
> You will have:
>
>     action "my_action" mbox
>
>     match from any for local action "my_action"
>
>
> There are a few keywords that have been shortened too but all in all the
> switch to new grammar is easy, the smtpd.conf man page has been updated,
> and it continues being improved thanks to ingo and jmc.
>
> The man page by itself should be enough to do the switch.
>
> Since this is quite a major change, I also wrote a post that describes a
> conversion of my own complex smtpd.conf to new grammar:
>
>     https://poolp.org/posts/2018-05-21/switching-to-opensmtpd-new-config/
>
>
> I have also compiled a list of directives recognized by the parser which
> I intend to use for regress tests:
>
>     https://poolp.org/~gilles/smtpd.conf
>
>
> As for the reasons behind the change they are numerous, I explained some
> at EuroBSDCon 2017, I explained some on my blog, the bottom line is that
> while one-line rules were apparently an awesome idea, they were actually
> a design error that had consequences on pretty much the entire daemon.
>
> We didn't realize it until a few months ago, we tried hard to maintain a
> one-line rule grammar but it became more and more obvious that this just
> isn't doable without creating issues and unnecessary complexity.
>
> The new grammar is cleaner, it helped remove ~700 lines of complex code,
> made the handling of .forward files as well much safer, removed a lot of
> very unpleasant side-effects most people didn't even realize existed ...
> until they hit that one case for which we had no way to work around.
>
>
> Anyways,
> looking forward for you to test and report how it works for you :-)


Sorry, I've read the announcements, looked at man pages and examples,
but still didn't manage to figure out how to translate "deliver via dovecot
lmtp"
(to have sieve working) into the new syntax. So far my config was:

table vusers ldap:/etc/mail/ldap.conf
table vdomains ldap:/etc/mail/ldap.conf
table passwd ldap:/etc/mail/ldap.conf

accept from local for local virtual <vusers> deliver to lmtp
"/var/dovecot/lmtp"
accept from any for domain <vdomains> virtual <vusers> deliver to lmtp
"/var/dovecot/lmtp"


I tried changing those into:

action "lmtp-local" mda "/usr/libexec/mail.lmtp -d /var/dovecot/lmtp"
virtual <vusers>
action "relay" relay
match from local for local action "lmtp-local"
match from any for domain <vdomains> action "lmtp-local"
match from local for any action "relay"


but delivery attempts fail with Error ("mail.lmtp: sender must be specified
with -f")

What would be the proper config for this?
 --
viq

Reply via email to