Hello, I have successfully installed Mail server, but have one issue.
Here the flow in direction external_world -> local network: opensmtpd -> ClamAV (via clamsmtpd) -> SA (via proxsmtpd) -> dovecot. All works fine, but when I switch on the quota for users' maildir and quota is reached, the bounce message is generated for sender, but here is a problem. This message is unable to find correct way for delivering. All needed options has been set on dovecot side for hard rejecting mails. Mail server is in FreeBSD Jail (VNET) with hostname like jmail in private subnet with IP 192.168.254.18 Server uses on system user - vmail. Clamsmtpd listen on 127.0.0.1:10025 |-> Out address 127.0.0.1:10026 Proxsmtpd listen on 127.0.0.1:10027 |-> Out address 127.0.0.1:10028 Below my ruleset: # cat ./smtpd.conf # ca mail.company.com.ua certificate "/usr/local/etc/mail/ssl/mail.company.com.ua/ca.cer" pki mail.company.com.ua certificate "/usr/local/etc/mail/ssl/mail.company.com.ua/fullchain.cer" pki mail.company.com.ua key "/usr/local/etc/mail/ssl/mail.company.com.ua/mail.company.com.ua.key" table aliases file:/etc/mail/aliases table users_ukrnas_recp file:/usr/local/etc/mail/users_company_recp table users_ukrnas_virtual file:/usr/local/etc/mail/users_company_virtual filter dnsbl-spamhaus dnsbl "-h zen.spamhaus.org" filter regex-my regex filter pause-my pause "-s 6" # filter filter-all chain dnsbl-spamhaus regex-my pause-my # listen on epair5b inet4 port 25 filter filter-all tls pki mail.company.com.ua hostname mail.company.com.ua tag FROM_WAN listen on epair5b inet4 port 26 hostname mail.company.com.ua tag FROM_TRUSTED listen on lo0 inet4 port 10026 hostname mail.ukrnasos.com.ua tag FROM_CLAM listen on lo0 inet4 port 10028 hostname mail.ukrnasos.com.ua tag FROM_SA bounce-warn 2h,1d expire 2d limit session max-rcpt 1000 limit session max-mails 100 max-message-size 36700160 # 33Mbytes ### # pass all traffic from outside to ClamAV accept tagged FROM_WAN from ! local for domain "company.com.ua" recipient <users_company_recp> relay via smtp://127.0.0.1:10025 # pass all traffic from ClamAV to SA accept tagged FROM_CLAM from local for domain "company.com.ua" relay via smtp://127.0.0.1:10027 # allow all traffic from SA to Dovecot accept tagged FROM_SA from local for domain "company.com.ua" virtual <users_company_virtual> deliver to lmtp "/var/run/dovecot/lmtp" rcpt-to # allow from LAN & JAILS listened on port 26 accept tagged FROM_TRUSTED from ! local for domain "company.com.ua" virtual <users_company_virtual> deliver to lmtp "/var/run/dovecot/lmtp" rcpt-to accept tagged FROM_TRUSTED from ! local for ! domain "company.com.ua" relay # allow local messages accept from local for local alias # allow outgoing mails accept from local for any relay Below the part of log-file: May 24 08:31:22 jmail dovecot: lmtp(32703): Connect from local May 24 08:31:22 jmail dovecot: lmtp(32703): Disconnect from local: Remote closed connection (state = MAIL FROM) May 24 08:31:22 jmail smtpd[23001]: debug: smtpd: mda process done for session 63b95af27410131e: exited abnormally May 24 08:31:22 jmail smtpd[23006]: delivery: TempFail for 2700b309acf86178: from=<[email protected]>, to=<[email protected]>, user=vmail, method=lmtp, delay=0s, stat=Error ("") May 24 08:31:22 jmail smtpd[23006]: debug: mda: session 63b95af27410131e done May 24 08:31:22 jmail smtpd[23006]: debug: mda: user "vmail" becomes runnable May 24 08:31:22 jmail smtpd[23006]: debug: mda: all done for user "<getpwnam>:vmail" May 24 08:31:22 jmail smtpd[23006]: mta: timeout for session hangon May 24 08:31:22 jmail smtpd[23006]: debug: mta: 0x8026bd200: no task for relay [relay:127.0.0.1,port=10025,mx] May 24 08:31:22 jmail smtpd[23006]: mta: debug: last connection: hanging on for 9s May 24 08:31:22 jmail smtpd[23006]: debug: mta: ... timeout for [relay:127.0.0.1,port=10027,mx] May 24 08:31:22 jmail smtpd[23006]: debug: mta: draining [relay:127.0.0.1,port=10027,mx] refcount=2, ntask=0, nconnector=1, nconn=1 May 24 08:31:22 jmail smtpd[23006]: debug: mta: all done for [relay:127.0.0.1,port=10027,mx] May 24 08:31:23 jmail smtpd[23006]: debug: mta: ... timeout for [connector:[]->[relay:127.0.0.1,port=10027,mx],0x20000] May 24 08:31:23 jmail smtpd[23006]: debug: mta: connecting with [connector:[]->[relay:127.0.0.1,port=10027,mx],0x0] May 24 08:31:23 jmail smtpd[23006]: debug: mta: no task for connector May 24 08:31:23 jmail smtpd[23006]: mta: timeout for session hangon May 24 08:31:23 jmail smtpd[23006]: debug: mta: 0x8026be600: no task for relay [relay:127.0.0.1,port=10027,mx] May 24 08:31:23 jmail smtpd[23006]: mta: debug: last connection: hanging on for 9s May 24 08:31:23 jmail smtpd[23006]: mta: timeout for session hangon May 24 08:31:23 jmail smtpd[23006]: debug: mta: 0x8026bd200: no task for relay [relay:127.0.0.1,port=10025,mx] May 24 08:31:23 jmail smtpd[23006]: mta: debug: last connection: hanging on for 8s May 24 08:31:24 jmail smtpd[23006]: mta: timeout for session hangon May 24 08:31:24 jmail smtpd[23006]: debug: mta: 0x8026be600: no task for relay [relay:127.0.0.1,port=10027,mx] May 24 08:31:24 jmail smtpd[23006]: mta: debug: last connection: hanging on for 8s May 24 08:31:24 jmail smtpd[23006]: mta: timeout for session hangon May 24 08:31:24 jmail smtpd[23006]: debug: mta: 0x8026bd200: no task for relay [relay:127.0.0.1,port=10025,mx] May 24 08:31:24 jmail smtpd[23006]: mta: debug: last connection: hanging on for 7s May 24 08:31:25 jmail smtpd[23006]: mta: timeout for session hangon May 24 08:31:25 jmail smtpd[23006]: debug: mta: 0x8026be600: no task for relay [relay:127.0.0.1,port=10027,mx] May 24 08:31:25 jmail smtpd[23006]: mta: debug: last connection: hanging on for 7s May 24 08:31:25 jmail smtpd[23006]: mta: timeout for session hangon May 24 08:31:25 jmail smtpd[23006]: debug: mta: 0x8026bd200: no task for relay [relay:127.0.0.1,port=10025,mx] May 24 08:31:25 jmail smtpd[23006]: mta: debug: last connection: hanging on for 6s May 24 08:31:26 jmail smtpd[23006]: mta: timeout for session hangon May 24 08:31:26 jmail smtpd[23006]: debug: mta: 0x8026be600: no task for relay [relay:127.0.0.1,port=10027,mx] May 24 08:31:26 jmail smtpd[23006]: mta: debug: last connection: hanging on for 6s May 24 08:31:26 jmail smtpd[23006]: mta: timeout for session hangon May 24 08:31:26 jmail smtpd[23006]: debug: mta: 0x8026bd200: no task for relay [relay:127.0.0.1,port=10025,mx] May 24 08:31:26 jmail smtpd[23006]: mta: debug: last connection: hanging on for 5s May 24 08:31:27 jmail smtpd[23006]: mta: timeout for session hangon May 24 08:31:27 jmail smtpd[23006]: debug: mta: 0x8026be600: no task for relay [relay:127.0.0.1,port=10027,mx] May 24 08:31:27 jmail smtpd[23006]: mta: debug: last connection: hanging on for 5s May 24 08:31:27 jmail smtpd[23006]: mta: timeout for session hangon May 24 08:31:27 jmail smtpd[23006]: debug: mta: 0x8026bd200: no task for relay [relay:127.0.0.1,port=10025,mx] May 24 08:31:27 jmail smtpd[23006]: mta: debug: last connection: hanging on for 4s May 24 08:31:28 jmail smtpd[23006]: mta: timeout for session hangon May 24 08:31:28 jmail smtpd[23006]: debug: mta: 0x8026be600: no task for relay [relay:127.0.0.1,port=10027,mx] May 24 08:31:28 jmail smtpd[23006]: mta: debug: last connection: hanging on for 4s May 24 08:31:28 jmail smtpd[23006]: mta: timeout for session hangon May 24 08:31:28 jmail smtpd[23006]: debug: mta: 0x8026bd200: no task for relay [relay:127.0.0.1,port=10025,mx] May 24 08:31:28 jmail smtpd[23006]: mta: debug: last connection: hanging on for 3s May 24 08:31:29 jmail smtpd[23006]: mta: timeout for session hangon May 24 08:31:29 jmail smtpd[23006]: debug: mta: 0x8026be600: no task for relay [relay:127.0.0.1,port=10027,mx] May 24 08:31:29 jmail smtpd[23006]: mta: debug: last connection: hanging on for 3s May 24 08:31:29 jmail smtpd[23006]: mta: timeout for session hangon May 24 08:31:29 jmail smtpd[23006]: debug: mta: 0x8026bd200: no task for relay [relay:127.0.0.1,port=10025,mx] May 24 08:31:29 jmail smtpd[23006]: mta: debug: last connection: hanging on for 2s May 24 08:31:30 jmail smtpd[23006]: mta: timeout for session hangon May 24 08:31:30 jmail smtpd[23006]: debug: mta: 0x8026be600: no task for relay [relay:127.0.0.1,port=10027,mx] May 24 08:31:30 jmail smtpd[23006]: mta: debug: last connection: hanging on for 2s May 24 08:31:30 jmail smtpd[23006]: mta: timeout for session hangon May 24 08:31:30 jmail smtpd[23006]: debug: mta: 0x8026bd200: no task for relay [relay:127.0.0.1,port=10025,mx] May 24 08:31:30 jmail smtpd[23006]: mta: debug: last connection: hanging on for 1s May 24 08:31:31 jmail smtpd[23006]: mta: timeout for session hangon May 24 08:31:31 jmail smtpd[23006]: debug: mta: 0x8026be600: no task for relay [relay:127.0.0.1,port=10027,mx] May 24 08:31:31 jmail smtpd[23006]: mta: debug: last connection: hanging on for 1s May 24 08:31:31 jmail smtpd[23006]: mta: timeout for session hangon May 24 08:31:31 jmail smtpd[23006]: debug: mta: 0x8026bd200: no task for relay [relay:127.0.0.1,port=10025,mx] May 24 08:31:31 jmail smtpd[23006]: smtp-in: Closing session 63b95ae19acac66b May 24 08:31:31 jmail smtpd[23006]: debug: smtp: 0x8027b33c0: deleting session: done May 24 08:31:31 jmail smtpd[23006]: smtp-out: Closing session 63b95ae03410b1be: 1 message sent. May 24 08:31:31 jmail smtpd[23006]: debug: mta: 0x8026bd200: session done May 24 08:31:31 jmail smtpd[23006]: debug: mta_route_collect([] <-> 127.0.0.1 (localhost)) May 24 08:31:31 jmail smtpd[23006]: debug: mta: connecting with [connector:[]->[relay:127.0.0.1,port=10025,mx],0x0] May 24 08:31:31 jmail smtpd[23006]: debug: mta: no task for connector May 24 08:31:31 jmail smtpd[23006]: debug: mta: freeing [relay:127.0.0.1,port=10025,mx] May 24 08:31:31 jmail smtpd[23006]: debug: mta: freeing [connector:[]->[relay:127.0.0.1,port=10025,mx],0x0] May 24 08:31:32 jmail smtpd[23005]: debug: scheduler: evp:2700b309acf86178 scheduled (mda) May 24 08:31:32 jmail smtpd[23006]: mda: new user 63b95af32e9164a4 for "<getpwnam>:vmail" May 24 08:31:32 jmail smtpd[23004]: debug: lka: userinfo <getpwnam>:vmail May 24 08:31:32 jmail smtpd[23006]: debug: mda: new session 63b95af41f9cd63c for user "<getpwnam>:vmail" evpid 2700b309acf86178 May 24 08:31:32 jmail smtpd[23006]: debug: mda: no more envelope for "<getpwnam>:vmail" May 24 08:31:32 jmail smtpd[23006]: debug: mda: got message fd 5 for session 63b95af41f9cd63c evpid 2700b309acf86178 May 24 08:31:32 jmail smtpd[23006]: debug: mda: querying mda fd for session 63b95af41f9cd63c evpid 2700b309acf86178 May 24 08:31:32 jmail smtpd[23001]: debug: smtpd: forking mda for session 63b95af41f9cd63c: "/var/run/dovecot/lmtp rcpt-to" as vmail May 24 08:31:32 jmail smtpd[23006]: debug: mda: got mda fd 6 for session 63b95af41f9cd63c evpid 2700b309acf86178 When bounced message is generated before relaing to clamAV, e.g. unknown user, all works as expected. Any help are welcome. -- Vitaliy -- You received this mail because you are subscribed to [email protected] To unsubscribe, send a mail to: [email protected]
