Re: dovecot: lmtp: Error: fatal error: failed to reserve page summary memory

2020-10-08 Thread Roman Vasilyev
Yes, I did. And it works. Finally rewrote in RUST and it works. Seems like
golang exceeds the memory limit on start.

On Thu, Oct 8, 2020 at 2:56 AM Stephan Bosch  wrote:

>
>
> On 17/09/2020 11:20, Roman Vasilyev wrote:
> > Sorry for offtopic, don't know where to ask it
> > after updating from `ubuntu` 18 to 20
> > started getting this on running golang binary from sieve rules file
> > ```
> > Sep 17 08:54:00 lonjemail spamd[3231]: spamd: connection from ::1
> > [::1]:57844 to port 783, fd 5
> > Sep 17 08:54:00 lonjemail spamd[3231]: spamd: setuid to Debian-exim
> > succeeded
> > Sep 17 08:54:00 lonjemail spamd[3231]: spamd: processing message
> >  > <mailto:pf95pxus...@mail.gmail.com>> for Debian-exim:114
> > Sep 17 08:54:00 lonjemail systemd-resolved[527]: Server returned error
> > NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying
> > transaction with reduced feature level UDP.
> > Sep 17 08:54:00 lonjemail systemd-resolved[527]: message repeated 8
> > times: [ Server returned error NXDOMAIN, mitigating potential DNS
> > violation DVE-2018-0001, retrying transaction with reduced feature
> > level UDP.]
> > Sep 17 08:54:00 lonjemail spamd[3231]: spamd: clean message (1.1/5.0)
> > for Debian-exim:114 in 0.3 seconds, 2760 bytes.
> > Sep 17 08:54:00 lonjemail spamd[3231]: spamd: result: . 1 -
> >
> DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,RDNS_NONE,SPF_HELO_NONE,SPF_PASS
>
> >
> scantime=0.3,size=2760,user=Debian-exim,uid=114,required_score=5.0,rhost=::1,raddr=::1,rport=57844,mid= pf95pxus...@mail.gmail.com
> > <mailto:pf95pxus...@mail.gmail.com>>,autolearn=no autolearn_force=no
> > Sep 17 08:54:00 lonjemail dovecot: lmtp(4254): Connect from local
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: fatal error: failed to
> > reserve page summary memory
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: runtime stack:
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > runtime.throw(0x1a48db5, 0x25)
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > #011/usr/local/go/src/runtime/panic.go:1116 +0x72 fp=0x7ffe160d5860
> > sp=0x7ffe160d5830 pc=0x4ce5d2
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > runtime.(*pageAlloc).sysInit(0x232c268)
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > #011/usr/local/go/src/runtime/mpagealloc_64bit.go:80 +0x185
> > fp=0x7ffe160d58f0 sp=0x7ffe160d5860 pc=0x4c4e25
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > runtime.(*pageAlloc).init(0x232c268, 0x232c260, 0x25cb8d8)
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > #011/usr/local/go/src/runtime/mpagealloc.go:317 +0x75
> > fp=0x7ffe160d5918 sp=0x7ffe160d58f0 pc=0x4c2815
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > runtime.(*mheap).init(0x232c260)
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > #011/usr/local/go/src/runtime/mheap.go:743 +0x24b fp=0x7ffe160d5940
> > sp=0x7ffe160d5918 pc=0x4bf84b
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: runtime.mallocinit()
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > #011/usr/local/go/src/runtime/malloc.go:480 +0x109 fp=0x7ffe160d5968
> > sp=0x7ffe160d5940 pc=0x4a4c49
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: runtime.schedinit()
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > #011/usr/local/go/src/runtime/proc.go:563 +0x65 fp=0x7ffe160d59c0
> > sp=0x7ffe160d5968 pc=0x4d1f25
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > runtime.rt0_go(0x7ffe160d5ad8, 0x2, 0x7ffe160d5ad8, 0x1813580,
> > 0x7fd3cc8a80b3, 0x7fd3cca6cb80, 0x7ffe160d5ad8, 0x200011c00, 0x501080,
> > 0x1813580, ...)
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > #011/usr/local/go/src/runtime/asm_amd64.s:214 +0x125 fp=0x7ffe160d59c8
> > sp=0x7ffe160d59c0 pc=0x5011c5
> > Sep 17 08:54:00 lonjemail dovecot:
> > lmtp(roman)<4254>: program
> > exec:/usr/lib/dovecot/sieve-execute/smtp (4255): Terminated with
> > non-zero exit code 2
>
> This tells me this is not Dovecot failing. Did you try executing the
> "smtp" script manually outside Dovecot with the same parameters?
>
> > Sep 17 08:54:00 lonjemail dovecot:
> > lmtp(roman)<4254>: sieve:
> > msgid= pf95pxus...@mail.gmail.com
> > <mailto:pf95pxus...@mail.gmail.com>>: stored mail into mailbox
> > 'Unsubscribe.Neighbors'
> > Sep 17 08:54:00 lonjemail dovecot: lmtp(4254): Disconnect from local:
> > Client has quit the connection (state=READY)
> > Sep 17 08:55:01 lonjemail CRON[4257]: (root) CMD (command -v
> > debian-sa1 > /dev/null && debian-sa1 1 1)
> > ```
>
>

-- 
Regards


Re: dovecot: lmtp: Error: fatal error: failed to reserve page summary memory

2020-10-08 Thread Stephan Bosch




On 17/09/2020 11:20, Roman Vasilyev wrote:

Sorry for offtopic, don't know where to ask it
after updating from `ubuntu` 18 to 20
started getting this on running golang binary from sieve rules file
```
Sep 17 08:54:00 lonjemail spamd[3231]: spamd: connection from ::1 
[::1]:57844 to port 783, fd 5
Sep 17 08:54:00 lonjemail spamd[3231]: spamd: setuid to Debian-exim 
succeeded
Sep 17 08:54:00 lonjemail spamd[3231]: spamd: processing message 
<mailto:pf95pxus...@mail.gmail.com>> for Debian-exim:114
Sep 17 08:54:00 lonjemail systemd-resolved[527]: Server returned error 
NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying 
transaction with reduced feature level UDP.
Sep 17 08:54:00 lonjemail systemd-resolved[527]: message repeated 8 
times: [ Server returned error NXDOMAIN, mitigating potential DNS 
violation DVE-2018-0001, retrying transaction with reduced feature 
level UDP.]
Sep 17 08:54:00 lonjemail spamd[3231]: spamd: clean message (1.1/5.0) 
for Debian-exim:114 in 0.3 seconds, 2760 bytes.
Sep 17 08:54:00 lonjemail spamd[3231]: spamd: result: . 1 - 
DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,RDNS_NONE,SPF_HELO_NONE,SPF_PASS 
scantime=0.3,size=2760,user=Debian-exim,uid=114,required_score=5.0,rhost=::1,raddr=::1,rport=57844,mid=<mailto:pf95pxus...@mail.gmail.com>>,autolearn=no autolearn_force=no

Sep 17 08:54:00 lonjemail dovecot: lmtp(4254): Connect from local
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: fatal error: failed to 
reserve page summary memory

Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: runtime stack:
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
runtime.throw(0x1a48db5, 0x25)
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
#011/usr/local/go/src/runtime/panic.go:1116 +0x72 fp=0x7ffe160d5860 
sp=0x7ffe160d5830 pc=0x4ce5d2
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
runtime.(*pageAlloc).sysInit(0x232c268)
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
#011/usr/local/go/src/runtime/mpagealloc_64bit.go:80 +0x185 
fp=0x7ffe160d58f0 sp=0x7ffe160d5860 pc=0x4c4e25
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
runtime.(*pageAlloc).init(0x232c268, 0x232c260, 0x25cb8d8)
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
#011/usr/local/go/src/runtime/mpagealloc.go:317 +0x75 
fp=0x7ffe160d5918 sp=0x7ffe160d58f0 pc=0x4c2815
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
runtime.(*mheap).init(0x232c260)
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
#011/usr/local/go/src/runtime/mheap.go:743 +0x24b fp=0x7ffe160d5940 
sp=0x7ffe160d5918 pc=0x4bf84b

Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: runtime.mallocinit()
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
#011/usr/local/go/src/runtime/malloc.go:480 +0x109 fp=0x7ffe160d5968 
sp=0x7ffe160d5940 pc=0x4a4c49

Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: runtime.schedinit()
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
#011/usr/local/go/src/runtime/proc.go:563 +0x65 fp=0x7ffe160d59c0 
sp=0x7ffe160d5968 pc=0x4d1f25
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
runtime.rt0_go(0x7ffe160d5ad8, 0x2, 0x7ffe160d5ad8, 0x1813580, 
0x7fd3cc8a80b3, 0x7fd3cca6cb80, 0x7ffe160d5ad8, 0x200011c00, 0x501080, 
0x1813580, ...)
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
#011/usr/local/go/src/runtime/asm_amd64.s:214 +0x125 fp=0x7ffe160d59c8 
sp=0x7ffe160d59c0 pc=0x5011c5
Sep 17 08:54:00 lonjemail dovecot: 
lmtp(roman)<4254>: program 
exec:/usr/lib/dovecot/sieve-execute/smtp (4255): Terminated with 
non-zero exit code 2


This tells me this is not Dovecot failing. Did you try executing the 
"smtp" script manually outside Dovecot with the same parameters?


Sep 17 08:54:00 lonjemail dovecot: 
lmtp(roman)<4254>: sieve: 
msgid=<mailto:pf95pxus...@mail.gmail.com>>: stored mail into mailbox 
'Unsubscribe.Neighbors'
Sep 17 08:54:00 lonjemail dovecot: lmtp(4254): Disconnect from local: 
Client has quit the connection (state=READY)
Sep 17 08:55:01 lonjemail CRON[4257]: (root) CMD (command -v 
debian-sa1 > /dev/null && debian-sa1 1 1)

```




dovecot: lmtp: Error: fatal error: failed to reserve page summary memory

2020-09-17 Thread Roman Vasilyev
Sorry for offtopic, don't know where to ask it
after updating from `ubuntu` 18 to 20
started getting this on running golang binary from sieve rules file
```
Sep 17 08:54:00 lonjemail spamd[3231]: spamd: connection from ::1
[::1]:57844 to port 783, fd 5
Sep 17 08:54:00 lonjemail spamd[3231]: spamd: setuid to Debian-exim
succeeded
Sep 17 08:54:00 lonjemail spamd[3231]: spamd: processing message
 for
Debian-exim:114
Sep 17 08:54:00 lonjemail systemd-resolved[527]: Server returned error
NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying
transaction with reduced feature level UDP.
Sep 17 08:54:00 lonjemail systemd-resolved[527]: message repeated 8 times:
[ Server returned error NXDOMAIN, mitigating potential DNS violation
DVE-2018-0001, retrying transaction with reduced feature level UDP.]
Sep 17 08:54:00 lonjemail spamd[3231]: spamd: clean message (1.1/5.0) for
Debian-exim:114 in 0.3 seconds, 2760 bytes.
Sep 17 08:54:00 lonjemail spamd[3231]: spamd: result: . 1 -
DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,RDNS_NONE,SPF_HELO_NONE,SPF_PASS
scantime=0.3,size=2760,user=Debian-exim,uid=114,required_score=5.0,rhost=::1,raddr=::1,rport=57844,mid=,autolearn=no autolearn_force=no
Sep 17 08:54:00 lonjemail dovecot: lmtp(4254): Connect from local
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: fatal error: failed to
reserve page summary memory
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: runtime stack:
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: runtime.throw(0x1a48db5,
0x25)
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
#011/usr/local/go/src/runtime/panic.go:1116 +0x72 fp=0x7ffe160d5860
sp=0x7ffe160d5830 pc=0x4ce5d2
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
runtime.(*pageAlloc).sysInit(0x232c268)
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
#011/usr/local/go/src/runtime/mpagealloc_64bit.go:80 +0x185
fp=0x7ffe160d58f0 sp=0x7ffe160d5860 pc=0x4c4e25
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
runtime.(*pageAlloc).init(0x232c268, 0x232c260, 0x25cb8d8)
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
#011/usr/local/go/src/runtime/mpagealloc.go:317 +0x75 fp=0x7ffe160d5918
sp=0x7ffe160d58f0 pc=0x4c2815
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
runtime.(*mheap).init(0x232c260)
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
#011/usr/local/go/src/runtime/mheap.go:743 +0x24b fp=0x7ffe160d5940
sp=0x7ffe160d5918 pc=0x4bf84b
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: runtime.mallocinit()
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
#011/usr/local/go/src/runtime/malloc.go:480 +0x109 fp=0x7ffe160d5968
sp=0x7ffe160d5940 pc=0x4a4c49
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: runtime.schedinit()
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
#011/usr/local/go/src/runtime/proc.go:563 +0x65 fp=0x7ffe160d59c0
sp=0x7ffe160d5968 pc=0x4d1f25
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
runtime.rt0_go(0x7ffe160d5ad8, 0x2, 0x7ffe160d5ad8, 0x1813580,
0x7fd3cc8a80b3, 0x7fd3cca6cb80, 0x7ffe160d5ad8, 0x200011c00, 0x501080,
0x1813580, ...)
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
#011/usr/local/go/src/runtime/asm_amd64.s:214 +0x125 fp=0x7ffe160d59c8
sp=0x7ffe160d59c0 pc=0x5011c5
Sep 17 08:54:00 lonjemail dovecot:
lmtp(roman)<4254>: program
exec:/usr/lib/dovecot/sieve-execute/smtp (4255): Terminated with non-zero
exit code 2
Sep 17 08:54:00 lonjemail dovecot:
lmtp(roman)<4254>: sieve:
msgid=:
stored mail into mailbox 'Unsubscribe.Neighbors'
Sep 17 08:54:00 lonjemail dovecot: lmtp(4254): Disconnect from local:
Client has quit the connection (state=READY)
Sep 17 08:55:01 lonjemail CRON[4257]: (root) CMD (command -v debian-sa1 >
/dev/null && debian-sa1 1 1)
```

here is sieve rules:
```
require ["variables", "fileinto", "mailbox", "vnd.dovecot.execute"];
if address :matches "from" "*" { set "from" "${1}"; }

if anyof ( header :contains "subject" "unsubscribe neighbours",
header :contains "subject" "unsubscribe neighbors") {
  execute "smtp" "-neighbors=${from}";
  fileinto :create "Unsubscribe.Neighbors";
} elsif address :contains "from" ["mailer-daemon", "postmaster", "internet
mail delivery"] {
  if header :matches "X-Failed-Recipients" "*" {
execute "smtp" "-email=${1}";
fileinto :create "Mail Delivery System";
  } else {
fileinto :create "Mail Delivery System.Warning";
  }
} else {
  # The rest goes into INBOX
  # default is "implicit keep", we do it explicitly here
  keep;
}
```
Attempted in `/etc/dovecot/conf.d/90-sieve.conf`  vsz_limit = 256M with no
luck
Can somebody help me in fixing it?


Re: [Dovecot] LMTP error

2014-05-02 Thread Charles Marcus

On 5/1/2014 7:17 PM, Joseph Tam  wrote:

This setting:


first_valid_uid = 1010


will need to be changed to "0",


Worst ...  advice ...  ever.

Please do NOT EVER suggest to anyone else to EVER do that.


or better yet, as others have suggested,
alias root to some user with UID within 1010..1020.


This is one of the very *first* things that you should do on pretty much 
*any* new server setup.


I guess maybe there are one or more valid corner cases where you 
wouldn't want to do this, but I can't think of any (good) ones...


Charles


Re: [Dovecot] LMTP error

2014-05-01 Thread IT geek 31
On 2 May 2014 01:17, Joseph Tam  wrote:

> This setting:
>
>  first_valid_uid = 1010
>>
>
> will need to be changed to "0", or better yet, as others have suggested,
> alias root to some user with UID within 1010..1020.
>

Ah-ha!  That's what caused it.  I wouldn't have seen that error before
changing to LMTP, as using mbox Postfix would have just delivered it
without issue.

Unfortunately I need the  first and last valid UID as this is how I control
which accounts are replicated.

I've setup an alias for root now that uses an account in the 1010-1020
range and I'm all happy :-)


-Mark


Re: [Dovecot] LMTP error

2014-05-01 Thread Joseph Tam


IT geek 31  writes:


I've recently switched to LMTP as I'm now using mdbox.  However since
switching, mails sent to the root account do not get delivered due to the
following error:

May  1 18:20:17 Server1 postfix/lmtp[13019]: CAEE91F851: to=,
relay=mail.test.com[private/dovecot-lmtp], delay=1097,
delays=1096/0.45/0.43/0.46, dsn=4.3.0, status=deferred (host
mail.test.com[private/dovecot-lmtp]
said: 451 4.3.0  Invalid user settings. Refer to server log
for more information. (in reply to RCPT TO command))


This setting:


first_valid_uid = 1010


will need to be changed to "0", or better yet, as others have suggested,
alias root to some user with UID within 1010..1020.

The dovecot logs that you ought to see will be something like

May  1 16:12:11 viol dovecot: lda: Error: user root: Mail access
for users with UID 0 not permitted (see first_valid_uid
in config file, uid from userdb lookup).

Joseph Tam 


Re: [Dovecot] LMTP error

2014-05-01 Thread IT geek 31
On 1 May 2014 19:48, Reindl Harald  wrote:

> * set a alias on the postfix side to another mail-address
> * that way dovecot never see the root-address as destination
> * use "postsuper -d queue_id" to kill the messages from the queue
> __
>
> cat /etc/aliases | grep root
> # Person who should get root's mail
> root:   h.rei...@thelounge.net
> __
>
> don't forget calling "newaliases" after changes in that file
> if you have implemented aliases on postfix in a different way
> follow the documentation
>

Okay, so that's two people who have recommended the same solution.  That's
good enough for me.  I shall go and implement that now.

Many thanks for all your help guys!


-Mark


Re: [Dovecot] LMTP error

2014-05-01 Thread Reindl Harald

Am 01.05.2014 19:43, schrieb IT geek 31:
> On 1 May 2014 19:41, Reindl Harald:
> 
> that you are working with unix-accounts and the root uid 0
> is prohibited for (good) saftey reasons
> 
> Okay, that sounds good.  How do I deliver mail to the root account then, and 
> stop this error/warning/message?  As
> mails are now backing up in the queue and cannot be delivered...

keep your responses on the list!

* set a alias on the postfix side to another mail-address
* that way dovecot never see the root-address as destination
* use "postsuper -d queue_id" to kill the messages from the queue
__

cat /etc/aliases | grep root
# Person who should get root's mail
root:   h.rei...@thelounge.net
__

don't forget calling "newaliases" after changes in that file
if you have implemented aliases on postfix in a different way
follow the documentation



signature.asc
Description: OpenPGP digital signature


Re: [Dovecot] LMTP error

2014-05-01 Thread Thomas Leuxner
* Reindl Harald  2014.05.01 19:41:

> > May  1 19:31:50 Server1 dovecot: lmtp(13770): Error: user root: Invalid
> > settings in userdb: userdb returned 0 as uid
> > 
> > Any idea what this means?
> 
> that you are working with unix-accounts and the root uid 0
> is prohibited for (good) saftey reasons

If that has worked before then now is a good time to rewrite it to one of your 
IMAP users (best done on the Postfix end).


signature.asc
Description: Digital signature


Re: [Dovecot] LMTP error

2014-05-01 Thread Reindl Harald

Am 01.05.2014 19:36, schrieb IT geek 31:
> On 1 May 2014 19:27, Thomas Leuxner  wrote:
> 
>> Obviously not, or you missed the detail in maillog. When the syslog line
>> starts with _postfix_ it's postfix.
>>
>> $ doveadm log find
>>
> 
> Everything logs to /var/log/maillog.
> 
> The line I think I missed was:
> 
> May  1 19:31:50 Server1 dovecot: lmtp(13770): Error: user root: Invalid
> settings in userdb: userdb returned 0 as uid
> 
> Any idea what this means?

that you are working with unix-accounts and the root uid 0
is prohibited for (good) saftey reasons



signature.asc
Description: OpenPGP digital signature


Re: [Dovecot] LMTP error

2014-05-01 Thread IT geek 31
On 1 May 2014 19:27, Thomas Leuxner  wrote:

> Obviously not, or you missed the detail in maillog. When the syslog line
> starts with _postfix_ it's postfix.
>
> $ doveadm log find
>

Everything logs to /var/log/maillog.

The line I think I missed was:

May  1 19:31:50 Server1 dovecot: lmtp(13770): Error: user root: Invalid
settings in userdb: userdb returned 0 as uid

Any idea what this means?


-Mark


Re: [Dovecot] LMTP error

2014-05-01 Thread Reindl Harald


Am 01.05.2014 19:21, schrieb IT geek 31:
> On 1 May 2014 18:56, Thomas Leuxner  wrote:
>
>> What about the Dovecot log? The error in the _Postfix_ log is pretty
>> self-explanatory, have a look what Dovecot says.
> 
> Um, I was under the impression Dovecot logged to /var/log/maillog like
> Postfix.  I'm not aware of any other log for Dovecot?

depends on your configuration

but even if - you need to read that since you only provided
the postfix line which refers clearly to the dovecot log
because postfix can't know anything more than the response
of the destination which tells you where to look



signature.asc
Description: OpenPGP digital signature


Re: [Dovecot] LMTP error

2014-05-01 Thread Thomas Leuxner
* IT geek 31  2014.05.01 19:21:

> Um, I was under the impression Dovecot logged to /var/log/maillog like
> Postfix.  I'm not aware of any other log for Dovecot?

Obviously not, or you missed the detail in maillog. When the syslog line starts 
with _postfix_ it's postfix.

$ doveadm log find


signature.asc
Description: Digital signature


Re: [Dovecot] LMTP error

2014-05-01 Thread IT geek 31
On 1 May 2014 18:56, Thomas Leuxner  wrote:

>
> What about the Dovecot log? The error in the _Postfix_ log is pretty
> self-explanatory, have a look what Dovecot says.
>

Um, I was under the impression Dovecot logged to /var/log/maillog like
Postfix.  I'm not aware of any other log for Dovecot?

I also forgot to add the relevant command in my Postfix main.cf:

mailbox_transport = lmtp:unix:private/dovecot-lmtp


-Mark


Re: [Dovecot] LMTP error

2014-05-01 Thread Thomas Leuxner
* IT geek 31  2014.05.01 18:35:

> May  1 18:20:17 Server1 postfix/lmtp[13019]: CAEE91F851: to=,
> relay=mail.test.com[private/dovecot-lmtp], delay=1097,
> delays=1096/0.45/0.43/0.46, dsn=4.3.0, status=deferred (host
> mail.test.com[private/dovecot-lmtp]
> said: 451 4.3.0  Invalid user settings. Refer to server log
> for more information. (in reply to RCPT TO command))

What about the Dovecot log? The error in the _Postfix_ log is pretty 
self-explanatory, have a look what Dovecot says.

> userdb {
>   driver = passwd
> }
> userdb {
>   driver = passwd


signature.asc
Description: Digital signature


[Dovecot] LMTP error

2014-05-01 Thread IT geek 31
Hi,

I've recently switched to LMTP as I'm now using mdbox.  However since
switching, mails sent to the root account do not get delivered due to the
following error:

May  1 18:20:17 Server1 postfix/lmtp[13019]: CAEE91F851: to=,
relay=mail.test.com[private/dovecot-lmtp], delay=1097,
delays=1096/0.45/0.43/0.46, dsn=4.3.0, status=deferred (host
mail.test.com[private/dovecot-lmtp]
said: 451 4.3.0  Invalid user settings. Refer to server log
for more information. (in reply to RCPT TO command))

This obviously fills up my mail queue.

All other mails to all other mailboxes deliver fine.

I'm obviously missing something in my config... any ideas?

I'm using Dovecot 2.2.12 on NetBSD 5.2.2.

Many thanks,


-Mark

dovecot -n

# 2.2.12: /usr/pkg/etc/dovecot/dovecot.conf
# OS: NetBSD 5.2.2 cobalt
auth_username_format = %Ln
doveadm_password = secret
doveadm_port = 12345
first_valid_uid = 1010
last_valid_uid = 1020
listen = 192.168.1.1
login_greeting = test.com
mail_location = mdbox:~/mdbox
mail_plugins = " notify replication"
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox "Sent Messages" {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix =
}
passdb {
  driver = passwd
}
passdb {
  driver = passwd
}
plugin {
  mail_replica = tcp:Server2.test.com
}
protocols = imap lmtp
service aggregator {
  fifo_listener replication-notify-fifo {
mode = 0666
  }
  unix_listener replication-notify {
mode = 0600
  }
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
  user = root
}
service imap-login {
  inet_listener imap {
port = 0
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
  }
}
service replicator {
  process_min_avail = 1
  unix_listener replicator-doveadm {
mode = 0777
  }
}
ssl_cert = 

Re: [Dovecot] lmtp: Error: mmap failed with file ... dovecot.index.cache: Cannot allocate memory

2012-08-10 Thread David Jonas
On 8/10/12 10:10 AM, Timo Sirainen wrote:
> On 10.8.2012, at 20.05, David Jonas wrote:
>
>> I have a mailbox with an ungodly number of small messages in it. When
>> new messages are delivered lmtp kicks up an error like the one below. I
>> tried raising the vsz_limit for lmtp but that didn't see to help.
> That should help.
>
>> # ls -lah dovecot.index.cache
>> -rw--- 1 vmail vmail 128M Jul 29 20:16 dovecot.index.cache
>>
>> default_vsz_limit = 256 M
>> service lmtp {
>>  inet_listener lmtp {
>>port = 24
>>  }
>>  vsz_limit = 256 M
>> }
> Did you try higher than 256M? There might be some memory temporarily wasted 
> which causes it to go over.
>
service lmtp {
  vsz_limit = 320 M
}

Yep. That seems to cover it. Delivered a message with lmtp and no error
in the logs. dovecot.index.cache timestamp updated too.

Thanks! Guess I should have tried something absurdly high before
emailing, just to see if that was it.


smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Dovecot] lmtp: Error: mmap failed with file ... dovecot.index.cache: Cannot allocate memory

2012-08-10 Thread David Jonas
On Fri Aug 10 10:10:21 2012, Timo Sirainen wrote:
> On 10.8.2012, at 20.05, David Jonas wrote:
>
>> I have a mailbox with an ungodly number of small messages in it. When
>> new messages are delivered lmtp kicks up an error like the one below. I
>> tried raising the vsz_limit for lmtp but that didn't see to help.
>
> That should help.
>
>> # ls -lah dovecot.index.cache
>> -rw--- 1 vmail vmail 128M Jul 29 20:16 dovecot.index.cache
>>
>> default_vsz_limit = 256 M
>> service lmtp {
>>  inet_listener lmtp {
>>port = 24
>>  }
>>  vsz_limit = 256 M
>> }
>
> Did you try higher than 256M? There might be some memory temporarily wasted 
> which causes it to go over.
>

I haven't tried higher. I'll make the change now though. Is there a way 
to test it besides delivering a new message?



smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Dovecot] lmtp: Error: mmap failed with file ... dovecot.index.cache: Cannot allocate memory

2012-08-10 Thread Timo Sirainen
On 10.8.2012, at 20.05, David Jonas wrote:

> I have a mailbox with an ungodly number of small messages in it. When
> new messages are delivered lmtp kicks up an error like the one below. I
> tried raising the vsz_limit for lmtp but that didn't see to help.

That should help.

> # ls -lah dovecot.index.cache
> -rw--- 1 vmail vmail 128M Jul 29 20:16 dovecot.index.cache
> 
> default_vsz_limit = 256 M
> service lmtp {
>  inet_listener lmtp {
>port = 24
>  }
>  vsz_limit = 256 M
> }

Did you try higher than 256M? There might be some memory temporarily wasted 
which causes it to go over.



[Dovecot] lmtp: Error: mmap failed with file ... dovecot.index.cache: Cannot allocate memory

2012-08-10 Thread David Jonas
Hello,

I have a mailbox with an ungodly number of small messages in it. When
new messages are delivered lmtp kicks up an error like the one below. I
tried raising the vsz_limit for lmtp but that didn't see to help. Any
ideas (besides deleting 400k messages)? Thanks!

dovecot: lmtp(6068, u...@example.com): Error: mmap() failed with file
/home/vmail/domains/example.com/user/Maildir/dovecot.index.cache: Cannot
allocate memory

# ls -lah dovecot.index.cache
-rw--- 1 vmail vmail 128M Jul 29 20:16 dovecot.index.cache

# doveadm mailbox status -u u...@example.com all inbox
INBOX messages=434118 recent=59848 uidnext=434119 uidvalidity=1293568548
unseen=432625 highestmodseq=14023 vsize=1329486283
guid=f8d48232244a1a4dfe2ecb0ad7e0

# doveconf -n
...
default_vsz_limit = 256 M
service lmtp {
  inet_listener lmtp {
port = 24
  }
  vsz_limit = 256 M
}




smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Dovecot] lmtp error at domains containing "-" sign

2011-02-07 Thread fakessh @
is the part of postfix to rewrite addresses

man 8 virtual 


Le mardi 08 février 2011 à 03:17 +0200, Timo Sirainen a écrit :
> On 8.2.2011, at 2.39, ckubu wrote:
> 
> >>> All my problems concerning the recipient parameter are the result of
> >>> changing mailsystem from qmail+vpopmail (with default mail extension
> >>> settings) to postfix+dovecot+lmtp (with non standard
> >>> recipient_delimeter). Maybe you think, thats a very special situation and
> >>> theres no sense in implementing that to dovecot. that would be ok too.
> >> 
> >> I wonder if you could do that address rewriting in SMTP server before
> >> handing the mail over to Dovecot. So that Dovecot only sees
> >> user+detail@domain.
> > 
> > maybe i missunderstood, but the real mailbox name is name-detail@domain and 
> > thats what dovecot sees. so i don't know, what rewriting to do.
> 
> I understood that you have to kinds of '-' chars in the username:
> 
> user-detail@domain
> user-name-with-dashes@domain
> 
> Where you could set the rewriting to give them to Dovecot as:
> 
> user+detail@domain
> user-name-with-dashes@domain
> 
-- 
gpg --keyserver pgp.mit.edu --recv-key 092164A7
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x092164A7


signature.asc
Description: Ceci est une partie de message	numériquement signée


Re: [Dovecot] lmtp error at domains containing "-" sign

2011-02-07 Thread ckubu
hallo,

> >>> All my problems concerning the recipient parameter are the result of
> >>> changing mailsystem from qmail+vpopmail (with default mail extension
> >>> settings) to postfix+dovecot+lmtp (with non standard
> >>> recipient_delimeter). Maybe you think, thats a very special situation
> >>> and theres no sense in implementing that to dovecot. that would be ok
> >>> too.
> >>
> >> I wonder if you could do that address rewriting in SMTP server before
> >> handing the mail over to Dovecot. So that Dovecot only sees
> >> user+detail@domain.
> >
> > maybe i missunderstood, but the real mailbox name is name-detail@domain
> > and thats what dovecot sees. so i don't know, what rewriting to do.
>
> I understood that you have to kinds of '-' chars in the username:
>
> user-detail@domain
> user-name-with-dashes@domain
>
> Where you could set the rewriting to give them to Dovecot as:
>
> user+detail@domain
> user-name-with-dashes@domain

Ok, i now what you meen, I will look about such a resolution. thanks..

lg
christoph




Re: [Dovecot] lmtp error at domains containing "-" sign

2011-02-07 Thread Timo Sirainen
On 8.2.2011, at 2.39, ckubu wrote:

>>> All my problems concerning the recipient parameter are the result of
>>> changing mailsystem from qmail+vpopmail (with default mail extension
>>> settings) to postfix+dovecot+lmtp (with non standard
>>> recipient_delimeter). Maybe you think, thats a very special situation and
>>> theres no sense in implementing that to dovecot. that would be ok too.
>> 
>> I wonder if you could do that address rewriting in SMTP server before
>> handing the mail over to Dovecot. So that Dovecot only sees
>> user+detail@domain.
> 
> maybe i missunderstood, but the real mailbox name is name-detail@domain and 
> thats what dovecot sees. so i don't know, what rewriting to do.

I understood that you have to kinds of '-' chars in the username:

user-detail@domain
user-name-with-dashes@domain

Where you could set the rewriting to give them to Dovecot as:

user+detail@domain
user-name-with-dashes@domain



Re: [Dovecot] lmtp error at domains containing "-" sign

2011-02-07 Thread ckubu
hallo,

> > Sorry, but now i went into another problem: for _normal_ mailboxes of
> > type name1-na...@domain.tld, no mail will be delivered. lmtp said "User
> > doesn't exist" - lmtp is looking of user "na...@domain.tld".
> >
> > Is it possible, that for mails, whose local-part contains the
> > recipient_delimeter, lmtp first checks existence of a user with full
> > local part address and afterward, if no user was found, checks local part
> > without extension?
>
> Possible? Yes. Do I want to add such code? Not really. It'll just slow down
> deliveries for most other people.
>
> > All my problems concerning the recipient parameter are the result of
> > changing mailsystem from qmail+vpopmail (with default mail extension
> > settings) to postfix+dovecot+lmtp (with non standard
> > recipient_delimeter). Maybe you think, thats a very special situation and
> > theres no sense in implementing that to dovecot. that would be ok too.
>
> I wonder if you could do that address rewriting in SMTP server before
> handing the mail over to Dovecot. So that Dovecot only sees
> user+detail@domain.

maybe i missunderstood, but the real mailbox name is name-detail@domain and 
thats what dovecot sees. so i don't know, what rewriting to do.

lg
christoph






Re: [Dovecot] lmtp error at domains containing "-" sign

2011-02-07 Thread Charles Marcus
On 2011-02-07 10:22 AM, Timo Sirainen wrote:
> Possible? Yes. Do I want to add such code? Not really. It'll just
> slow down deliveries for most other people.

Just fyi, this is how postfix works - checks for user 'xxx-yyy', then
just 'xxx'...

-- 

Best regards,

Charles


Re: [Dovecot] lmtp error at domains containing "-" sign

2011-02-07 Thread Timo Sirainen
On 7.2.2011, at 15.01, ckubu wrote:

> Sorry, but now i went into another problem: for _normal_ mailboxes of type 
> name1-na...@domain.tld, no mail will be delivered. lmtp said "User doesn't 
> exist" - lmtp is looking of user "na...@domain.tld".
> 
> Is it possible, that for mails, whose local-part contains the 
> recipient_delimeter, lmtp first checks existence of a user with full local 
> part address and afterward, if no user was found, checks local part without 
> extension?

Possible? Yes. Do I want to add such code? Not really. It'll just slow down 
deliveries for most other people.

> All my problems concerning the recipient parameter are the result of changing 
> mailsystem from qmail+vpopmail (with default mail extension settings) to 
> postfix+dovecot+lmtp (with non standard recipient_delimeter). Maybe you 
> think, thats a very special situation and theres no sense in implementing 
> that to dovecot. that would be ok too.

I wonder if you could do that address rewriting in SMTP server before handing 
the mail over to Dovecot. So that Dovecot only sees user+detail@domain.



Re: [Dovecot] lmtp error at domains containing "-" sign

2011-02-07 Thread ckubu
hi,

> > > I want to deliver mail with rcipient prameter "-", we spoked about that
> > > at thread "LMTP with address extension" and after your patch and
> > > version 2.0.8 that works.
> > >
> > > But now, there's an another much greater problem. No mails to adresses,
> > > which domain-part contains an "-" sign wil be delivered (i.e.
> > > t...@aku-punkt-berlin.de). lmtp is looking about the user "test@aku"
> > > instead of "t...@aku-punkt-berlin.de" and the following logentries
> > > appears:
> >
> > http://hg.dovecot.org/dovecot-2.0/rev/c34d871a7bb6 should fix this.
>
> yes, it works well. thanks timo...

Sorry, but now i went into another problem: for _normal_ mailboxes of type 
name1-na...@domain.tld, no mail will be delivered. lmtp said "User doesn't 
exist" - lmtp is looking of user "na...@domain.tld".

Is it possible, that for mails, whose local-part contains the 
recipient_delimeter, lmtp first checks existence of a user with full local 
part address and afterward, if no user was found, checks local part without 
extension?

All my problems concerning the recipient parameter are the result of changing 
mailsystem from qmail+vpopmail (with default mail extension settings) to 
postfix+dovecot+lmtp (with non standard recipient_delimeter). Maybe you 
think, thats a very special situation and theres no sense in implementing 
that to dovecot. that would be ok too.

greetings
christoph




Re: [Dovecot] lmtp error at domains containing "-" sign

2011-02-04 Thread ckubu
hi,

> > I want to deliver mail with rcipient prameter "-", we spoked about that
> > at thread "LMTP with address extension" and after your patch and version
> > 2.0.8 that works.
> >
> > But now, there's an another much greater problem. No mails to adresses,
> > which domain-part contains an "-" sign wil be delivered (i.e.
> > t...@aku-punkt-berlin.de). lmtp is looking about the user "test@aku"
> > instead of "t...@aku-punkt-berlin.de" and the following logentries
> > appears:
>
> http://hg.dovecot.org/dovecot-2.0/rev/c34d871a7bb6 should fix this.

yes, it works well. thanks timo...

christoph




Re: [Dovecot] lmtp error at domains containing "-" sign

2011-02-04 Thread Timo Sirainen
On Thu, 2011-02-03 at 11:34 +0100, ckubu wrote:

> I want to deliver mail with rcipient prameter "-", we spoked about that at 
> thread "LMTP with address extension" and after your patch and version 2.0.8 
> that works. 
> 
> But now, there's an another much greater problem. No mails to adresses, which 
> domain-part contains an "-" sign wil be delivered (i.e. 
> t...@aku-punkt-berlin.de). lmtp is looking about the user "test@aku" instead 
> of "t...@aku-punkt-berlin.de" and the following logentries appears:

http://hg.dovecot.org/dovecot-2.0/rev/c34d871a7bb6 should fix this.




[Dovecot] lmtp error at domains containing "-" sign

2011-02-03 Thread ckubu
hallo,

I have running dovecot 2.0.9.

I want to deliver mail with rcipient prameter "-", we spoked about that at 
thread "LMTP with address extension" and after your patch and version 2.0.8 
that works. 

But now, there's an another much greater problem. No mails to adresses, which 
domain-part contains an "-" sign wil be delivered (i.e. 
t...@aku-punkt-berlin.de). lmtp is looking about the user "test@aku" instead 
of "t...@aku-punkt-berlin.de" and the following logentries appears:

Feb  3 10:46:36 vserver08 dovecot: auth: Debug: sql(test@aku): 
SELECT '/var/vmail/' || maildir as home, '5000' AS uid, '5000' AS 
gid, '*:bytes=' || quota  as quota_rule FROM mailbox WHERE username 
= 'test@aku' and active = true

Feb  3 10:46:36 vserver08 dovecot: auth: sql(test@aku): Unknown user

Greatings
Christoph