Monday, May 28, 2018

Re: smtpd.conf new grammar

Hi Edgar, this is the format:

postmaster@nr.ie nick@nr.ie
webmaster@nr.ie nick@nr.ie
nick@nr.ie vmail

Is this where it's pulling the %{user.username} being vmail from?

Dovecot is expecting user@domain.tld

Regards - Nick

On 28/05/2018 18:28, Edgar Pettijohn III wrote:
> On 05/28/18 10: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
>>
>>
>
> It really depends on how your dovecot is set up.
>
> Is it expecting a `user@domain.tld' for the username or just the user
> part?
> How is your <virtuals> set up?
>
> Personally, I think its easier in the long run to either use a
> passwd-file from extras or an sql table of some sort. That way smtpd
> and dovecot can share more easily.
>
> Edgar
>
>> 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