主题: welcome plugin

System ubuntu1604
iRedMail    v0.9.8
iRedAdmin    v0.9.1 (LDAP)

问题描述

Dovecot配置

root@fk:~# doveconf -n
# 2.2.22 (fe789d2): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.13 (7b14904)
# OS: Linux 4.4.0-116-generic x86_64 Ubuntu 16.04.4 LTS
auth_master_user_separator = *
auth_mechanisms = PLAIN LOGIN
deliver_log_format = from=%{from}, envelope_sender=%{from_envelope}, subject=%{subject}, msgid=%m, size=%{size}, %$
dict {
  acl = mysql:/etc/dovecot/dovecot-share-folder.conf
  quotadict = mysql:/etc/dovecot/dovecot-used-quota.conf
}
first_valid_uid = 2000
last_valid_uid = 2000
listen = * [::]
mail_gid = 2000
mail_location = maildir:%Lh/Maildir/:INDEX=%Lh/Maildir/
mail_plugins = quota mailbox_alias acl mail_log notify stats welcome
mail_uid = 2000
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 index ihave duplicate mime foreverypart extracttext
namespace {
  inbox = yes
  location =
  mailbox Archive {
    auto = no
    special_use = \Archive
  }
  mailbox Archives {
    auto = no
    special_use = \Archive
  }
  mailbox "Deleted Messages" {
    auto = no
    special_use = \Trash
  }
  mailbox Drafts {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Junk {
    auto = subscribe
    special_use = \Junk
  }
  mailbox "Junk E-mail" {
    auto = no
    special_use = \Junk
  }
  mailbox Sent {
    auto = subscribe
    special_use = \Sent
  }
  mailbox "Sent Items" {
    auto = no
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    auto = no
    special_use = \Sent
  }
  mailbox Spam {
    auto = no
    special_use = \Junk
  }
  mailbox Trash {
    auto = subscribe
    special_use = \Trash
  }
  prefix =
  separator = /
  type = private
}
namespace {
  list = children
  location = maildir:%%Lh/Maildir/:INDEX=%%Lh/Maildir/Shared/%%Ld/%%Ln
  prefix = Shared/%%u/
  separator = /
  subscriptions = yes
  type = shared
}
passdb {
  args = /etc/dovecot/dovecot-ldap.conf
  driver = ldap
}
passdb {
  args = /etc/dovecot/dovecot-master-users
  driver = passwd-file
  master = yes
}
plugin {
  acl = vfile
  acl_shared_dict = proxy::acl
  mail_log_events = delete undelete expunge mailbox_delete mailbox_rename
  mail_log_fields = uid box msgid size from subject
  mailbox_alias_new = Sent Messages
  mailbox_alias_new2 = Sent Items
  mailbox_alias_old = Sent
  mailbox_alias_old2 = Sent
  quota = dict:user::proxy::quotadict
  quota_grace = 10%%
  quota_warning = storage=100%% quota-warning 100 %u
  quota_warning2 = storage=95%% quota-warning 95 %u
  quota_warning3 = storage=90%% quota-warning 90 %u
  quota_warning4 = storage=85%% quota-warning 85 %u
  sieve = %Lh/sieve/dovecot.sieve
  sieve_before = /var/vmail/sieve/dovecot.sieve
  sieve_dir = %Lh/sieve
  sieve_global_dir = /var/vmail/sieve
  sieve_max_redirects = 30
  stats_refresh = 30 secs
  stats_track_cmds = yes
  welcome_script = welcome %u
  welcome_wait = yes
}
protocols = pop3 imap sieve lmtp
service auth {
  unix_listener /var/spool/postfix/private/dovecot-auth {
    group = postfix
    mode = 0666
    user = postfix
  }
  unix_listener auth-master {
    group = vmail
    mode = 0666
    user = vmail
  }
  unix_listener auth-userdb {
    group = vmail
    mode = 0660
    user = vmail
  }
}
service dict {
  unix_listener dict {
    group = vmail
    mode = 0660
    user = vmail
  }
}
service imap-login {
  process_limit = 500
  service_count = 1
}
service lmtp {
  executable = lmtp -L
  inet_listener lmtp {
    address = 127.0.0.1
    port = 24
  }
  process_min_avail = 5
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
  user = vmail
}
service managesieve-login {
  inet_listener sieve {
    address = 127.0.0.1
    port = 4190
  }
}
service pop3-login {
  service_count = 1
}
service quota-warning {
  executable = script /usr/local/bin/dovecot-quota-warning.sh
  unix_listener quota-warning {
    group = vmail
    mode = 0660
    user = vmail
  }
}
service stats {
  fifo_listener stats-mail {
    mode = 0644
    user = vmail
  }
  inet_listener {
    address = 127.0.0.1
    port = 24242
  }
}
service welcome {
  executable = script /usr/local/bin/welcome.sh
  unix_listener welcome {
    group = vmail
    mode = 0660
    user = vmail
  }
}
ssl = required
ssl_cert = </etc/ssl/certs/iRedMail.crt
ssl_cipher_list = ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5
ssl_key = </etc/ssl/private/iRedMail.key
ssl_prefer_server_ciphers = yes
ssl_protocols = !SSLv2 !SSLv3
syslog_facility = local5
userdb {
  args = /etc/dovecot/dovecot-ldap.conf
  driver = ldap
}
protocol lda {
  lda_mailbox_autocreate = yes
  lda_mailbox_autosubscribe = yes
  mail_plugins = quota mailbox_alias acl mail_log notify stats welcome sieve
}
protocol lmtp {
  lmtp_save_to_detail_mailbox = yes
  mail_plugins = quota sieve
  recipient_delimiter = +
}
protocol imap {
  imap_client_workarounds = tb-extra-mailbox-sep
  mail_max_userip_connections = 30
  mail_plugins = quota mailbox_alias acl mail_log notify stats welcome imap_quota imap_acl imap_stats
}
protocol pop3 {
  mail_max_userip_connections = 30
  mail_plugins = quota mailbox_alias acl mail_log notify stats welcome
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_uidl_format = %08Xu%08Xv
}

======================================================================
以下是welcome.sh

root@fk:~# vi /usr/local/bin/welcome.sh

#!/bin/sh
USER=$1
cat << EOF | /usr/lib/dovecot/dovecot-lda -d $USER
From: admin at fk.com
Subject: Welcome


welcome!

EOF




--
fk.com

Tel: 0769-xxxxxxxx


rc登录报错
Aug 14 13:57:55 fk roundcube: <ln4e1sqe> IMAP Error: Login failed for postmaster@mail.abc123.com from 192.168.1.5. LOGIN: Internal error occurred. Refer to server log for more information. in /opt/www/roundcubemail-1.3.6/program/lib/Roundcube/rcube_imap.php on line 196 (POST /mail/?_task=login&_action=login)
Aug 14 13:58:48 fk roundcube: <ln4e1sqe> IMAP Error: Login failed for postmaster@mail.abc123.com from 192.168.1.5. LOGIN: Internal error occurred. Refer to server log for more information. in /opt/www/roundcubemail-1.3.6/program/lib/Roundcube/rcube_imap.php on line 196 (POST /mail/?_task=login&_action=login)
Aug 14 14:15:25 fk roundcube: <fd4ijo2s> IMAP Error: Login failed for postmaster@mail.abc123.com from 192.168.1.5. LOGIN: Internal error occurred. Refer to server log for more information. in /opt/www/roundcubemail-1.3.6/program/lib/Roundcube/rcube_imap.php on line 196 (POST /mail/?_task=login&_action=login)




dovecot status

root@fk:~# service dovecot status
● dovecot.service - Dovecot IMAP/POP3 email server
   Loaded: loaded (/lib/systemd/system/dovecot.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2018-08-14 14:14:53 CST; 1min 17s ago
     Docs: man:dovecot(1)
           http://wiki2.dovecot.org/
  Process: 10002 ExecStop=/usr/bin/doveadm stop (code=exited, status=0/SUCCESS)
  Process: 10010 ExecStart=/usr/sbin/dovecot (code=exited, status=0/SUCCESS)
Main PID: 10014 (dovecot)
    Tasks: 11
   Memory: 6.8M
      CPU: 273ms
   CGroup: /system.slice/dovecot.service
           ├─10014 /usr/sbin/dovecot
           ├─10029 dovecot/lmtp -L
           ├─10031 dovecot/anvil
           ├─10032 dovecot/log
           ├─10033 dovecot/ssl-params
           ├─10035 dovecot/lmtp -L
           ├─10036 dovecot/lmtp -L
           ├─10037 dovecot/lmtp -L
           ├─10039 dovecot/lmtp -L
           ├─10040 dovecot/config
           └─10064 dovecot/auth

Aug 14 14:14:53 fk systemd[1]: Starting Dovecot IMAP/POP3 email server...
Aug 14 14:14:53 fk systemd[1]: dovecot.service: PID file /var/run/dovecot/master.pid not readable (yet?) after start: No such file or directory
Aug 14 14:14:53 fk dovecot[10014]: master: Dovecot v2.2.22 (fe789d2) starting up for pop3, imap, sieve, lmtp (core dumps disabled)
Aug 14 14:14:53 fk systemd[1]: Started Dovecot IMAP/POP3 email server.
Aug 14 14:15:25 fk dovecot[10032]: imap-login: Login: user=<postmaster@mail.abc123.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=10065, secured,
Aug 14 14:15:25 fk dovecot[10032]: imap(postmaster@mail.abc123.com): Error: Plugin 'welcome' not found from directory /usr/lib/dovecot/modules
Aug 14 14:15:25 fk dovecot[10032]: imap(postmaster@mail.abc123.com): Error: Internal error occurred. Refer to server log for more information.
lines 1-31/31 (END)


为什么提示找不到modules,这是缺少什么modules没有安装吗?老大这该怎么解决?

回复: welcome plugin

wei790205141 写道:

为什么提示找不到modules,这是缺少什么modules没有安装吗?老大这该怎么解决?

ubuntu 16.04 的 dovecot 目录里确实没有这个插件 ...