Monday, May 28, 2018

Re: smtpd.conf new grammar

On 05/28/18 03:50, Gilles Chehade wrote:
> On Sun, May 27, 2018 at 08:05:05AM -0500, edgar@pettijohn-web.com wrote:
>> On May 27, 2018 2:10 AM, viq <vicviq@gmail.com> wrote:
>>> On 18-05-26 20:30:32, Amelia A Lewis wrote:
>>>> On Sun, 27 May 2018 00:43:02 +0200, viq wrote:
>>>>> 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?
>>>> Good point (and I'm going to need it, too, when I get to that point,
>>>> for dovecot lmtp on one machine and dspam lmtp on another).
>>>>
>>>> Gilles, shouldn't there be a keyword 'lmtp' to go along with
>>>> mbox/maildir/mda/relay/forward-only/expand-only? Comparing old (6.2)
>>>> smtp.conf(5) with the updated one linked from your article, it seems to
>>>> be the only missing method of delivery.
>>>>
>>>> Or perhaps it just got skipped in the man page? viq, have you tried
>>>>
>>>> action "lmtp-local" lmtp "/var/dovecot/lmtp"
>>>>
>>>> ?
>>> No, FAQ is very explict about it being removed:
>>> http://www.openbsd.org/faq/current.html#r20180524
>>>
>> That makes me sad :(. That is a really ugly line in the config.
>>
> ok, let me explain the issue and if you gals and guys come up with some
> solution that isn't hackish, I won't oppose it :-)
>
> mbox is easy, no parameters need to be exposed to config, we can easily
> provide a syntaxic sugar:
>
> action foobar mbox = action foobar mda "/usr/libexec/mail.local ..."
>
>
> maildir is easy, no parameters needs to be exposed to config ... except
> for a single path that can be expressed as a STRING, we can easily give
> syntax sugar too.
>
> action foobar maildir = action foobar mda "/usr/libexec/mail.maildir ..."
> action foobar maildir path = action foobar mda "/usr/libexec/mail.maildir path ..."
>
>
> lmtp is not easy, it requires multiple parameters and people have a lot
> of different use-cases with it. I can't easily provide a syntaxic sugar
> and we must expose -d, -f, rcpt-to, etc... this isn't acceptable for me
> so if you manage to make all options fit in one STRING I will be ok but
> if I have to add keywords specific I won't.
>
> Something like:
>
>>>> action "lmtp-local" lmtp "/var/dovecot/lmtp"
> would be fine by me, but people are using other parameters than just the
> lmtp socket, or maybe we can provide a syntaxic sugar for this case, and
> people using any other option must use the longer option ?
>
Overall. I'm not too worried about it. After reading the new table(5). I
can really see the power of the new config syntax.  I was kind of
thinking a new mailertable similar to sendmail might be nice. It would
clean up the config, but I don't think its really worth spending time
on.  Its not like anyone prints out their smtpd.conf and frames it on
the wall to look at daily. Haven't tried it, but the "/path/to/mail.lmtp
-args" could probably go into a variable so it looks cleaner also:

action "lmtp-local" mda $lmtp

Edgar

No comments:

Post a Comment