Well I update my conf with some tweaks and home some problems: Dovecot Conf:
# 2.2.10: /etc/dovecot/dovecot.conf # OS: OpenBSD 5.6 amd64 debug_log_path = /var/log/dovecot-debug.log default_internal_user = vmail first_valid_uid = 1000 imap_client_workarounds = delay-newmail tb-extra-mailbox-sep tb-lsub-flags log_path = /var/log/dovecot 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 ihave mbox_write_locks = fcntl mmap_disable = yes namespace { inbox = yes location = maildir:/var/www/datos/correos/%n:LAYOUT=fs 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/datos/correos/%n/%n.sieve sieve_global_dir = /var/sieve sieve_global_path = /var/sieve/global-default.sieve } protocols = imap sieve service auth { unix_listener auth-userdb { group = vmail mode = 0777 user = vmail } } service managesieve-login { inet_listener sieve { port = 4190 } inet_listener sieve_deprecated { port = 2000 } } ssl_cert = </etc/ssl/dovecotcert.pem ssl_key = </etc/ssl/private/dovecot.pem userdb { args = uid=vmail gid=vmail home=/etc/dovecot driver = static } protocol lda { info_log_path = /var/log/dovecot-deliver.log log_path = /var/log/dovecot-deliver-errors.log mail_plugins = " sieve" postmaster_address = gonz...@foobar.com } OpenSMTPD: able dominios file:/etc/mail/dominios table aliases db:/etc/mail/aliases.db expire 4h pki foobar.com certificate "/etc/ssl/foobar.com/foobar.crt" pki mx.foobar.com certificate "/etc/ssl/foobar.com/foobar.crt" pki foobar.com key "/etc/ssl/foobar.com/foobar.key" pki mx.foobar.com key "/etc/ssl/foobar.com/foobar.key" pki foobar.com dhparams "/etc/ssl/foobar.com/dhparam.pem" pki mx.foobar.com dhparams "/etc/ssl/foobar.com/dhparam.pem" listen on lo0 port 25 listen on egress secure pki foobar.com hostname foobar.com listen on egress port 2525 tls-require pki foobar.com auth hostname foobar.com accept for local alias <aliases> deliver to mda "/usr/local/libexec/dovecot/dovecot-lda -f %{sender}" accept from any for domain <dominios> alias <aliases> deliver to mda "/usr/local/libexec/dovecot/dovecot-lda -f %{sender}" accept from any for domain <dominios> deliver to mda "/usr/local/libexec/dovecot/dovecot-lda -f %{sender}" accept for any relay via smtp://127.0.0.1:10028 So, the problems are: Get mails OK Stored OK, the maildir is in /var/www/datos/correos/ I login by dovecot with the password/username stored in userdb BUT I send emails with smtpd and used my system user password, there is any way to use dovecot password for smtpd? And I have perms problems like this: Jan 13 00:54:28 imap(gonzalo): Error: Index is read-only, can't write-lock /var/www/datos/correos/gonzalo/OpenBSD/ports/dovecot.index.log Jan 13 00:54:31 imap(gonzalo): Error: file_dotlock_create(/var/www/datos/correos/gonzalo/OpenBSD/src-changes/dovecot-uidlist) failed: Permission denied (euid=5001(vmail) egid=5001(vmail) missing +w perm: /var/www/datos/correos/gonzalo/OpenBSD/src-changes, dir owned by 1000:5001 mode=0755) Jan 13 00:54:32 imap(gonzalo): Error: Index is read-only, can't write-lock /var/www/datos/correos/gonzalo/OpenBSD/src-changes/dovecot.index.log The maildir home of my users is 1000:5001 and dovecot use 5001:5001 (vmail), my intention is virtual users/domain. Any way to fix all this? Thanks. Cheers.- 2015-01-12 6:34 GMT-03:00 Gonzalo Rodriguez <gonz...@sepp0.com.ar>: > I have spamd on port 25 so I use 2525 to send emails from my client, I > have a rule on of to rdr to 127.0.0.1:25 so I can send email without > problema. > > > 2015-01-12 6:12 GMT-03:00, Gilles Chehade <gil...@poolp.org>: > > On Sun, Jan 11, 2015 at 12:40:26AM -0300, Gonzalo Rodriguez wrote: > >> I just swtich from Postfix + Dovecot to OpenSMTPd + Dovecot > >> > >> And here is my conf: > >> > >> table domain file:/etc/mail/domain > >> table aliases db:/etc/mail/aliases.db > >> > >> expire 4h > >> > >> pki foobar.com certificate "/etc/ssl/foobar.com/foobar.crt > " > >> pki foobar.com key "/etc/ssl/foobar.com/foobar.key > " > >> pki foobar.com dhparams "/etc/ssl/ > foobar.com/dhparam.pem" > >> > >> listen on lo0 port 25 > >> listen on egress port 25 tls pki foobar.com auth-optional > >> listen on egress port 2525 tls-require pki foobar.com auth > >> listen on lo0 port 10027 tag Signed > >> > >> accept for local alias <aliases> deliver to mda > >> "/usr/local/libexec/dovecot/dovecot-lda -f %{sender} " > >> accept from any for domain <domain> alias <aliases> deliver to mda > >> "/usr/local/libexec/dovecot/dovecot-lda -f %{sender} " > >> accept from any for domain <domain> deliver to mda > >> "/usr/local/libexec/dovecot/dovecot-lda -f %{sender} " > >> accept from local for any relay > >> accept for any relay > >> > > > > the last two rules are identical since not providing a "from" part for a > > rule really means "from local" > > > > I don't really understand the need for port 2525, nor do I see the rule > > which causes your mail to be sent to a "signer". > > > > Here's a sample from my own config: > > > > listen on lo0 > > listen on lo0 port 10028 tag DKIM > > listen on egress secure pki mx1.poolp.org hostname mx1.poolp.org > > listen on egress port submission tls pki mail.poolp.org auth hostname > > mail.poolp.org > > > > [...] > > > > accept for local alias <aliases> deliver to maildir > > accept from any for domain <pdomains> alias <aliases> deliver to maildir > > > > accept tagged DKIM for any relay source <sources> hostnames <helonames> > > accept for any relay via smtp://127.0.0.1:10027 # dkim-proxy > > > > > > -- > > Gilles Chehade > > > > https://www.poolp.org @poolpOrg > > >