Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How it looks a few minutes after we started our Dovecot
- [root@lmtp-proxy:~] # ps wwwaux | grep RCPT
- dovenull 4057 0.0 0.0 12724 8160 - I 23:19 0:00.07 lmtp: [10.4.2.216 RCPT TO] (lmtp)
- dovenull 4059 0.0 0.0 12724 8728 - I 23:19 0:00.15 lmtp: [10.4.2.214 RCPT TO] (lmtp)
- dovenull 4061 0.0 0.0 14772 10544 - S 23:19 0:00.46 lmtp: [10.4.2.214 RCPT TO] (lmtp)
- dovenull 4063 0.0 0.0 12724 7804 - I 23:19 0:00.01 lmtp: [10.4.2.212 RCPT TO] (lmtp)
- dovenull 4085 0.0 0.0 14772 9584 - I 23:19 0:00.12 lmtp: [10.4.2.216 RCPT TO] (lmtp)
- dovenull 4087 0.0 0.0 12724 8584 - I 23:19 0:00.05 lmtp: [10.4.2.218 RCPT TO] (lmtp)
- dovenull 4096 0.0 0.0 14772 9484 - S 23:19 0:00.36 lmtp: [10.4.2.219 RCPT TO] (lmtp)
- dovenull 8478 0.0 0.0 12724 8124 - I 23:24 0:00.01 lmtp: [10.4.2.215 RCPT TO] (lmtp)
- dovenull 8481 0.0 0.0 14772 9524 - I 23:24 0:00.12 lmtp: [10.4.2.212 RCPT TO] (lmtp)
- dovenull 8483 0.0 0.0 14772 9716 - I 23:24 0:00.17 lmtp: [10.4.2.217 RCPT TO] (lmtp)
- dovenull 8490 0.0 0.0 14772 10036 - I 23:24 0:00.16 lmtp: [10.4.2.218 RCPT TO] (lmtp)
- dovenull 8495 0.0 0.0 14772 9668 - I 23:24 0:00.10 lmtp: [10.4.2.216 RCPT TO] (lmtp)
- dovenull 9645 0.0 0.0 12724 8112 - I 23:25 0:00.01 lmtp: [10.4.2.217 RCPT TO] (lmtp)
- dovenull 9648 0.0 0.0 14772 9764 - S 23:25 0:00.13 lmtp: [10.4.2.212 RCPT TO] (lmtp)
- dovenull 9917 0.0 0.0 12724 9012 - S 23:26 0:00.12 lmtp: [10.4.2.218 RCPT TO] (lmtp)
- dovenull 10231 0.0 0.0 12724 8436 - S 23:26 0:00.07 lmtp: [10.4.2.216 RCPT TO] (lmtp)
- dovenull 11055 0.0 0.0 12724 8424 - I 23:28 0:00.03 lmtp: [10.4.2.213 RCPT TO] (lmtp)
- Let's have a deeper look on PID: 11055
- As you can see, it holds a connection from mailin (exim 4.92) -> lmtp-proxy (Dovecot 2.3) -> popimap (Dovecot 2.3)
- [root@lmtp-proxy:~] # lsof -p 11055
- COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
- lmtp 11055 dovenull cwd VDIR 119,557580335 40 708 /var/run/dovecot
- lmtp 11055 dovenull rtd VDIR 29,2294284432 30 4 /
- lmtp 11055 dovenull txt VREG 209,3424780500 60568 202066 /usr/local/libexec/dovecot/lmtp
- lmtp 11055 dovenull txt VREG 29,2294284432 145304 6060 /libexec/ld-elf.so.1
- lmtp 11055 dovenull txt VREG 209,3424780500 35072 202015 /usr/local/lib/dovecot/libdovecot-lda.so.0.0.0
- lmtp 11055 dovenull txt VREG 209,3424780500 1394944 202027 /usr/local/lib/dovecot/libdovecot-storage.so.0.0.0
- lmtp 11055 dovenull txt VREG 209,3424780500 1699072 202031 /usr/local/lib/dovecot/libdovecot.so.0.0.0
- lmtp 11055 dovenull txt VREG 29,2294284432 1775880 5964 /lib/libc.so.7
- lmtp 11055 dovenull txt VREG 209,3424780500 54336 202039 /usr/local/lib/dovecot/libssl_iostream_openssl.so
- lmtp 11055 dovenull txt VREG 209,3424780500 510664 114794 /usr/local/lib/libssl.so.9
- lmtp 11055 dovenull txt VREG 209,3424780500 2652768 114791 /usr/local/lib/libcrypto.so.9
- lmtp 11055 dovenull txt VREG 29,2294284432 123432 6038 /lib/libthr.so.3
- lmtp 11055 dovenull 0w VCHR 0,14 0t0 14 /dev/null
- lmtp 11055 dovenull 1w VCHR 0,14 0t0 14 /dev/null
- lmtp 11055 dovenull 2u PIPE 0xfffff801d76a7758 0 ->0xfffff801d76a75f0
- lmtp 11055 dovenull 3u PIPE 0xfffff80228b19a50 0 ->0xfffff80228b198e8
- lmtp 11055 dovenull 4w VCHR 0,14 0t0 14 /dev/null
- lmtp 11055 dovenull 5u PIPE 0xfffff803443ba460 0 ->0xfffff803443ba2f8
- lmtp 11055 dovenull 6u PIPE 0xfffff80b9e8b1758 0 ->0xfffff80b9e8b15f0
- lmtp 11055 dovenull 7u unix 0xfffff803d8f2fa38 0t0 /var/run/dovecot/lmtp
- lmtp 11055 dovenull 8u IPv4 0xfffff803d81f6000 0t0 TCP lmtp:24
- lmtp 11055 dovenull 9u unix 0xfffff80b6528b368 0t0 ->0xfffff8117b27c000
- lmtp 11055 dovenull 10u unix 0xfffff8014b6da6d0 0t0 ->0xfffff80d8985e368
- lmtp 11055 dovenull 11u KQUEUE 0xfffff8105e841000 count=0, state=0x2
- lmtp 11055 dovenull 12u PIPE 0xfffff80228b19be0 16384 ->0xfffff80228b19d48
- lmtp 11055 dovenull 13u PIPE 0xfffff80228b19d48 0 ->0xfffff80228b19be0
- lmtp 11055 dovenull 14u IPv4 0xfffff810a0047830 0t0 TCP lmtp-proxy:24->mailin:14298
- lmtp 11055 dovenull 15u IPv4 0xfffff80b6514f418 0t0 TCP lmtp-proxy:10310->popimap:24
- lmtp 11055 dovenull 16u unix 0xfffff80d877da6d0 0t0 ->0xfffff80b657c6368
- Process isn't doing a lot....
- [root@lmtp-proxy:~] # truss -p 11055
- nothing
- [root@lmtp-proxy:~] # gdb -p 11055
- 0x0000000021e8e0ea in _kevent () from /lib/libc.so.7
- (gdb) bt
- #0 0x0000000021e8e0ea in _kevent () from /lib/libc.so.7
- #1 0x00000000230950e3 in __thr_kevent (kq=11, changelist=0x0, nchanges=0, eventlist=0x22468000, nevents=7,
- timeout=0x7fffffffe7f0) at /usr/src/lib/libthr/thread/thr_syscalls.c:398
- #2 0x0000000021ab4e5d in io_loop_handler_run_internal () from /usr/local/lib/dovecot/libdovecot.so.0
- #3 0x0000000021ab2df8 in io_loop_handler_run () from /usr/local/lib/dovecot/libdovecot.so.0
- #4 0x0000000021ab2b58 in io_loop_run () from /usr/local/lib/dovecot/libdovecot.so.0
- #5 0x0000000021a20e78 in master_service_run () from /usr/local/lib/dovecot/libdovecot.so.0
- #6 0x000000000102781a in main ()
- after some minutes....
- Connection between popimap and lmtp-proxy is closed
- [root@lmtp-proxy:~] # lsof -p 11055
- lsof: WARNING: compiled for FreeBSD release 11.2-RELEASE-p10; this is 11.3-RELEASE-p3.
- COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
- lmtp 11055 dovenull cwd VDIR 119,557580335 40 708 /var/run/dovecot
- lmtp 11055 dovenull rtd VDIR 29,2294284432 30 4 /
- lmtp 11055 dovenull txt VREG 209,3424780500 60568 202066 /usr/local/libexec/dovecot/lmtp
- lmtp 11055 dovenull txt VREG 29,2294284432 145304 6060 /libexec/ld-elf.so.1
- lmtp 11055 dovenull txt VREG 209,3424780500 35072 202015 /usr/local/lib/dovecot/libdovecot-lda.so.0.0.0
- lmtp 11055 dovenull txt VREG 209,3424780500 1394944 202027 /usr/local/lib/dovecot/libdovecot-storage.so.0.0.0
- lmtp 11055 dovenull txt VREG 209,3424780500 1699072 202031 /usr/local/lib/dovecot/libdovecot.so.0.0.0
- lmtp 11055 dovenull txt VREG 29,2294284432 1775880 5964 /lib/libc.so.7
- lmtp 11055 dovenull txt VREG 209,3424780500 54336 202039 /usr/local/lib/dovecot/libssl_iostream_openssl.so
- lmtp 11055 dovenull txt VREG 209,3424780500 510664 114794 /usr/local/lib/libssl.so.9
- lmtp 11055 dovenull txt VREG 209,3424780500 2652768 114791 /usr/local/lib/libcrypto.so.9
- lmtp 11055 dovenull txt VREG 29,2294284432 123432 6038 /lib/libthr.so.3
- lmtp 11055 dovenull 0w VCHR 0,14 0t0 14 /dev/null
- lmtp 11055 dovenull 1w VCHR 0,14 0t0 14 /dev/null
- lmtp 11055 dovenull 2u PIPE 0xfffff801d76a7758 0 ->0xfffff801d76a75f0
- lmtp 11055 dovenull 3u PIPE 0xfffff80228b19a50 0 ->0xfffff80228b198e8
- lmtp 11055 dovenull 4w VCHR 0,14 0t0 14 /dev/null
- lmtp 11055 dovenull 5u PIPE 0xfffff803443ba460 0 ->0xfffff803443ba2f8
- lmtp 11055 dovenull 6u PIPE 0xfffff80b9e8b1758 0 ->0xfffff80b9e8b15f0
- lmtp 11055 dovenull 7u unix 0xfffff803d8f2fa38 0t0 /var/run/dovecot/lmtp
- lmtp 11055 dovenull 8u IPv4 0xfffff803d81f6000 0t0 TCP lmtp:24
- lmtp 11055 dovenull 9u unix 0xfffff80b6528b368 0t0 ->0xfffff8117b27c000
- lmtp 11055 dovenull 10u unix 0xfffff8014b6da6d0 0t0 ->0xfffff80d8985e368
- lmtp 11055 dovenull 11u KQUEUE 0xfffff8105e841000 count=0, state=0x2
- lmtp 11055 dovenull 12u PIPE 0xfffff80228b19be0 16384 ->0xfffff80228b19d48
- lmtp 11055 dovenull 13u PIPE 0xfffff80228b19d48 0 ->0xfffff80228b19be0
- lmtp 11055 dovenull 14u IPv4 0xfffff810a0047830 0t0 TCP lmtp-proxy:24->mailin:14298
- lmtp 11055 dovenull 16u unix 0xfffff80d877da6d0 0t0 ->0xfffff80b657c6368
- [root@mailin:~] 1m39s # netstat -an | grep 14298
- tcp4 0 0 10.4.2.213.14298 10.0.2.100.24 FIN_WAIT_2
- [root@lmtp-proxy:~] # netstat -an | grep 14298
- tcp4 2514 0 10.0.2.100.24 10.4.2.213.14298 CLOSE_WAIT
- LMTP Debug log:
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Connect from 10.4.2.213
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: Sent: 220 lmtp-proxy Dovecot ready.
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: Timeout start
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: Received new command: LHLO mxin
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: command LHLO: New command
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: command LHLO: 250 reply: Submitted
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: command LHLO: Replied
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: command LHLO: Ready to reply
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: Trigger output
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: command LHLO: Next to reply
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: Timeout stop
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: Sending replies
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: command LHLO: Completed
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: Connection state reset
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: command LHLO: 250 reply: Sent: 250-lmtp-proxy 8BITMIME CHUNKING ENHANCEDSTATUSCODES PIPELINING STARTTLS
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: command LHLO: Finished
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: command LHLO: Destroy
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-client: conn 10.1.1.38:24 [1]: command RCPT: Got reply (1/1): 552 5.2.2 <test@blaabla.ch> Quota exceeded (mailbox for user is full) (1 commands pending, 0 commands queued)
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-client: conn 10.1.1.38:24 [1]: No commands pending; stop timeout
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-client: conn 10.1.1.38:24 [1]: transaction: Got RCPT reply: 552 5.2.2 <test@blaabla.ch> Quota exceeded (mailbox for user is full)
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-client: conn 10.1.1.38:24 [1]: command [plug]: Submitted
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-client: conn 10.1.1.38:24 [1]: transaction: rcpt <test@blaabla.ch>: Denied
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: command RCPT: 552 reply: Submitted
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: command RCPT: Replied
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: command RCPT: Ready to reply
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: Trigger output
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-client: conn 10.1.1.38:24 [1]: transaction: Transaction is not yet complete
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-client: conn 10.1.1.38:24 [1]: command RCPT: Destroy (0 commands pending, 1 commands queued)
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: Sending replies
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: command RCPT: Completed
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: rcpt test@blaabla.ch: Denied
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: command RCPT: 552 reply: Sent: 552 5.2.2 <test@blaabla.ch> Quota exceeded (mailbox for user is full)
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: Trigger output
- Dec 5 23:28:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-server: conn 10.4.2.213:14298 [4]: Sending replies
- Dec 5 23:31:57.000 lmtp-proxy dovecot: lmtp(12258): Debug: lmtp-server: conn 10.4.2.214:59932 [35]: Received new command: BDAT 11055 LAST
- Dec 5 23:33:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-client: conn 10.1.1.38:24 [1]: Connection failed: 421 4.4.2 popimap Disconnected for inactivity
- Dec 5 23:33:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-client: conn 10.1.1.38:24 [1]: Disconnected
- Dec 5 23:33:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-client: conn 10.1.1.38:24 [1]: Disconnected: Connection closed (fd=15)
- Dec 5 23:33:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-client: conn 10.1.1.38:24 [1]: transaction: Connection lost: 421 4.4.2 popimap Disconnected for inactivity
- Dec 5 23:33:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-client: conn 10.1.1.38:24 [1]: transaction: Returning failure: 421 4.4.2 popimap Disconnected for inactivity
- Dec 5 23:33:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-client: conn 10.1.1.38:24 [1]: command [plug]: Aborted
- Dec 5 23:33:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-client: conn 10.1.1.38:24 [1]: command [plug]: Removed from send queue
- Dec 5 23:33:22.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-client: conn 10.1.1.38:24 [1]: command [plug]: Destroy (0 commands pending, 0 commands queued)
- Dec 5 23:55:59.000 lmtp-proxy dovecot: lmtp(11055): Debug: lmtp-client: conn 10.1.1.38:24 [1]: transaction: Destroy
- [root@popimap:~] 1 # doveadm quota get -u test@blaabla.ch
- Quota name Type Value Limit %
- User quota STORAGE 204884 204800 100
- User quota MESSAGE 1792 - 0
- [root@lmtp-proxy:~] # doveconf -n
- # 2.3.9 (e7f79df99): /usr/local/etc/dovecot/dovecot.conf
- # OS: FreeBSD 11.3-RELEASE-p3 amd64
- # Hostname: lmtp-proxy
- auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.+-_@
- auth_verbose = yes
- default_client_limit = 5000
- default_vsz_limit = 512 M
- director_mail_servers = ....
- director_servers = ....
- director_user_expire = 1 weeks
- disable_plaintext_auth = no
- lmtp_proxy = yes
- lmtp_user_concurrency_limit = 20
- log_debug = category:lmtp
- login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e session=<%{session}> %c %k
- passdb {
- args = proxy=y nopassword=y
- driver = static
- }
- service anvil {
- client_limit = 6000
- }
- service director {
- fifo_listener login/proxy-notify {
- mode = 0666
- }
- inet_listener {
- address = ...
- port = 9090
- }
- unix_listener director-userdb {
- mode = 0666
- }
- unix_listener login/director {
- mode = 0666
- }
- }
- service imap-login {
- executable = imap-login director
- inet_listener imap {
- address = ....
- }
- inet_listener imaps {
- address = ....
- }
- process_min_avail = 24
- service_count = 0
- }
- service lmtp {
- inet_listener lmtp {
- address = ....
- port = 24
- }
- process_limit = 1024
- process_min_avail = 24
- user = dovenull
- }
- service pop3-login {
- executable = pop3-login director
- inet_listener pop3 {
- address = ....
- }
- inet_listener pop3s {
- address = ...
- }
- process_min_avail = 24
- service_count = 0
- }
- ssl_cert = ...
- ssl_cipher_list = ECDHE+AESGCM:DHE+AESGCM:ECDHE+AES256:DHE+AES256:ECDHE+AES:DHE+AES:ECDHE+3DES:DHE+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!LOW:!MEDIUM:!aNULL:!eNULL:!DES:!DSS:!EXP:!MD5:!PSK:!RC4:!SRP
- ssl_dh = # hidden, use -P to show it
- ssl_key = # hidden, use -P to show it
- ssl_prefer_server_ciphers = yes
- verbose_proctitle = yes
- protocol lmtp {
- auth_socket_path = director-userdb
- }
Add Comment
Please, Sign In to add comment