On 7/5/2023 11:26 PM, jeremy ardley via dovecot wrote:
On 6/7/23 10:17, joe a wrote:
Greetings from a new dovecot user.
Have setup dovecot on openSuse 15.4 with postfix as the MTA. Both are the latest version in that distribution.
Simple virtual user setup using /etc/dovecot/passwd
Dovecot seems to be working and all the defined users are authenticating well enough for imapsync to migrate files to the mailboxes.
However, when attempting to send test mail via postfix, only some users are authenticated and have mail delivered. Using swaks (smtp toolkit) the failures are: 550 5.1.1 some.user@mydomain.com: Recipient address rejected: User unknown in local recipient table
I'm puzzled, probably some simple thing overlooked. To avoid clutter, I won't include postfix items unless asked.
dovecot --version 2.3.20 (80a5ac675d)
dovecot -n
# 2.3.20 (80a5ac675d): /etc/dovecot/dovecot.conf # Pigeonhole version 0.5.20 (149edcf2) # OS: Linux 5.14.21-150400.24.66-default x86_64 # Hostname: flitch auth_verbose = ob-fuskate disable_plaintext_auth = no first_valid_uid = 100 info_log_path = /var/log/dovecot-info.log log_path = /var/log/dovecot.log mail_location = maildir:~/Maildir 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 environment mailbox date index ihave duplicate mime foreverypart extracttext 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 = pam } passdb { args = /etc/dovecot/passwd driver = passwd-file } plugin { sieve = file:~/sieve;active=~/.dovecot.sieve } protocols = imap lmtp service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } } service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0600 user = postfix } } ssl = no ssl_cipher_list = ALL:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK:!RC4:!ADH:!LOW@STRENGTH ssl_options = no_compression ssl_prefer_server_ciphers = yes userdb { driver = passwd } userdb { args = uid=vmail gid=vmail home=/home/vmail/%u driver = static }
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
The issue you're experiencing might be due to the fact that you have two passdb and userdb blocks in your configuration. Dovecot will use the first passdb and userdb that successfully authenticate a user, and ignore the rest.
In your configuration, the first passdb block uses PAM for authentication, and the first userdb block uses the system's passwd file. The second passdb and userdb blocks, which use a Dovecot-specific passwd file and static userdb, will only be used if PAM authentication fails.
If some of your users are defined in the Dovecot passwd file and not in the system's passwd file, they will not be able to authenticate because Dovecot will stop at the first passdb and userdb blocks.
To fix this, you could merge your passdb and userdb blocks into single blocks that use both PAM and passwd-file/static methods. Here's an example:
passdb { driver = pam } passdb { args = /etc/dovecot/passwd driver = passwd-file } userdb { driver = passwd } userdb { args = uid=vmail gid=vmail home=/home/vmail/%u driver = static }
Thanks for the reply.
Allow me to clarify. Dovecot itself seems to have no problem authenticating any user, as tested logging in via Thunderbird, which appears to have created the users mail directories. and using imapsync to transfer email from the "legacy" system.
The problem is that postfix does not recognize some of those users and rejects delivery. I should mention postfix and dovecot are on the same VM server.
If your example was meant to show the correct way, I cannot see any difference between that and what my posted config shows other than the sequential (contiguous?) in your example.
I followed the example shown at https://doc.dovecot.org/configuration_manual/howto/simple_virtual_install/
The PAM authentication I added at one point due to "error" statements when doing "systemctl restart dovecot.service" which mentioned PAM, yet dovecot appeared to function normally. The problem existed prior to that.
Thanks again for your comments.