{"id":2115,"date":"2022-08-30T15:22:10","date_gmt":"2022-08-30T15:22:10","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/01\/02\/how-to-make-simple-system-user-authentication-work-with-postfix-dovecot-on-12-10-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:22:10","modified_gmt":"2022-08-30T15:22:10","slug":"how-to-make-simple-system-user-authentication-work-with-postfix-dovecot-on-12-10-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/how-to-make-simple-system-user-authentication-work-with-postfix-dovecot-on-12-10-collection-of-common-programming-errors\/","title":{"rendered":"How to make simple system user authentication work with postfix\/dovecot on 12.10?-Collection of common programming errors"},"content":{"rendered":"<p>I have been wrestling on this a LOT. I never properly understood but I presume that authentication by the system users is done with PAM and the default authentication method for both Dovecot and Postfix on Ubuntu.<\/p>\n<p>I have tried with and without SSL but when I run Thunderbird on the same host, it figures out the configuration details but says the username or password is wrong.<\/p>\n<p>dovecot.conf:<\/p>\n<pre><code>ssl = yes\n\nssl_cert_file = \/etc\/dovecot\/server.crt\nssl_key_file = \/home\/andres\/server.key\nmail_location=mbox:~\/mail:INBOX:\/var\/mail\/%u\n#userdb passwd {\n# args = blocking=yes\n#}\n#passwd pam {\n# args = dovecot\n#}\n<\/code><\/pre>\n<p>I read that I the commented out sections were required, however they cause Dovecot to crash on start.<\/p>\n<p>host name: andres.pa10b<\/p>\n<p>mailserver address: mail.andres.pa10b (internal domain)<\/p>\n<p>main.cf (postfix):<\/p>\n<pre><code>myhostname = mail.andres.pa10b\nalias_maps = hash:\/etc\/aliases\nalias_database = hash:\/etc\/aliases\nmydomain = andres.pa10b\nmyorigin = $mydomain\nmydestination = mail.andres.pa10b, andres-VirtualBox, localhost.localdomain, localhost, $mydomain\nrelayhost = \nmynetworks = 127.0.0.0\/8, 192.168.10.0\/24\nmailbox_size_limit = 1024000\nrecipient_delimiter = @\ninet_interfaces = all\ninet_protocols = all\nlocal_recipient_maps = unix:passwd.byname $alias_maps\nsmtpd_sasl_type = dovecot\nsmtpd_sasl_path = private\/auth\nsmtpd_sasl_auth_enable = yes\nsmtpd_sasl_security_options = noanonymous\nsmtpd_sasl_local_domain = $myhostname\nsmtpd_client_restrictions = permit_mynetworks,reject_unknown_client,permit\nsmtpd_recipient_restrictions = permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,reject \nsmtpd_use_tls = yes\nsmtpd_tls_cert_file = \/etc\/postfix\/server.crt\nsmtpd_tls_key_file = \/home\/andres\/server.key\nsmtpd_tls_session_cache_database = btree:${data_directory}\/smtpd_scache \n<\/code><\/pre>\n<p>I could not find anything useful in logs. Maybe I wasn&#8217;t paying attention. How should I continue my investigation? Thanks!!<\/p>\n<p id=\"rop\"><small>Originally posted 2014-01-02 12:06:22. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I have been wrestling on this a LOT. I never properly understood but I presume that authentication by the system users is done with PAM and the default authentication method for both Dovecot and Postfix on Ubuntu. I have tried with and without SSL but when I run Thunderbird on the same host, it figures [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2115","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2115"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2115\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}