# postfix dovecot mysql configuration issues

## eddeford

I'm having trouble configuring my virtual mail server using postfix, dovecot, and mysql.  I can send mail and connect from gmail to the server but it won't fetch any mail.

this is the error I get when I try to fetch mail.

```

Jun  6 06:04:27 dwserver postfix/qmgr[15537]: C5A1821E276: from=<eddeford@gmail.com>, size=4090, nrcpt=1 (queue active)

Jun  6 06:04:27 dwserver postfix/virtual[15819]: warning: recipient webmaster@daleyandwanzerstorage.com: not found in virtual_uid_maps

Jun  6 06:04:27 dwserver postfix/virtual[15819]: C5A1821E276: to=<webmaster@daleyandwanzerstorage.com>, relay=virtual, delay=4696, delays=4695/0.01/0/0.1, dsn=4.3.5, status=deferred (mail system configuration error)

```

this is the output from postconf -n.

```

alias_database = hash:/etc/mail/aliases

alias_maps = hash:/etc/mail/aliases

command_directory = /usr/sbin

config_directory = /etc/postfix

daemon_directory = /usr/libexec/postfix

data_directory = /var/lib/postfix

debug_peer_level = 2

debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5

home_mailbox = .maildir/

html_directory = no

inet_protocols = ipv4

mail_owner = postfix

mailq_path = /usr/bin/mailq

manpage_directory = /usr/share/man

mydomain = daleyandwanzerstorage.com

myhostname = mail.daleyandwanzerstorage.com

mynetworks_style = host

newaliases_path = /usr/bin/newaliases

queue_directory = /var/spool/postfix

readme_directory = no

recipient_delimiter = +

sample_directory = /etc/postfix

sendmail_path = /usr/sbin/sendmail

setgid_group = postdrop

smtpd_sasl_path = private/auth

smtpd_sasl_type = dovecot

soft_bounce = yes

unknown_local_recipient_reject_code = 550

virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf

virtual_mailbox_base = /var/spool/mail

virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domain_maps.cf

virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf

postconf: warning: /etc/postfix/main.cf: unused parameter: smtpd_sasl_auth_enabled=yes

```

This is the output from doveconf -n.

```

# 2.2.9: /etc/dovecot/dovecot.conf

# OS: Linux 3.10.32-gentoo i686 Gentoo Base System release 2.2

auth_verbose = yes

disable_plaintext_auth = no

first_valid_gid = 12

first_valid_uid = 8

last_valid_gid = 5000

last_valid_uid = 5000

log_path = /var/log/dovecot.log

mail_debug = yes

mail_location = maildir:~/Maildir

mail_privileged_group = mail

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 {

  args = /etc/dovecot/dovecot-sql.conf.ext

  driver = sql

}

protocols = imap pop3

ssl_cert = </etc/ssl/dovecot/server.pem

ssl_key = </etc/ssl/dovecot/server.key

userdb {

  args = /etc/dovecot/dovecot-sql.conf.ext

  driver = sql

}

protocol lda {

  mail_plugins = quota

}

protocol imap {

  mail_plugins = quota imap_quota

}

protocol pop3 {

  mail_plugins = quota

}

```

I've been tinkering with this for so long I don't know what to do next. any help would be appreciated.

----------

## peje

Hi Postfix cant deliver because of:

```
recipient webmaster@daleyandwanzerstorage.com: not found in virtual_uid_maps
```

cu Peje

----------

## eddeford

postconf: warning: /etc/postfix/main.cf: unused parameter: smtpd_sasl_auth_enabled=yes

I added these three lines to main.cf and then changed permissions on /var/spool/mail.  Now mail sent to this address goes into that file and I can see it there.

```

virtual_minimum_uid = 100

virtual_uid_maps = static:5000

virtual_gid_maps = static:5000

```

I still can't fetch however.  any thoughts?

my postconf -n now looks like this

```

alias_database = hash:/etc/mail/aliases

alias_maps = hash:/etc/mail/aliases

command_directory = /usr/sbin

config_directory = /etc/postfix

daemon_directory = /usr/libexec/postfix

data_directory = /var/lib/postfix

debug_peer_level = 2

debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5

home_mailbox = .maildir/

html_directory = no

inet_protocols = ipv4

mail_owner = postfix

mailq_path = /usr/bin/mailq

manpage_directory = /usr/share/man

mydomain = daleyandwanzerstorage.com

myhostname = mail.daleyandwanzerstorage.com

mynetworks_style = host

newaliases_path = /usr/bin/newaliases

queue_directory = /var/spool/postfix

readme_directory = no

recipient_delimiter = +

sample_directory = /etc/postfix

sendmail_path = /usr/sbin/sendmail

setgid_group = postdrop

smtpd_sasl_path = private/auth

smtpd_sasl_type = dovecot

soft_bounce = yes

unknown_local_recipient_reject_code = 550

virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf

virtual_gid_maps = static:5000

virtual_mailbox_base = /var/spool/mail

virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domain_maps.cf

virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf

virtual_minimum_uid = 100

virtual_uid_maps = static:5000

postconf: warning: /etc/postfix/main.cf: unused parameter: smtpd_sasl_auth_enabled=yes

```

I'm not sure what to do with this warning.

Any help would be appreciated.

This is from my dovecot.log...

It looks strange to me, like its looking for the mail in the wrong place maybe?

```

Jun 07 05:25:35 pop3-login: Info: Login: user=<webmaster@daleyandwanzerstorage.com>, method=PLAIN, rip=74.125.82.23, lip=10.0.0.2, mpid=19216, session=<zdtyjzv7cABKfVIX>

Jun 07 05:25:35 pop3: Debug: Loading modules from directory: /usr/lib/dovecot

Jun 07 05:25:35 pop3: Debug: Module loaded: /usr/lib/dovecot/lib10_quota_plugin.so

Jun 07 05:25:35 pop3: Debug: Added userdb setting: plugin/quota=maildir:storage=0

Jun 07 05:25:35 pop3(webmaster@daleyandwanzerstorage.com): Debug: Effective uid=5000, gid=5000, home=/var/vmail/daleyandwanzerstorage.com/webmaster/

Jun 07 05:25:35 pop3(webmaster@daleyandwanzerstorage.com): Debug: Quota root: name=storage=0 backend=maildir args=

Jun 07 05:25:35 pop3(webmaster@daleyandwanzerstorage.com): Debug: Quota grace: root=storage=0 bytes=0 (10%)

Jun 07 05:25:35 pop3(webmaster@daleyandwanzerstorage.com): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:~/Maildir

Jun 07 05:25:35 pop3(webmaster@daleyandwanzerstorage.com): Debug: maildir++: root=/var/vmail/daleyandwanzerstorage.com/webmaster//Maildir, index=, indexpvt=, control=, inbox=/var/vmail/daleyandwanzerstorage.com/webmaster//Maildir, alt=

Jun 07 05:25:35 pop3(webmaster@daleyandwanzerstorage.com): Info: Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0

```

" inbox=/var/vmail/daleyandwanzerstorage.com/webmaster//Maildir"  Dose that look right? I don't thinks?  What should I do next?

----------

## eddeford

I found a misspelling in my main.cf file and now smtp appears to be working but I still can't fetch.

This is my new postconf -n

```

alias_database = hash:/etc/mail/aliases

alias_maps = hash:/etc/mail/aliases

command_directory = /usr/sbin

config_directory = /etc/postfix

daemon_directory = /usr/libexec/postfix

data_directory = /var/lib/postfix

debug_peer_level = 2

debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5

home_mailbox = .maildir/

html_directory = no

inet_protocols = ipv4

mail_owner = postfix

mailq_path = /usr/bin/mailq

manpage_directory = /usr/share/man

mydomain = daleyandwanzerstorage.com

myhostname = mail.daleyandwanzerstorage.com

mynetworks_style = host

newaliases_path = /usr/bin/newaliases

queue_directory = /var/spool/postfix

readme_directory = no

recipient_delimiter = +

sample_directory = /etc/postfix

sendmail_path = /usr/sbin/sendmail

setgid_group = postdrop

smtpd_sasl_auth_enable = yes

smtpd_sasl_path = private/auth

smtpd_sasl_type = dovecot

soft_bounce = yes

unknown_local_recipient_reject_code = 550

virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf

virtual_gid_maps = static:5000

virtual_mailbox_base = /var/spool/mail

virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domain_maps.cf

virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf

virtual_minimum_uid = 100

virtual_uid_maps = static:5000

```

my doveconf -n looks like this

```

# 2.2.9: /etc/dovecot/dovecot.conf

# OS: Linux 3.10.32-gentoo i686 Gentoo Base System release 2.2

auth_verbose = yes

disable_plaintext_auth = no

first_valid_gid = 12

first_valid_uid = 8

last_valid_gid = 5000

last_valid_uid = 5000

log_path = /var/log/dovecot.log

mail_debug = yes

mail_location = maildir: /var/spool/mail/%d/%n

mail_privileged_group = mail

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 {

  args = /etc/dovecot/dovecot-sql.conf.ext

  driver = sql

}

protocols = imap pop3

service auth {

  unix_listener /var/spool/postfix/private/auth {

    mode = 0666

  }

  unix_listener auth-userdb {

    group = postfix

    mode = 0666

    user = postfix

  }

}

ssl_cert = </etc/ssl/dovecot/server.pem

ssl_key = </etc/ssl/dovecot/server.key

userdb {

  args = /etc/dovecot/dovecot-sql.conf.ext

  driver = sql

}

protocol lda {

  mail_plugins = quota

}

protocol imap {

  mail_plugins = quota imap_quota

}

protocol pop3 {

  mail_plugins = quota

}

```

I have verified that messages sent go into /var/spool/mail/daleyandwanzerstorage.com/webmaster/Maildir/new and I can see them is there.  dovecot won't retrieve them for some reason.  Why?

This is from dovecot.log

```

Jun 08 06:30:48 pop3-login: Info: Login: user=<webmaster@daleyandwanzerstorage.com>, method=PLAIN, rip=74.125.82.21, lip=10.0.0.2, mpid=22124, session=<O/mDllD7kgBKfVIV>

Jun 08 06:30:48 pop3: Debug: Loading modules from directory: /usr/lib/dovecot

Jun 08 06:30:48 pop3: Debug: Module loaded: /usr/lib/dovecot/lib10_quota_plugin.so

Jun 08 06:30:48 pop3: Debug: Added userdb setting: plugin/quota=maildir:storage=0

Jun 08 06:30:48 pop3(webmaster@daleyandwanzerstorage.com): Debug: Effective uid=5000, gid=5000, home=/var/vmail/daleyandwanzerstorage.com/webmaster/

Jun 08 06:30:48 pop3(webmaster@daleyandwanzerstorage.com): Debug: Quota root: name=storage=0 backend=maildir args=

Jun 08 06:30:48 pop3(webmaster@daleyandwanzerstorage.com): Debug: Quota grace: root=storage=0 bytes=0 (10%)

Jun 08 06:30:48 pop3(webmaster@daleyandwanzerstorage.com): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir: /var/spool/mail/daleyandwanzerstorage.com/webmaster

Jun 08 06:30:48 pop3(webmaster@daleyandwanzerstorage.com): Debug: maildir++: root= /var/spool/mail/daleyandwanzerstorage.com/webmaster, index=, indexpvt=, control=, inbox= /var/spool/mail/daleyandwanzerstorage.com/webmaster, alt=

Jun 08 06:30:48 pop3(webmaster@daleyandwanzerstorage.com): Info: Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0

```

There are no error messages anymore it just won't fetch.

----------

## freke

I'd try adding

```
virtual_transport=dovecot
```

to postfix/main.cf

and if you don't have it

```
dovecot   unix  -       n       n       -       -       pipe

    flags=DRhu user=mail:mail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${domain}
```

to postfix/master.cf

That should tell Postfix to let Dovecot deliver the message to the mailbox - and that way Dovecot should now it's there ready for retrieval I think  :Smile: 

Anyway that's how my system seems to work.

----------

## eddeford

I added the line you suggested in main.cf it had no effect.

```

   dovecot_destination_recipient_limit=1 

   virtual_transport =dovecot

```

This is what i Have in master.cf.

```

dovecot   unix  -       n       n       -        -       pipe

   flags=DRhu user=mail:mail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient}

   dovecot_destination_recipient_limit=1

   virtual_transport =dovecot

```

Should I delete the lines, 'dovecot_destination_recipient_limit=1'&' virtual_transport =dovecot' from this file?  Will that help?

This is an excerpt from dovecot.log showing a fetch attempt.  I'm not sure why it's failing.

```

Jun 10 06:51:44 auth: Debug: Loading modules from directory: /usr/lib/dovecot/auth

Jun 10 06:51:44 auth: Debug: Read auth token secret from /var/run/dovecot/auth-token-secret.dat

Jun 10 06:51:44 auth: Debug: auth client connected (pid=30404)

Jun 10 06:51:44 auth: Debug: client in: AUTH    1       PLAIN   service=pop3    session=C78ZHXn7QwDRVdSQ        lip=10.0.0.2    rip=209.85.212.144    lport=110       rport=50499     resp=<hidden>

Jun 10 06:51:44 auth-worker(30406): Debug: Loading modules from directory: /usr/lib/dovecot/auth

Jun 10 06:51:44 auth-worker(30406): Debug: sql(webmaster@daleyandwanzerstorage.com,209.85.212.144): query: SELECT CONCAT('var/spool/mail/', maildir) AS userdb_home, 5000 AS userdb_uid, 5000 AS userdb_gid, username AS user, password, CONCAT('maildir:storage=', quota) AS quota FROM mailbox WHERE username= 'webmaster@daleyandwanzerstorage.com' AND active = 1

Jun 10 06:51:44 auth: Debug: client passdb out: OK      1       user=webmaster@daleyandwanzerstorage.com        quota=maildir:storage=0

Jun 10 06:51:44 auth: Debug: master in: REQUEST 2568093697      30404   1       9dc46cba3c762aee20a4250543fe8c18        session_pid=30408

Jun 10 06:51:44 auth-worker(30406): Debug: sql(webmaster@daleyandwanzerstorage.com,209.85.212.144): SELECT CONCAT('/var/spool/mail/', maildir) AS home, 5000 AS uid, 5000 AS gid, CONCAT('maildir:storage=', quota) AS quota FROM mailbox WHERE username = 'webmaster@daleyandwanzerstorage.com' AND active = 1

Jun 10 06:51:44 auth: Debug: master userdb out: USER    2568093697      webmaster@daleyandwanzerstorage.com     home=/var/spool/mail/daleyandwanzerstorage.com/webmaster/     uid=5000        gid=5000        quota=maildir:storage=0

Jun 10 06:51:44 pop3-login: Info: Login: user=<webmaster@daleyandwanzerstorage.com>, method=PLAIN, rip=209.85.212.144, lip=10.0.0.2, mpid=30408, session=<C78ZHXn7QwDRVdSQ>

Jun 10 06:51:44 pop3: Debug: Loading modules from directory: /usr/lib/dovecot

Jun 10 06:51:44 pop3: Debug: Module loaded: /usr/lib/dovecot/lib10_quota_plugin.so

Jun 10 06:51:44 pop3: Debug: Added userdb setting: plugin/quota=maildir:storage=0

Jun 10 06:51:44 pop3(webmaster@daleyandwanzerstorage.com): Debug: Effective uid=5000, gid=5000, home=/var/spool/mail/daleyandwanzerstorage.com/webmaster/

Jun 10 06:51:44 pop3(webmaster@daleyandwanzerstorage.com): Debug: Quota root: name=storage=0 backend=maildir args=

Jun 10 06:51:44 pop3(webmaster@daleyandwanzerstorage.com): Debug: Quota grace: root=storage=0 bytes=0 (10%)

Jun 10 06:51:44 pop3(webmaster@daleyandwanzerstorage.com): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir: /var/spool/mail/daleyandwanzerstorage.com/webmaster

Jun 10 06:51:44 pop3(webmaster@daleyandwanzerstorage.com): Debug: maildir++: root= /var/spool/mail/daleyandwanzerstorage.com/webmaster, index=, indexpvt=, control=, inbox= /var/spool/mail/daleyandwanzerstorage.com/webmaster, alt=

Jun 10 06:51:45 pop3(webmaster@daleyandwanzerstorage.com): Info: Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0

```

----------

## freke

Not really sure tbh...  :Sad: 

I'm using mdbox format and not maildir.

my doveconf -n

```
# 2.2.13: /etc/dovecot/dovecot.conf

# OS: Linux 3.12.20-gentoo i686 Gentoo Base System release 2.2 ext3

auth_debug = yes

auth_failure_delay = 10 secs

auth_mechanisms = plain login cram-md5

auth_verbose = yes

default_internal_user = root

first_valid_uid = 8

last_valid_uid = 8

mail_debug = yes

mail_location = mdbox:/var/mail/%d/%n/dbox

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 duplicate

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 {

  args = /etc/dovecot/dovecot-sql.conf.ext

  driver = sql

}

plugin {

  quota = dirsize:User quota

  quota_rule = *:storage=1G

  quota_warning = storage=95%% quota-warning 95 %u

  quota_warning2 = storage=80%% quota-warning 80 %u

  sieve = ~/.dovecot.sieve

  sieve_dir = ~/sieve

}

postmaster_address = admin@vlh.dk

protocols = imap pop3 lmtp sieve

service auth {

  unix_listener /var/spool/postfix/private/auth {

    group = postfix

    mode = 0666

    user = postfix

  }

  unix_listener auth-master {

    mode = 0600

    user = root

  }

  unix_listener auth-userdb {

    mode = 0600

    user = mail

  }

  user = $default_internal_user

}

service quota-warning {

  executable = script /usr/local/bin/quota-warning.sh

  unix_listener quota-warning {

    user = root

  }

  user = dovecot

}

ssl_cert = </etc/ssl/dovecot/bundle.crt

ssl_key = </etc/ssl/dovecot/server.key

userdb {

  args = /etc/dovecot/dovecot-sql.conf.ext

  driver = sql

}

protocol lda {

  mail_plugins = quota

}

protocol sieve {

  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

}
```

postconf -n

```
broken_sasl_auth_clients = yes

command_directory = /usr/sbin

config_directory = /etc/postfix

content_filter = smtp-maia:mail.vlh.dk:10024

daemon_directory = /usr/libexec/postfix

data_directory = /var/lib/postfix

debug_peer_level = 2

debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5

disable_vrfy_command = yes

dovecot_destination_recipient_limit = 1

home_mailbox = .maildir/

html_directory = no

inet_protocols = all

mail_owner = postfix

mailq_path = /usr/bin/mailq

manpage_directory = /usr/share/man

message_size_limit = 41943040

mydomain = vlh.dk

myhostname = mail.vlh.dk

mynetworks_style = host

newaliases_path = /usr/bin/newaliases

policyd-spf_time_limit = 3600

queue_directory = /var/spool/postfix

readme_directory = no

receive_override_options = no_address_mappings

recipient_delimiter = +

sample_directory = /etc/postfix

sendmail_path = /usr/sbin/sendmail

setgid_group = postdrop

smtp_tls_CAfile = /etc/ssl/postfix/bundle.crt

smtp_tls_loglevel = 1

smtp_tls_security_level = may

smtpd_banner = $myhostname ESMTP $mail_name NO UCE

smtpd_client_restrictions = sleep 10 check_client_access hash:/etc/postfix/maps/access_client

smtpd_data_restrictions = reject_unauth_pipelining

smtpd_delay_reject = yes

smtpd_helo_required = yes

smtpd_helo_restrictions = warn_if_reject reject_invalid_helo_hostname warn_if_reject reject_non_fqdn_helo_hostname

smtpd_milters = unix:/var/run/opendkim/opendkim.sock unix:/var/run/opendmarc/opendmarc.sock

smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unknown_recipient_domain reject_non_fqdn_recipient warn_if_reject reject_rbl_client ad.dnsbl.vlh.dk warn_if_reject reject_rbl_client ae.dnsbl.vlh.dk warn_if_reject reject_rbl_client af.dnsbl.vlh.dk warn_if_reject reject_rbl_client ag.dnsbl.vlh.dk warn_if_reject reject_rbl_client ai.dnsbl.vlh.dk warn_if_reject reject_rbl_client al.dnsbl.vlh.dk warn_if_reject reject_rbl_client am.dnsbl.vlh.dk reject_rbl_client ao.dnsbl.vlh.dk warn_if_reject reject_rbl_client aq.dnsbl.vlh.dk reject_rbl_client ar.dnsbl.vlh.dk warn_if_reject reject_rbl_client as.dnsbl.vlh.dk warn_if_reject reject_rbl_client at.dnsbl.vlh.dk reject_rbl_client aw.dnsbl.vlh.dk warn_if_reject reject_rbl_client ax.dnsbl.vlh.dk reject_rbl_client az.dnsbl.vlh.dk warn_if_reject reject_rbl_client ba.dnsbl.vlh.dk warn_if_reject reject_rbl_client bb.dnsbl.vlh.dk warn_if_reject reject_rbl_client bd.dnsbl.vlh.dk warn_if_reject reject_rbl_client be.dnsbl.vlh.dk warn_if_reject reject_rbl_client bf.dnsbl.vlh.dk reject_rbl_client bg.dnsbl.vlh.dk warn_if_reject reject_rbl_client bh.dnsbl.vlh.dk warn_if_reject reject_rbl_client bi.dnsbl.vlh.dk warn_if_reject reject_rbl_client bj.dnsbl.vlh.dk warn_if_reject reject_rbl_client bl.dnsbl.vlh.dk warn_if_reject reject_rbl_client bm.dnsbl.vlh.dk warn_if_reject reject_rbl_client bl.dnsbl.vlh.dk warn_if_reject reject_rbl_client bm.dnsbl.vlh.dk warn_if_reject reject_rbl_client bn.dnsbl.vlh.dk reject_rbl_client bo.dnsbl.vlh.dk warn_if_reject reject_rbl_client bq.dnsbl.vlh.dk reject_rbl_client br.dnsbl.vlh.dk warn_if_reject reject_rbl_client bs.dnsbl.vlh.dk warn_if_reject reject_rbl_client bt.dnsbl.vlh.dk warn_if_reject reject_rbl_client bv.dnsbl.vlh.dk warn_if_reject reject_rbl_client bw.dnsbl.vlh.dk reject_rbl_client by.dnsbl.vlh.dk warn_if_reject reject_rbl_client bz.dnsbl.vlh.dk warn_if_reject reject_rbl_client cc.dnsbl.vlh.dk warn_if_reject reject_rbl_client cd.dnsbl.vlh.dk warn_if_reject reject_rbl_client cf.dnsbl.vlh.dk warn_if_reject reject_rbl_client cg.dnsbl.vlh.dk warn_if_reject reject_rbl_client ci.dnsbl.vlh.dk warn_if_reject reject_rbl_client ck.dnsbl.vlh.dk reject_rbl_client cl.dnsbl.vlh.dk warn_if_reject reject_rbl_client cm.dnsbl.vlh.dk warn_if_reject reject_rbl_client cn.dnsbl.vlh.dk reject_rbl_client co.dnsbl.vlh.dk warn_if_reject reject_rbl_client cr.dnsbl.vlh.dk warn_if_reject reject_rbl_client cu.dnsbl.vlh.dk warn_if_reject reject_rbl_client cv.dnsbl.vlh.dk warn_if_reject reject_rbl_client cw.dnsbl.vlh.dk warn_if_reject reject_rbl_client cx.dnsbl.vlh.dk warn_if_reject reject_rbl_client cy.dnsbl.vlh.dk warn_if_reject reject_rbl_client de.dnsbl.vlh.dk warn_if_reject reject_rbl_client dj.dnsbl.vlh.dk warn_if_reject reject_rbl_client dm.dnsbl.vlh.dk reject_rbl_client do.dnsbl.vlh.dk warn_if_reject reject_rbl_client dz.dnsbl.vlh.dk reject_rbl_client ec.dnsbl.vlh.dk warn_if_reject reject_rbl_client ee.dnsbl.vlh.dk warn_if_reject reject_rbl_client eg.dnsbl.vlh.dk warn_if_reject reject_rbl_client eh.dnsbl.vlh.dk warn_if_reject reject_rbl_client er.dnsbl.vlh.dk warn_if_reject reject_rbl_client es.dnsbl.vlh.dk warn_if_reject reject_rbl_client et.dnsbl.vlh.dk warn_if_reject reject_rbl_client fi.dnsbl.vlh.dk warn_if_reject reject_rbl_client fj.dnsbl.vlh.dk warn_if_reject reject_rbl_client fk.dnsbl.vlh.dk warn_if_reject reject_rbl_client fm.dnsbl.vlh.dk warn_if_reject reject_rbl_client fo.dnsbl.vlh.dk warn_if_reject reject_rbl_client fr.dnsbl.vlh.dk warn_if_reject reject_rbl_client ga.dnsbl.vlh.dk warn_if_reject reject_rbl_client gd.dnsbl.vlh.dk reject_rbl_client ge.dnsbl.vlh.dk warn_if_reject reject_rbl_client gf.dnsbl.vlh.dk warn_if_reject reject_rbl_client gg.dnsbl.vlh.dk warn_if_reject reject_rbl_client gh.dnsbl.vlh.dk warn_if_reject reject_rbl_client gi.dnsbl.vlh.dk warn_if_reject reject_rbl_client gl.dnsbl.vlh.dk warn_if_reject reject_rbl_client gm.dnsbl.vlh.dk warn_if_reject reject_rbl_client gn.dnsbl.vlh.dk warn_if_reject reject_rbl_client gq.dnsbl.vlh.dk warn_if_reject reject_rbl_client gr.dnsbl.vlh.dk warn_if_reject reject_rbl_client gs.dnsbl.vlh.dk warn_if_reject reject_rbl_client gt.dnsbl.vlh.dk warn_if_reject reject_rbl_client gu.dnsbl.vlh.dk warn_if_reject reject_rbl_client gw.dnsbl.vlh.dk warn_if_reject reject_rbl_client gy.dnsbl.vlh.dk warn_if_reject reject_rbl_client hk.dnsbl.vlh.dk warn_if_reject reject_rbl_client hm.dnsbl.vlh.dk warn_if_reject reject_rbl_client hn.dnsbl.vlh.dk warn_if_reject reject_rbl_client hr.dnsbl.vlh.dk warn_if_reject reject_rbl_client ht.dnsbl.vlh.dk warn_if_reject reject_rbl_client hu.dnsbl.vlh.dk reject_rbl_client id.dnsbl.vlh.dk warn_if_reject reject_rbl_client ie.dnsbl.vlh.dk warn_if_reject reject_rbl_client il.dnsbl.vlh.dk warn_if_reject reject_rbl_client im.dnsbl.vlh.dk reject_rbl_client in.dnsbl.vlh.dk warn_if_reject reject_rbl_client io.dnsbl.vlh.dk warn_if_reject reject_rbl_client iq.dnsbl.vlh.dk reject_rbl_client ir.dnsbl.vlh.dk warn_if_reject reject_rbl_client is.dnsbl.vlh.dk warn_if_reject reject_rbl_client it.dnsbl.vlh.dk warn_if_reject reject_rbl_client je.dnsbl.vlh.dk warn_if_reject reject_rbl_client jm.dnsbl.vlh.dk warn_if_reject reject_rbl_client jo.dnsbl.vlh.dk warn_if_reject reject_rbl_client ke.dnsbl.vlh.dk warn_if_reject reject_rbl_client kg.dnsbl.vlh.dk reject_rbl_client kh.dnsbl.vlh.dk warn_if_reject reject_rbl_client ki.dnsbl.vlh.dk warn_if_reject reject_rbl_client km.dnsbl.vlh.dk warn_if_reject reject_rbl_client kn.dnsbl.vlh.dk warn_if_reject reject_rbl_client kp.dnsbl.vlh.dk reject_rbl_client kr.dnsbl.vlh.dk warn_if_reject reject_rbl_client kw.dnsbl.vlh.dk warn_if_reject reject_rbl_client ky.dnsbl.vlh.dk reject_rbl_client kz.dnsbl.vlh.dk warn_if_reject reject_rbl_client la.dnsbl.vlh.dk warn_if_reject reject_rbl_client lb.dnsbl.vlh.dk warn_if_reject reject_rbl_client lc.dnsbl.vlh.dk warn_if_reject reject_rbl_client li.dnsbl.vlh.dk warn_if_reject reject_rbl_client lk.dnsbl.vlh.dk warn_if_reject reject_rbl_client lr.dnsbl.vlh.dk warn_if_reject reject_rbl_client ls.dnsbl.vlh.dk reject_rbl_client lt.dnsbl.vlh.dk warn_if_reject reject_rbl_client lu.dnsbl.vlh.dk warn_if_reject reject_rbl_client lv.dnsbl.vlh.dk reject_rbl_client ly.dnsbl.vlh.dk warn_if_reject reject_rbl_client ma.dnsbl.vlh.dk warn_if_reject reject_rbl_client mc.dnsbl.vlh.dk warn_if_reject reject_rbl_client md.dnsbl.vlh.dk warn_if_reject reject_rbl_client me.dnsbl.vlh.dk warn_if_reject reject_rbl_client mf.dnsbl.vlh.dk warn_if_reject reject_rbl_client mg.dnsbl.vlh.dk warn_if_reject reject_rbl_client mh.dnsbl.vlh.dk reject_rbl_client mk.dnsbl.vlh.dk warn_if_reject reject_rbl_client ml.dnsbl.vlh.dk warn_if_reject reject_rbl_client mm.dnsbl.vlh.dk reject_rbl_client mn.dnsbl.vlh.dk reject_rbl_client mo.dnsbl.vlh.dk warn_if_reject reject_rbl_client mp.dnsbl.vlh.dk warn_if_reject reject_rbl_client mr.dnsbl.vlh.dk warn_if_reject reject_rbl_client ms.dnsbl.vlh.dk warn_if_reject reject_rbl_client mt.dnsbl.vlh.dk warn_if_reject reject_rbl_client mu.dnsbl.vlh.dk warn_if_reject reject_rbl_client mv.dnsbl.vlh.dk warn_if_reject reject_rbl_client mw.dnsbl.vlh.dk reject_rbl_client mx.dnsbl.vlh.dk warn_if_reject reject_rbl_client my.dnsbl.vlh.dk warn_if_reject reject_rbl_client mz.dnsbl.vlh.dk warn_if_reject reject_rbl_client na.dnsbl.vlh.dk warn_if_reject reject_rbl_client nc.dnsbl.vlh.dk warn_if_reject reject_rbl_client ne.dnsbl.vlh.dk warn_if_reject reject_rbl_client nf.dnsbl.vlh.dk warn_if_reject reject_rbl_client ng.dnsbl.vlh.dk warn_if_reject reject_rbl_client ni.dnsbl.vlh.dk warn_if_reject reject_rbl_client np.dnsbl.vlh.dk warn_if_reject reject_rbl_client nr.dnsbl.vlh.dk warn_if_reject reject_rbl_client nu.dnsbl.vlh.dk warn_if_reject reject_rbl_client nz.dnsbl.vlh.dk warn_if_reject reject_rbl_client om.dnsbl.vlh.dk warn_if_reject reject_rbl_client pa.dnsbl.vlh.dk reject_rbl_client pe.dnsbl.vlh.dk warn_if_reject reject_rbl_client pf.dnsbl.vlh.dk warn_if_reject reject_rbl_client pg.dnsbl.vlh.dk reject_rbl_client ph.dnsbl.vlh.dk warn_if_reject reject_rbl_client pk.dnsbl.vlh.dk warn_if_reject reject_rbl_client pm.dnsbl.vlh.dk warn_if_reject reject_rbl_client pn.dnsbl.vlh.dk warn_if_reject reject_rbl_client pr.dnsbl.vlh.dk warn_if_reject reject_rbl_client ps.dnsbl.vlh.dk warn_if_reject reject_rbl_client pt.dnsbl.vlh.dk warn_if_reject reject_rbl_client pw.dnsbl.vlh.dk warn_if_reject reject_rbl_client py.dnsbl.vlh.dk warn_if_reject reject_rbl_client qa.dnsbl.vlh.dk warn_if_reject reject_rbl_client re.dnsbl.vlh.dk reject_rbl_client ro.dnsbl.vlh.dk reject_rbl_client rs.dnsbl.vlh.dk warn_if_reject reject_rbl_client ru.dnsbl.vlh.dk warn_if_reject reject_rbl_client rw.dnsbl.vlh.dk reject_rbl_client sa.dnsbl.vlh.dk warn_if_reject reject_rbl_client sb.dnsbl.vlh.dk warn_if_reject reject_rbl_client sc.dnsbl.vlh.dk reject_rbl_client sd.dnsbl.vlh.dk warn_if_reject reject_rbl_client sg.dnsbl.vlh.dk warn_if_reject reject_rbl_client sh.dnsbl.vlh.dk warn_if_reject reject_rbl_client si.dnsbl.vlh.dk warn_if_reject reject_rbl_client sj.dnsbl.vlh.dk warn_if_reject reject_rbl_client sk.dnsbl.vlh.dk warn_if_reject reject_rbl_client sl.dnsbl.vlh.dk warn_if_reject reject_rbl_client sm.dnsbl.vlh.dk reject_rbl_client sn.dnsbl.vlh.dk warn_if_reject reject_rbl_client so.dnsbl.vlh.dk reject_rbl_client sr.dnsbl.vlh.dk warn_if_reject reject_rbl_client ss.dnsbl.vlh.dk warn_if_reject reject_rbl_client st.dnsbl.vlh.dk reject_rbl_client sv.dnsbl.vlh.dk warn_if_reject reject_rbl_client sx.dnsbl.vlh.dk warn_if_reject reject_rbl_client sy.dnsbl.vlh.dk warn_if_reject reject_rbl_client sz.dnsbl.vlh.dk warn_if_reject reject_rbl_client tc.dnsbl.vlh.dk warn_if_reject reject_rbl_client td.dnsbl.vlh.dk warn_if_reject reject_rbl_client tf.dnsbl.vlh.dk warn_if_reject reject_rbl_client tg.dnsbl.vlh.dk reject_rbl_client th.dnsbl.vlh.dk reject_rbl_client tj.dnsbl.vlh.dk warn_if_reject reject_rbl_client tk.dnsbl.vlh.dk warn_if_reject reject_rbl_client tl.dnsbl.vlh.dk warn_if_reject reject_rbl_client tm.dnsbl.vlh.dk reject_rbl_client tn.dnsbl.vlh.dk warn_if_reject reject_rbl_client to.dnsbl.vlh.dk reject_rbl_client tr.dnsbl.vlh.dk warn_if_reject reject_rbl_client tt.dnsbl.vlh.dk warn_if_reject reject_rbl_client tv.dnsbl.vlh.dk warn_if_reject reject_rbl_client tz.dnsbl.vlh.dk reject_rbl_client ua.dnsbl.vlh.dk warn_if_reject reject_rbl_client ug.dnsbl.vlh.dk warn_if_reject reject_rbl_client um.dnsbl.vlh.dk warn_if_reject reject_rbl_client uy.dnsbl.vlh.dk warn_if_reject reject_rbl_client va.dnsbl.vlh.dk warn_if_reject reject_rbl_client vc.dnsbl.vlh.dk warn_if_reject reject_rbl_client ve.dnsbl.vlh.dk warn_if_reject reject_rbl_client vg.dnsbl.vlh.dk warn_if_reject reject_rbl_client vi.dnsbl.vlh.dk reject_rbl_client vn.dnsbl.vlh.dk warn_if_reject reject_rbl_client vu.dnsbl.vlh.dk warn_if_reject reject_rbl_client wf.dnsbl.vlh.dk warn_if_reject reject_rbl_client ws.dnsbl.vlh.dk reject_rbl_client ye.dnsbl.vlh.dk warn_if_reject reject_rbl_client yt.dnsbl.vlh.dk reject_rbl_client za.dnsbl.vlh.dk reject_rbl_client zm.dnsbl.vlh.dk warn_if_reject reject_rbl_client zw.dnsbl.vlh.dk check_policy_service inet:mail.vlh.dk:12525 check_policy_service unix:/var/run/sqlgrey.sock check_policy_service unix:private/policyd-spf

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination

smtpd_sasl_auth_enable = yes

smtpd_sasl_path = private/auth

smtpd_sasl_type = dovecot

smtpd_sender_restrictions = reject_unknown_sender_domain reject_non_fqdn_sender

smtpd_tls_CAfile = /etc/ssl/postfix/ca.crt

smtpd_tls_auth_only = no

smtpd_tls_cert_file = /etc/ssl/postfix/server.crt

smtpd_tls_ciphers = high

smtpd_tls_exclude_ciphers = ECDHE-RSA-DES-CBC3-SHA, RC4, aNULL, LOW, MD5, EXP, PSK, SRP, DSS

smtpd_tls_key_file = /etc/ssl/postfix/server.key

smtpd_tls_loglevel = 1

smtpd_tls_protocols = !SSLv2, !SSLv3

smtpd_tls_security_level = may

soft_bounce = no

strict_rfc821_envelopes = yes

unknown_local_recipient_reject_code = 550

virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-aliases.cf,mysql:/etc/postfix/mysql-email2email.cf

virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-domains.cf

virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-users.cf

virtual_transport = dovecot
```

This is my Dovecot-debug-log when retrieving a msg.:

```
Jun 10 17:47:38 [dovecot] auth: Debug: auth client connected (pid=15958)

Jun 10 17:47:38 [dovecot] auth: Debug: client in: AUTH_1_PLAIN_service=pop3_secured_session=lm5VP337awAgAQRwACgEplDnktq5fxgs_lip=2001:470:28:4a6::4_rip=2001:470:28:4a6:50e7:92da:b97f:182c_lport=995_rport=49771_resp=<hidden>

Jun 10 17:47:38 [dovecot] auth-worker(15943): Debug: sql(kibs@vlh.dk,2001:470:28:4a6:50e7:92da:b97f:182c): query: SELECT email as user, password FROM virtual_users WHERE email='kibs@vlh.dk';

Jun 10 17:47:38 [dovecot] auth: Debug: client passdb out: OK_1_user=kibs@vlh.dk

Jun 10 17:47:38 [dovecot] auth: Debug: master in: REQUEST_692191233_15958_1_b37178fc7bf4880da17643886abfda94_session_pid=15960

Jun 10 17:47:38 [dovecot] auth-worker(15943): Debug: sql(kibs@vlh.dk,2001:470:28:4a6:50e7:92da:b97f:182c): SELECT CONCAT('/var/mail/',CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1))) AS home, 8 AS uid, 12 AS gid,

 CONCAT('*:bytes=',quota_kb) AS quota_rule FROM virtual_users WHERE email='kibs@vlh.dk';

Jun 10 17:47:38 [dovecot] auth: Debug: master userdb out: USER_692191233_kibs@vlh.dk_home=/var/mail/vlh.dk/kibs_uid=8_gid=12_quota_rule=*:bytes=1G

Jun 10 17:47:38 [dovecot] pop3-login: Login: user=<kibs@vlh.dk>, method=PLAIN, rip=2001:470:28:4a6:50e7:92da:b97f:182c, lip=2001:470:28:4a6::4, mpid=15960, TLS, session=<lm5VP337awAgAQRwACgEplDnktq5fxgs>

Jun 10 17:47:38 [dovecot] pop3: Debug: Added userdb setting: plugin/quota_rule=*:bytes=1G

Jun 10 17:47:38 [dovecot] pop3(kibs@vlh.dk): Debug: Effective uid=8, gid=12, home=/var/mail/vlh.dk/kibs

Jun 10 17:47:38 [dovecot] pop3(kibs@vlh.dk): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=mdbox:/var/mail/vlh.dk/kibs/dbox

Jun 10 17:47:38 [dovecot] pop3(kibs@vlh.dk): Debug: fs: root=/var/mail/vlh.dk/kibs/dbox, index=, indexpvt=, control=, inbox=, alt=

Jun 10 17:47:38 [dovecot] pop3(kibs@vlh.dk): Debug: Namespace : Using permissions from /var/mail/vlh.dk/kibs/dbox: mode=0700 gid=default

Jun 10 17:47:38 [dovecot] pop3(kibs@vlh.dk): Disconnected: Logged out top=0/0, retr=1/3591, del=0/323, size=13697219
```

Dunno if any of these helps the slightest...

----------

