[Postfixbuch-users] OT: HOW2/Doku zu Dovecot LMTP mit SQL-Anbindung

Michael Nausch michael at nausch.org
Mo Okt 8 15:16:49 CEST 2012


Äha, die Liste lebt ja noch! ;) Griasde Gregor!

Am 08.10.2012 14:59, schrieb Gregor Hermens:

> horcht Dovecot überhaupt auf Port 24? Logs? Konfig?

Sorry, hier haben wir den Beleg:

**LMTP-Versuch**:
# telnet 10.0.0.10 24
Trying 10.0.0.10...
Connected to 10.0.0.10.
Escape character is '^]'.
220 dovecot.it-ignorant.org Dovecot LMTP ready
LHLO mx1.nausch.org
250-dovecot.it-ignorant.org
250-8BITMIME
250-ENHANCEDSTATUSCODES
250 PIPELINING
mail from:<michael at nausch.org>
250 2.1.0 OK
RCPT TO:<django at it-ignorant.org>
550 5.1.1 <django at it-ignorant.org> User doesn't exist:
django at it-ignorant.org
quit
221 2.0.0 Client quit
Connection closed by foreign host.

**MAILLOG**:
Oct  8 15:05:16 bitch dovecot: lmtp(13613): Connect from 10.0.0.20
Oct  8 15:05:39 bitch dovecot: auth: Debug: master in:
USER#0111#011django at it-ignorant.org#011service=lmtp#011lip=10.0.0.10#011rip=10.0.0.20
Oct  8 15:05:39 bitch dovecot: auth: Debug:
passwd(django at it-ignorant.org,88.198.212.215): lookup
Oct  8 15:05:39 bitch dovecot: auth:
passwd(djangoit-ignorant.org,88.198.212.215): unknown user
Oct  8 15:05:39 bitch dovecot: auth: Debug: master out: NOTFOUND#0111
Oct  8 15:05:42 bitch dovecot: lmtp(13613): Disconnect from
88.198.212.215: Client quit

Folgende Konfig habe ich angefasst:

# egrep -v '(^.*#|^$)' 10-auth.conf
auth_username_chars =
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@
auth_mechanisms = plain login digest-md5
!include auth-system.conf.ext


#  egrep -v '(^.*#|^$)' 10-logging.conf
syslog_facility = mail
auth_verbose = yes
auth_debug = yes
plugin {
}
log_timestamp  = "%Y-%m-%d %H:%M:%S "


# egrep -v '(^.*#|^$)' 10-mail.conf
mail_location = maildir:/var/spool/mail/vmail/%d/%n
mail_uid = 97
mail_gid = 97
mail_privileged_group = mail
mail_plugin_dir = /usr/lib64/dovecot
mail_plugins = autocreate sieve
mbox_write_locks = fcntl


# egrep -v '(^.*#|^$)' 10-master.conf
service imap-login {
  inet_listener imap {
  }
  inet_listener imaps {
  }
  process_min_avail = 5
}
service pop3-login {
  inet_listener pop3 {
  }
  inet_listener pop3s {
  }
}
service lmtp {
  inet_listener lmtp {
    address = 10.0.0.10
    port = 24
  }
}
service imap {
}
service pop3 {
}
service auth {
  unix_listener auth-userdb {
  }
}
service auth-worker {
}
service dict {
  unix_listener dict {
  }
}


# egrep -v '(^.*#|^$)' 10-ssl.conf
ssl = yes
ssl_cert = </etc/pki/dovecot/certs/server.crt
ssl_key = </etc/pki/dovecot/private/server.key


# egrep -v '(^.*#|^$)' 15-lda.conf
postmaster_address = postmaster at it-ignorant.org
hostname = bitch.it-ignorant.org
quota_full_tempfail = yes
sendmail_path = /usr/sbin/sendmail
rejection_subject = email abgelehnt: %s
rejection_reason = Ihre eMail an <%t> wurde abgelehnt (automatisch):%n%r
recipient_delimiter = +
lda_mailbox_autocreate = no
protocol lda {
  mail_plugins = $mail_plugins
}


# egrep -v '(^.*#|^$)' 20-lmtp.conf
lmtp_save_to_detail_mailbox = yes
protocol lmtp {
  mail_plugins = $mail_plugins
}


# egrep -v '(^.*#|^$)' 20-pop3.conf
protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
}


# egrep -v '(^.*#|^$)' auth-sql.conf.ext
passdb {
  driver = sql
  args = /etc/dovecot/dovecot-sql.conf.ext
}
userdb {
  driver = sql
  args = /etc/dovecot/conf.d/dovecot-sql.conf.ext
}


# egrep -v '(^.*#|^$)' dovecot-sql.conf.ext
driver = mysql
connect = host=localhost dbname=postfix user=dovecot_user
password=E7LdfgGOMrG7l1dfgbD74gh
default_pass_scheme = MD5-CRYPT
password_query = SELECT username AS user, password FROM mailbox WHERE
username = '%u' AND active = '1'
user_query = SELECT CONCAT('/var/mail/vmail/', maildir) AS home, 97 AS
uid, 97 AS gid, \
  CONCAT('*:bytes=', quota) AS quota_rule FROM mailbox WHERE username =
'%u' AND active='1'


Servus
Michael



Mehr Informationen über die Mailingliste Postfixbuch-users