Hello,
I used this "How to" to set up a mail server with Postfix and Dovecot: http://forums.freebsd.org/showthread.php?t=10728 (using a PostgreSQL database to store users).
I'm able to send mails but when trying to send mail to myself (using SMTP via OpenSSL on localhost:25) I face a Dovecot error:
In dovecot.conf:
In dovecot-sql.conf:
I queried
in the mail database, which returns the expected row, but I suspect Dovecot uses [email='test@domain.com]'test@domain.com[/email]' as '%n'. I'm not sure about that and I don't know how to change it.
Some help would be really appreciated,
Thanks.
I used this "How to" to set up a mail server with Postfix and Dovecot: http://forums.freebsd.org/showthread.php?t=10728 (using a PostgreSQL database to store users).
I'm able to send mails but when trying to send mail to myself (using SMTP via OpenSSL on localhost:25) I face a Dovecot error:
Code:
Aug 28 13:17:39 <mail.info> mailJail dovecot: auth(default): new auth connection: pid=23743
Aug 28 13:18:30 <mail.info> mailJail dovecot: auth(default): new auth connection: pid=23753
Aug 28 13:18:30 <mail.info> mailJail dovecot: deliver(test@domain.com): Loading modules from directory: /usr/local/lib/dovecot/lda
Aug 28 13:18:30 <mail.info> mailJail dovecot: deliver(test@domain.com): Module loaded: /usr/local/lib/dovecot/lda/lib10_quota_plugin.so
[B]Aug 28 13:18:30 <mail.info> mailJail dovecot: auth(default): master in: USER 1 test@domain.com service=deliver
Aug 28 13:18:30 <mail.info> mailJail dovecot: auth(default): prefetch(test@domain.com): passdb didn't return userdb entries, trying the next userdb
Aug 28 13:18:30 <mail.info> mailJail dovecot: auth-worker(default): passwd(test@domain.com): lookup
Aug 28 13:18:30 <mail.info> mailJail dovecot: auth-worker(default): passwd(test@domain.com): unknown user[/B]
Aug 28 13:18:30 <mail.info> mailJail dovecot: auth(default): master out: NOTFOUND 1
Aug 28 13:18:30 <mail.info> mailJail postfix/pipe[23756]: DC9FD408: to=<test@domain.com>, relay=dovecot, delay=0.07, delays=0.03/0.03/0/0.02, dsn=5.1.1, status=bounced (user unknown)
In dovecot.conf:
Code:
protocols = imaps
disable_plaintext_auth = no
ssl = yes
ssl_cert_file = /etc/ssl/dovecot/cert.pem
ssl_key_file = /etc/ssl/dovecot/key.pem
mail_privileged_group = mail
dotlock_use_excl = yes
mail_location = maildir:/mail/%d/%n
verbose_proctitle = yes
# mailnull user id is 26
first_valid_uid = 26
last_valid_uid = 26
mail_uid = mailnull
# mail goup id is 6
first_valid_gid = 6
last_valid_gid = 6
mail_gid = mail
maildir_copy_with_hardlinks = yes
protocol imap {
imap_client_workarounds = delay-newmail netscape-eoh tb-extra-mailbox-sep
mail_plugins = quota imap_quota
}
protocol managesieve {}
protocol lda {
postmaster_address = postmaster@domain.com
sendmail_path = /usr/sbin/sendmail
mail_plugins = quota
}
auth_username_format = %Lu
auth default {
mechanisms = plain
passdb sql {
args = /usr/local/etc/dovecot-sql.conf
}
userdb prefetch {}
user = root
socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0600
user = mailnull
group = mail
}
client {
path = /var/run/dovecot/auth-client
mode = 0660
user = postfix
group = mail
}
}
}
dict {}
plugin {
quota = maildir:User quota
quota_rule = *:storage=1GB
}
In dovecot-sql.conf:
Code:
driver = pgsql
connect = host=localhost dbname=mail user=dovecot password=xxxxxxxxxxxx
default_pass_scheme = PLAIN-MD5
password_query = \
SELECT username, domain, password, '*:bytes=' || quota || 'M' AS userdb_quota_rule \
FROM mailbox WHERE username = '%n' AND domain = '%d' AND active = true
I queried
Code:
SELECT username, domain, password, '*:bytes=' || quota || 'M' AS userdb_quota_rule \
FROM mailbox WHERE username = 'test' AND domain = 'domain.com' AND active = true
Some help would be really appreciated,
Thanks.