Postfix user at domain splitting

Ricardo Branco ricardo at wenn.com
Tue Jul 15 11:12:08 UTC 2014


Attached files

Nick Edwards wrote, On 15/07/2014 10:19:
> you need to show doveconf -n
> and what you have in the master.conf for dovecot
>
> On 7/15/14, Ricardo Branco <ricardo at wenn.com> wrote:
>> I have been trying looking though all the wiki documents to setup LMTP.
>> It now seems to all be connected except that it keeps saying that the
>> user is not recognised when postfix sends to LMTP, it sends the full
>> recipent email address but seems that on the dovecot side it is unable
>> to work with this.
>> I have checked the userdb and made sure its using %n but alas it still
>> does not work.
>> Currently ive had to revert to using LDA as it works fine with that but
>> i still dont know how as the postfix config variable $RECIPIENT is the
>> full email address and does not seem to matter to LDA.
>>

-------------- next part --------------
# 2.2.13: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-431.20.3.el6.x86_64 x86_64 CentOS release 6.5 (Final)
auth_master_user_separator = *
auth_mechanisms = plain login
auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_
auth_username_format = %n
base_dir = /var/run/dovecot/
debug_log_path = /var/log/imapd_debug.log
deliver_log_format = msgid=%m: , From:%f , Subject:%s , Status:%$
disable_plaintext_auth = no
dotlock_use_excl = no
info_log_path = /var/log/imapd_info.log
log_path = /var/log/imapd.log
login_greeting = I am ready.
mail_cache_min_mail_count = 5
mail_fsync = always
mail_location = mdbox:~/mdbox
mail_plugins = acl zlib fts fts_solr fts_squat
mail_privileged_group = mail
maildir_stat_dirs = yes
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 imapflags notify
mdbox_rotate_interval = 1 days
mmap_disable = yes
namespace {
  location = maildir:/home/public
  prefix = Public/
  separator = /
  subscriptions = no
  type = public
}
namespace {
  list = children
  location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
  prefix = shared/%%u/
  separator = /
  subscriptions = no
  type = shared
}
namespace inbox {
  inbox = yes
  location =
  prefix =
  separator = /
  type = private
}
passdb {
  driver = pam
}
plugin {
  acl = vfile
  antispam_allow_append_to_spam = no
  antispam_backend = mailtrain
  antispam_debug_target = /var/log/imapd_debug.log
  antispam_mail_notspam = --ham
  antispam_mail_sendmail = /usr/bin/sa-learn-pipe.sh
  antispam_mail_spam = --spam
  antispam_signature = X-WENN-MailScanner-SpamCheck
  antispam_signature_missing = error
  antispam_spam_pattern_ignorecase = SPAM
  antispam_spool2dir_notspam = /tmp/spamspool/.HAM/%%020lu-%u-%%05luh
  antispam_spool2dir_spam = /tmp/spamspool/.SPAM/%%020lu-%u-%%05lus
  antispam_tmp = /tmp
  antispam_trash_pattern_ignorecase = mail-trash;Trash;*Deleted*
  antispam_unsure = CHECK4SPAM
  antispam_verbose_debug = 1
  fts = solr
  fts_solr = break-imap-search url=http://db.wenn.com:8983/solr/dovecot/
  fts_squat = partial=4 full=10
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
  sieve_extensions = +notify +imapflags
  zlib_save = gz
  zlib_save_level = 2
}
protocols = imap pop3 sieve lmtp
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0666
    user = postfix
  }
  user = dovecot
}
service imap-login {
  process_min_avail = 2
  service_count = 10
  vsz_limit = 128 M
}
service imap-postlogin {
  executable = script-login /root/bin/imap_login_checks.sh
}
service imap {
  executable = imap imap-postlogin
  vsz_limit = 512 M
}
service lmtp {
  inet_listener lmtp {
    address = 127.0.0.1
    port = 24
  }
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
  inet_listener sieve_deprecated {
    port = 2000
  }
}
service pop3-postlogin {
  executable = script-login /root/bin/pop3_login_checks.sh
}
service pop3 {
  executable = pop3 pop3-postlogin
}
ssl_cert = </etc/pki/dovecot/certs/dovecot.crt
ssl_key = </etc/pki/dovecot/private/dovecot.pem
userdb {
  args = username_format=%u /etc/passwd
  driver = passwd-file
  name = passwd-file
}
protocol lda {
  info_log_path = /var/log/dovecot-deliver.log
  log_path = /var/log/dovecot-deliver.log
  mail_plugins = acl zlib fts fts_solr fts_squat sieve acl zlib fts fts_solr
  postmaster_address = postmaster at wenn.com
  sendmail_path = /usr/lib/sendmail
}
protocol imap {
  imap_capability = IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS ACL SPECIAL-USE
  mail_max_userip_connections = 50
  mail_plugins = acl zlib fts fts_solr fts_squat acl imap_acl antispam
}
protocol lmtp {
  info_log_path = /var/log/dovecot-lmtp.log
  mail_plugins = sieve
  postmaster_address = postmaster at wenn.com
}
protocol pop3 {
  mail_max_userip_connections = 50
  mail_plugins = acl zlib fts fts_solr fts_squat zlib
}
-------------- next part --------------
#default_process_limit = 100
#default_client_limit = 1000

# Default VSZ (virtual memory size) limit for service processes. This is mainly
# intended to catch and kill processes that leak memory before they eat up
# everything.
#default_vsz_limit = 256M

# Login user is internally used by login processes. This is the most untrusted
# user in Dovecot system. It shouldn't have access to anything at all.
#default_login_user = dovenull

# Internal user is used by unprivileged processes. It should be separate from
# login user, so that login processes can't disturb other processes.
#default_internal_user = dovecot

service imap-login {
  inet_listener imap {
    #port = 143
  }
  inet_listener imaps {
    #port = 993
    #ssl = yes
  }

  # Number of connections to handle before starting a new process. Typically
  # the only useful values are 0 (unlimited) or 1. 1 is more secure, but 0
  # is faster. <doc/wiki/LoginProcess.txt>
  service_count = 10

  # Number of processes to always keep waiting for more connections.
  process_min_avail = 2

  # If you set service_count=0, you probably need to grow this.
  vsz_limit = 128M
}

service pop3-login {
  inet_listener pop3 {
    #port = 110
  }
  inet_listener pop3s {
    #port = 995
    #ssl = yes
  }
}

service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    #mode = 0666
    group = postfix
    mode = 0600
    user = postfix
  }

  # Create inet listener only if you can't use the above UNIX socket
  inet_listener lmtp {
    # Avoid making LMTP visible for the entire internet
    address = 127.0.0.1
    port = 24
  }
}

service imap {

  executable = imap imap-postlogin
  # Most of the memory goes to mmap()ing files. You may need to increase this
  # limit if you have huge mailboxes.
  vsz_limit = 512M

  # Max. number of IMAP processes (connections)
  #process_limit = 1024
}

service imap-postlogin {
  executable = script-login /root/bin/imap_login_checks.sh

  unix_listener imap-postlogin {
  }
}

service pop3 {

  executable = pop3 pop3-postlogin
  # Max. number of POP3 processes (connections)
  #process_limit = 1024
}

service pop3-postlogin {
  executable = script-login /root/bin/pop3_login_checks.sh

  unix_listener pop3-postlogin {
  }
}

service auth {
  # auth_socket_path points to this userdb socket by default. It's typically
  # used by dovecot-lda, doveadm, possibly imap process, etc. Its default
  # permissions make it readable only by root, but you may need to relax these
  # permissions. Users that have access to this socket are able to get a list
  # of all usernames and get results of everyone's userdb lookups.
  unix_listener auth-userdb {
    #mode = 0600
    #user =
    #group =
  }

  # Postfix smtp-auth
  unix_listener /var/spool/postfix/private/auth {
    mode = 0666
    user = postfix
    group = postfix
  }

  # Auth process is run as this user.
  #user = $default_internal_user
  user = dovecot
}

service auth-worker {
  # Auth worker process is run as root by default, so that it can access
  # /etc/shadow. If this isn't necessary, the user should be changed to
  # $default_internal_user.
  #user = root
}

service dict {
  # If dict proxy is used, mail processes should have access to its socket.
  # For example: mode=0660, group=vmail and global mail_access_groups=vmail
  unix_listener dict {
    #mode = 0600
    #user =
    #group =
  }
}


More information about the dovecot mailing list