# Guide for postfix + virtual boxes + dovecot + thunderbird ?



## weberjn (Dec 3, 2022)

Hi,

anybody got a working guide for setting up postfix with virtual aliases and mailboxes and dovecot, that works with Thunderbird and imap?
for FreeBSD 13.1

I followed this one but cannot get the transfer from postfix to dovecot to work.


----------



## biggsy (Dec 3, 2022)

Maybe not everything you need but have a look at this:  https://obsigna.com/articles/1539726598.html


----------



## weberjn (Dec 4, 2022)

OK, got it working now, that Thunderbird receives mail.
with 


			Postfix Virtual Domain Hosting Howto
		


First problem was, I was confused by virtual_alias_maps (map incoming email addresses -> outgoing) and virtual_mailbox_maps (list which outgoing email adresses should go to virtual_transport = dovecot).

Second, there was in the postfix log
status=deferred (temporary failure. Command output: Can't open log file /var/log/dovecot.log: Permission denied )

This actually comes from /usr/local/libexec/dovecot/deliver  which cannot write into root owned dovecot.log.

This can be solved by own log files for deliver:
protocol lda {

  # remember to give proper permissions for these files as well
  log_path = /var/log/dovecot-lda-errors.log
  info_log_path = /var/log/dovecot-lda.log
}

Lastly there was this strange error
Error: client doesn't have lookup permissions for this user: userdb reply doesn't contain uid (to bypass this check, set: service auth { unix_listener /var/run/dovecot/auth-userdb { mode=0777 } })

which could be fixed by

 unix_listener auth-userdb {
    group = vpostfix
    mode = 0660
  }

Dovecot makes you jump through so many hoops that I fear each workaround might open another security hole.


----------

