dovecot 2.2.27 welcome plugins script
Carlos R Laguna
carlosr at jovenclub.cu
Tue Jan 31 22:03:04 UTC 2017
Hello everyone,
I am trying to send a mail to newly autocreated users, using the welcome
plugins, however, i am get unable to pipe user information correctly to
the script, acording to the wiki the scripts are called just as the
quota warnig scripts.
Also, every time that a try something new i have created a new
user...... is a pain. what can i do to test this without to create a new
user after any little change?
# 2.2.27 (c0f36b0): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.16 (fed8554)
# OS: Linux 4.4.0-59-generic x86_64 Ubuntu 14.04.5 LTS nfs
auth_mechanisms = plain login
mail_debug = yes
mail_gid = vmail
mail_location = maildir:/var/nfsvmail/%d/%Ln/
mail_plugins = " quota welcome"
mail_uid = vmail
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-ldap.conf.ext
driver = ldap
}
plugin {
quota = maildir:User quota
quota_grace = 10%%
quota_rule = *:storage=2M
quota_rule2 = Trash:storage=+1M
quota_status_nouser = DUNNO
quota_status_overquota = 552 5.2.2 El buzón esta lleno
quota_status_success = DUNNO
quota_warning = storage=95%% quota-warning 95 %u
quota_warning2 = storage=80%% quota-warning 80 %u
welcome_script = welcome %u
welcome_wait = yes
}
postmaster_address = postmaster at cubava.cu
protocols = " imap lmtp pop3"
inet_listener pop3s {
port = 0
}
}
service quota-status {
client_limit = 1
executable = quota-status -p postfix
inet_listener {
port = 12340
}
}
service welcome {
executable = script /usr/local/bin/welcome.sh
unix_listener welcome {
user = vmail
}
user = dovecot
}
ssl_cert = </etc/ssl/certs/mailcubava.pem
ssl_key = # hidden, use -P to show it
userdb {
args = /etc/dovecot/dovecot-ldap.conf.ext
driver = ldap
}
protocol imap {
mail_plugins = " quota welcome imap_quota"
}
-rwxr-xr-x 1 dovecot vmail 397 Jan 31 16:11 welcome.sh
#!/bin/sh
USER=$1
cat << EOF | /usr/lib/dovecot/dovecot-lda -d $USER
From: postmaster at example.com
Subject: Welcome
Message
EOF
--
Carlos R Laguna Mendoza
Esp. Principal NDC TINORED
Joven Club de Computación y Electrónica
Tel: 52793189, 7863-3174, 7868-4230
More information about the dovecot
mailing list