Final update.
I've been working with Edgar who has helped no end and I now have a
working config.
For me the working line is actually:
action "lmtp-local" mda "/usr/libexec/mail.lmtp -d
unix:/var/dovecot/lmtp -f %{sender} %{dest}" virtual <virtuals>
and the corresponding match is:
match tag "SPAM_IN" from any for domain <domains> action "lmtp-local"
Hopefully this might help someone in the future.
Regards - Nick
On 28/05/2018 16:48, Nick Ryan wrote:
> Hi Mark, viq, did either of you get it to work with the virtual table?
>
> Mine mostly works with:
> action "lmtp-local" mda "/usr/libexec/mail.lmtp -d
> unix:/var/dovecot/lmtp -f %{sender} %{rcpt}" virtual <virtuals>
> but it ignores the virtual table completely.
>
> If I miss out the ${rcpt}, I get a no recipient specified and if I
> have the {user.username} it gives a similar error.
>
> Did your virtual<vusers> work or am I doing something daft?
>
> Regards - Nick
>
>
> On 27/05/2018 08:51, viq wrote:
>> On 18-05-27 09:34:10, Mark Patruck wrote:
>>> For me it works with %{user.username} as mail.lmtp(8) user.
>>>
>>> See "FORMAT SPECIFIERS" in smtpd.conf(5) for details.
>>
>> Shows how well I read the man page.... With this it works, thank you!
>>
>>> On Sun, May 27, 2018 at 09:04:56AM +0200, viq wrote:
>>> > On 18-05-26 19:18:56, Edgar Pettijohn III 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"
>>> > >
>>> > > try:
>>> > > action "lmtp-local" mda "/usr/libexec/mail.lmtp -d unix:/var/dovecot/lmtp -f
>>> > > %{sender}"
>>> >
>>> > Well, this time I'm getting
>>> > result=TempFail stat=Error ("mail.lmtp: no recipient was specified")
>>> > so there's difference. So I tried
>>> > action "lmtp-local" mda "/usr/libexec/mail.lmtp -d unix:/var/dovecot/lmtp -f %{sender} %{recipient}" virtual <vusers>
>>> > but that resulted in
>>> > result=TempFail stat=Error ("smtpd: mda command line could not be expanded: Interrupted system call")
>>> > same with %{rcpt-to}
>>> >
>>> > Where did you get the %{} syntax? I haven't seen it anywhere when
>>> > reading about this.
>>> >
>>> > > However, this does feel odd. I need to switch over as well, but still trying
>>> > > to wrap my brain around the new config.
>>> > > > 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
>>> > >
>>> >
>>>
>>> --
>>> Mark Patruck ( mark at wrapped.cx )
>>> GPG key 0xF2865E51 / 187F F6D3 EE04 1DCE 1C74 F644 0D3C F66F F286
>>> 5E51
>>>
>>> http://www.wrapped.cx
No comments:
Post a Comment