Is gonzalo a system user?
Sent from Samsung tablet -------- Original message -------- From Gonzalo <[email protected]> Date: 06/11/2015 4:03 PM (GMT-06:00) To Joerg Jung <[email protected]> Cc [email protected] Subject Re: Aliases error adding accept from any for any alias <aliases> deliver to mda "/usr/local/libexec/dovecot/dovecot-lda -f %{sender} -d %{dest.user}" is the same, I really not understand this :/ 2015-06-11 18:05 GMT-03:00 Joerg Jung <[email protected]>: Am 11.06.2015 um 18:16 schrieb Gonzalo <[email protected]>: Well, with debug enable I have this: auth: Info: passwd-file(mac): unknown user Why this not match with an alias and redirect to the real user gonzalo? Because your aliases rule is "from local" and "for local" but you connection below was from extern/any (Google), thus matches the virtuals rule?! I'm lost here. 2015-06-11 12:37 GMT-03:00 Gonzalo <[email protected]>: # 2.2.15: /etc/dovecot/dovecot.conf # OS: OpenBSD 5.7 amd64 imap_client_workarounds = delay-newmail tb-extra-mailbox-sep tb-lsub-flags log_path = /var/log/dovecot mail_home = /var/www/mail mail_max_userip_connections = 20 managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environm ent mailbox date ihave duplicate mbox_write_locks = fcntl namespace inbox { inbox = yes location = uid=vmail gid=vmail maildir:/var/www/mail/%n:LAYOUT=fs 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 = separator = / } passdb { args = username_format=%n /etc/dovecot/users.db driver = passwd-file } plugin { auth_debug = yes auth_verbose = yes log_path = /var/log/dovecot.log mail_debug = yes sieve = /var/www/mail/%n/%n.sieve sieve_global_dir = /var/sieve sieve_global_path = /var/sieve/global-default.sieve } pop3_client_workarounds = outlook-no-nuls oe-ns-eoh protocols = imap pop3 lmtp sieve service auth { unix_listener auth-userdb { mode = 0777 } } service managesieve-login { inet_listener sieve { port = 4190 } inet_listener sieve_deprecated { port = 2000 } } ssl = required ssl_cert = </etc/ssl/dovecotcert.pem ssl_key = </etc/ssl/private/dovecot.pem ssl_protocols = !SSLv2 !SSLv3 userdb { args = username_format=%n /etc/dovecot/users.db driver = passwd-file } protocol lda { info_log_path = /var/log/dovecot-deliver.log log_path = /var/log/dovecot-deliver-errors.log mail_plugins = " sieve" postmaster_address = [email protected] } I see nothing on dovecot logs :/ 2015-06-11 2:34 GMT-03:00 Joerg Jung <[email protected]>: Am 11.06.2015 um 03:17 schrieb Gonzalo <[email protected]>: Hi all, I have some problem with my conf: OpenBSD 5.7 -stable == smtpd.conf == table dominios file:/etc/mail/dominios table usuarios file:/etc/dovecot/users table usuariosv file:/etc/mail/usuariosv table aliases db:/etc/mail/aliases.db table spam file:/etc/mail/spam expire 4h pki foo.com.ar certificate "/etc/mail/certs/foo.crt" pki foo.com.ar key "/etc/mail/certs/foo.key" pki foo.com.ar dhparams "/etc/ssl/foo.com.ar/dhparam.pem" listen on lo0 port 25 listen on egress secure pki foo.com.ar hostname foo.com.ar listen on egress port 587 tls-require pki foo.com.ar auth <usuarios> reject from any sender <spam> for domain <dominios> accept for local alias <aliases> deliver to mda "/usr/local/libexec/dovecot/dovecot-lda -f %{sender} -d %{dest.user}" accept from any for domain <dominios> virtual <usuariosv> deliver to mda "/usr/local/libexec/dovecot/dovecot-lda -f %{sender} -d %{dest.user}" accept for any relay == /etc/mail/dominios == hostname foo.com.ar serv0.foo.com.ar bar.com.ar == /etc/dovecot/users == gonzalo gonzalo:$2b$06nDRSAujnL9gdxORpoNLou37NvDEg2ab2QIP3LN3CR1KUIPZZ8QLm == /etc/mail/usuariosv == ## foo @foo.com.ar vmail ## bar @bar.com.ar vmail == /etc/mail/aliases == ... system stuff ... ## Alias foo y bar contacto: gonzalo serv0: gonzalo [email protected] gonzalo [email protected]: gonzalo == /etc/mail/spam == ... long list of email spammers ... == smtpd -dv -T smtp == debug: init ssl-tree info: loading pki information for foo.com.ar info: OpenSMTPD 5.4.4 starting debug: bounce warning after 4h debug: using "fs" queue backend debug: using "ramqueue" scheduler backend debug: using "ram" stat backend info: startup [debug mode] debug: parent_send_config_ruleset: reloading debug: parent_send_config: configuring pony process debug: parent_send_config: configuring ca process debug: ca_engine_init: using RSAX engine support debug: smtp: listen on 256.257.258.259 port 587 flags 0x469 pki "foo.com.ar" debug: smtp: listen on 256.257.258.259 port 25 flags 0x401 pki "foo.com.ar" debug: smtp: listen on 256.257.258.259 port 465 flags 0x402 pki "foo.com.ar" debug: smtp: listen on 127.0.0.1 port 25 flags 0x400 pki "" debug: smtp: listen on IPv6:::1 port 25 flags 0x400 pki "" debug: smtp: listen on IPv6:fe80::1%lo0 port 25 flags 0x400 pki "" debug: pony: rsae_init debug: pony: rsae_init debug: init ssl-tree info: loading pki keys for foo.com.ar debug: init private ssl-tree debug: queue: done loading queue into scheduler debug: smtp: will accept at most 499 clients debug: smtpd: scanning offline queue... debug: smtpd: offline scanning done debug: smtp: new client on listener: 0x11f8a2dd8000 smtp: 0x11f86686d000: STATE_NEW -> STATE_CONNECTED smtp-in: New session 3dce2ce17de9532c from host mail-lb0-f194.google.com [209.85.217.194] smtp: 0x11f86686d000: >>> 220 foo.com.ar ESMTP OpenSMTPD smtp: 0x11f86686d000: <<< EHLO mail-lb0-f194.google.com smtp: 0x11f86686d000: STATE_CONNECTED -> STATE_HELO smtp: 0x11f86686d000: >>> 250-foo.com.ar Hello mail-lb0-f194.google.com [209.85.217.194], pleased to meet you smtp: 0x11f86686d000: >>> 250-8BITMIME smtp: 0x11f86686d000: >>> 250-ENHANCEDSTATUSCODES smtp: 0x11f86686d000: >>> 250-SIZE 36700160 smtp: 0x11f86686d000: >>> 250-DSN smtp: 0x11f86686d000: >>> 250-STARTTLS smtp: 0x11f86686d000: >>> 250 HELP smtp: 0x11f86686d000: <<< STARTTLS smtp: 0x11f86686d000: >>> 220 2.0.0: Ready to start TLS smtp: 0x11f86686d000: STATE_HELO -> STATE_TLS debug: lka: looking up pki "foo.com.ar" debug: session_start_ssl: switching to SSL debug: pony: rsae_priv_enc debug: pony: rsae_init debug: pony: rsae_init debug: pony: rsae_pub_dec debug: pony: rsae_bn_mod_exp debug: pony: rsae_init debug: pony: rsae_pub_dec debug: pony: rsae_bn_mod_exp debug: pony: rsae_pub_dec debug: pony: rsae_bn_mod_exp smtp-in: Started TLS on session 3dce2ce17de9532c: version=TLSv1/SSLv3, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128 smtp-in: Client certificate verification succeeded on session 3dce2ce17de9532c smtp: 0x11f86686d000: STATE_TLS -> STATE_HELO smtp: 0x11f86686d000: <<< EHLO mail-lb0-f194.google.com smtp: 0x11f86686d000: STATE_HELO -> STATE_HELO smtp: 0x11f86686d000: >>> 250-foo.com.ar Hello mail-lb0-f194.google.com [209.85.217.194], pleased to meet you smtp: 0x11f86686d000: >>> 250-8BITMIME smtp: 0x11f86686d000: >>> 250-ENHANCEDSTATUSCODES smtp: 0x11f86686d000: >>> 250-SIZE 36700160 smtp: 0x11f86686d000: >>> 250-DSN smtp: 0x11f86686d000: >>> 250 HELP smtp: 0x11f86686d000: <<< MAIL FROM:<[email protected]> SIZE=1592 debug: smtp: SIZE in MAIL FROM command smtp: 0x11f86686d000: >>> 250 2.0.0: Ok smtp: 0x11f86686d000: <<< RCPT TO:<[email protected]> debug: aliases_virtual_get: '[email protected]' resolved to 1 nodes smtp: 0x11f86686d000: >>> 250 2.1.5 Destination address valid: Recipient ok smtp: 0x11f86686d000: <<< DATA smtp: 0x11f86686d000: STATE_HELO -> STATE_BODY smtp: 0x11f86686d000: >>> 354 Enter mail, end with "." on a line by itself <<< [MSG] Received: by lbio15 with SMTP id o15so6820317lbi.0 <<< [MSG] for <[email protected]>; Wed, 10 Jun 2015 18:07:59 -0700 (PDT) <<< [MSG] DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; <<< [MSG] d=gmail.com; s=20120113; <<< [MSG] h=mime-version:date:message-id:subject:from:to:content-type; <<< [MSG] bh=0ysx8QjPoNX3Ur22Gf3i8rRT75gven8a2JY+F0UjpWg=; <<< [MSG] b=aO21Vgfq47ONMreAB5ZSjq02LgfFu0k6OE8MdSbYYOJA8jz+kmozP2LvmYKl7j/NHX <<< [MSG] hMwsuwunoxln/jJvU9TWvqWshIlLJLdB2kgz+weFI4vJEd52eWeuE5BP2Jf+OhHeX/lS <<< [MSG] /oh7flb+LrDwz4pPz7njT8D8EAE3Q8vNYTcP3Ng1XPyD4f8iSj5pix7TTCnm04BOWqIP <<< [MSG] tLKHtPGmkwTAA96QmnIuni0zUizpGzufjiyOyXF65QuHIIJ0gjfhbFNEN+97KETVdqen <<< [MSG] Tayq2CWQdjl0yDgcVjeOVRgoB0ODPArhMhQSxVmSlmqqZCUYDfMLUj59oIvEHl/IZAJ0 <<< [MSG] E4/g== <<< [MSG] MIME-Version: 1.0 <<< [MSG] X-Received: by 10.152.4.137 with SMTP id k9mr6957037lak.29.1433984879793; Wed, <<< [MSG] 10 Jun 2015 18:07:59 -0700 (PDT) <<< [MSG] Received: by 10.112.57.233 with HTTP; Wed, 10 Jun 2015 18:07:59 -0700 (PDT) <<< [MSG] Date: Wed, 10 Jun 2015 22:07:59 -0300 <<< [MSG] Message-ID: <CAL7wv-sMAWdQqn371hcqTFh5sPSPQUtP=OkjZo9fjAU=83s=y...@mail.gmail.com> <<< [MSG] Subject: Test <<< [MSG] From: Gonzalo <[email protected]> <<< [MSG] To: "Gonzalo" <[email protected]> <<< [MSG] Content-Type: multipart/alternative; boundary=089e013d1cf85f9a280518339fa9 <<< [MSG] <<< [MSG] --089e013d1cf85f9a280518339fa9 <<< [MSG] Content-Type: text/plain; charset=UTF-8 <<< [MSG] <<< [MSG] 1 <<< [MSG] <<< [MSG] -- <<< [MSG] <<< [MSG] --089e013d1cf85f9a280518339fa9-- debug: 0x11f86686d000: end of message, msgflags=0x0000 smtp: 0x11f86686d000: >>> 250 2.0.0: f435f959 Message accepted for delivery smtp-in: Accepted message f435f959 on session 3dce2ce17de9532c: from=<[email protected]>, to=<[email protected]>, size=1555, ndest=1, proto=ESMTP smtp: 0x11f86686d000: STATE_BODY -> STATE_HELO debug: scheduler: evp:f435f95975dbbb21 scheduled (mda) mda: new user 3dce2ce225536b9c for "<getpwnam>:vmail" debug: lka: userinfo <getpwnam>:vmail debug: mda: new session 3dce2ce3ff37cce4 for user "<getpwnam>:vmail" evpid f435f95975dbbb21 debug: mda: no more envelope for "<getpwnam>:vmail" debug: mda: got message fd 5 for session 3dce2ce3ff37cce4 evpid f435f95975dbbb21 debug: mda: querying mda fd for session 3dce2ce3ff37cce4 evpid f435f95975dbbb21 debug: smtpd: forking mda for session 3dce2ce3ff37cce4: "/usr/local/libexec/dovecot/dovecot-lda -f [email protected] -d mac" as vmail debug: mda: got mda fd 6 for session 3dce2ce3ff37cce4 evpid f435f95975dbbb21 debug: mda: end-of-file for session 3dce2ce3ff37cce4 evpid f435f95975dbbb21 debug: mda: all data sent for session 3dce2ce3ff37cce4 evpid f435f95975dbbb21 debug: smtpd: mda process done for session 3dce2ce3ff37cce4: exited abnormally delivery: TempFail for f435f95975dbbb21: from=<[email protected]>, to=<[email protected]>, user=vmail, method=mda, delay=0s, stat=Error (exited abnormally) Looks like a dovecot lda problem to me, wrong permissions or wrong user of dovecot lda/auth process (e.g. everything as vmail user?). What does your dovecot log say? debug: mda: session 3dce2ce3ff37cce4 done debug: mda: user "vmail" becomes runnable debug: mda: all done for user "<getpwnam>:vmail" smtp: 0x11f86686d000: <<< QUIT smtp: 0x11f86686d000: >>> 221 2.0.0: Bye smtp: 0x11f86686d000: STATE_HELO -> STATE_QUIT smtp-in: Closing session 3dce2ce17de9532c debug: smtp: 0x11f86686d000: deleting session: done debug: pony: rsae_finish debug: pony: rsae_finish debug: pony: rsae_finish ^Cinfo: ca agent exiting info: pony agent exiting info: scheduler handler exiting info: lookup agent exiting info: control process exiting info: queue handler exiting warn: parent terminating Any idea whats wrong here? sent mail to mac@ it resolved to gonzalo (vmail), it found the user, executed the mda but the mda didn't exit with success, so the mail remains in queue. Can´t figure out why... Thanks! -- Enviado desde mi tostadora de mano... -- Enviado desde mi tostadora de mano... -- Enviado desde mi tostadora de mano... -- Enviado desde mi tostadora de mano...
