2017年07月02日
Tweet
postfixadmin を利用する環境で、 dovecotで受信します。
pop を利用するだけで imap などは利用しません。証明書もとりあえずは利用しません。
完全では無いのですが、メモです。
cd /etc/dovecot/
vi dovecot-sql.conf.ext
------------
driver = mysql
connect = 'host=127.0.0.1 dbname=[dbname] user=[dbuser] password=[dbpassword]'
default_pass_scheme =PLAIN #他の方法も要検討
password_query = SELECT password FROM mailbox WHERE username = '%u' AND active='1'
user_query = SELECT CONCAT('maildir:/var/spool/vmail/',maildir) AS mail, 10000 AS uid, 10000 AS gid, CONCAT('*:bytes=', quota) AS quota_rule FROM mailbox WHERE username = '%u' AND active='1'
------------
#grep -v '^\s*#' /etc/dovecot/dovecot.conf |grep -v '^$'
------------
protocols = pop3 lmtp
listen = *, ::
dict {
}
!include conf.d/*.conf
------------
#grep -v '^\s*#' /etc/dovecot/conf.d/10-auth.conf |grep -v '^$'
------------
disable_plaintext_auth = no
auth_mechanisms = plain cram-md5
!include auth-system.conf.ext
!include auth-sql.conf.ext
# grep -v '^\s*#' 10-master.conf |grep -v '^$'
service pop3-login {
inet_listener pop3 {
port = 110
}
inet_listener pop3s {
}
}
service lmtp {
}
service imap {
}
service pop3 {
}
service auth {
unix_listener /var/spool/postfix/private/auth {
mode = 0666
}
}
service auth-worker {
}
service dict {
unix_listener dict {
}
}
------------
pop を利用するだけで imap などは利用しません。証明書もとりあえずは利用しません。
完全では無いのですが、メモです。
cd /etc/dovecot/
vi dovecot-sql.conf.ext
------------
driver = mysql
connect = 'host=127.0.0.1 dbname=[dbname] user=[dbuser] password=[dbpassword]'
default_pass_scheme =PLAIN #他の方法も要検討
password_query = SELECT password FROM mailbox WHERE username = '%u' AND active='1'
user_query = SELECT CONCAT('maildir:/var/spool/vmail/',maildir) AS mail, 10000 AS uid, 10000 AS gid, CONCAT('*:bytes=', quota) AS quota_rule FROM mailbox WHERE username = '%u' AND active='1'
------------
#grep -v '^\s*#' /etc/dovecot/dovecot.conf |grep -v '^$'
------------
protocols = pop3 lmtp
listen = *, ::
dict {
}
!include conf.d/*.conf
------------
#grep -v '^\s*#' /etc/dovecot/conf.d/10-auth.conf |grep -v '^$'
------------
disable_plaintext_auth = no
auth_mechanisms = plain cram-md5
!include auth-system.conf.ext
!include auth-sql.conf.ext
# grep -v '^\s*#' 10-master.conf |grep -v '^$'
service pop3-login {
inet_listener pop3 {
port = 110
}
inet_listener pop3s {
}
}
service lmtp {
}
service imap {
}
service pop3 {
}
service auth {
unix_listener /var/spool/postfix/private/auth {
mode = 0666
}
}
service auth-worker {
}
service dict {
unix_listener dict {
}
}
------------
stock_value at 16:53│Comments(0)│技術:2017年