Commit 1dc80247 authored by Claudemir Todo Bom's avatar Claudemir Todo Bom

* mailman enhancements / add support hooked scripts

parent 517fde3c
Pipeline #198 passed with stage
in 1 minute and 26 seconds
...@@ -38,6 +38,9 @@ WW_POSTMASTER=postmaster@example.com ...@@ -38,6 +38,9 @@ WW_POSTMASTER=postmaster@example.com
### define host específico para envio (apenas 1 permitido) #FIXME ### define host específico para envio (apenas 1 permitido) #FIXME
#WW_SUBMITTERS= #WW_SUBMITTERS=
### enable smtp hooked scripts on /usr/local/share/mailscripts
#WW_SCRIPTS_ENABLE=1
WW_ISP_HOST=localhost WW_ISP_HOST=localhost
WW_ISP_USER=intadmin WW_ISP_USER=intadmin
WW_ISP_PASS=ChangeIt WW_ISP_PASS=ChangeIt
...@@ -53,8 +56,12 @@ WW_BAYES_USER=intadmin ...@@ -53,8 +56,12 @@ WW_BAYES_USER=intadmin
WW_BAYES_PASS=ChangeIt WW_BAYES_PASS=ChangeIt
WW_BAYES_DB=bayes WW_BAYES_DB=bayes
### define mailman domain, use only names with subdomains that matches the regex "^(lista?s?|gro?upo?s)\."
### or it will need to change also the configuration of lighttpd
#WW_MAILMAN_DOMAIN=lists.example.com
WW_SSL_MAIN=mail.example.com WW_SSL_MAIN=mail.example.com
WW_SSL_EXTRA="webmail.example.com mx.example.com" WW_SSL_EXTRA="webmail.example.com mx.example.com lists.example.com"
### Generate your recaptcha keys on https://www.google.com/recaptcha/admin ### Generate your recaptcha keys on https://www.google.com/recaptcha/admin
### Code was tested with Invisible Recaptcha option ### Code was tested with Invisible Recaptcha option
......
...@@ -59,8 +59,17 @@ domainlist local_domains = : ...@@ -59,8 +59,17 @@ domainlist local_domains = :
domainlist submission_domains = mysql;SELECT domain FROM domains WHERE domain='$domain' AND active>0; domainlist submission_domains = mysql;SELECT domain FROM domains WHERE domain='$domain' AND active>0;
domainlist relay_domains = : domainlist relay_domains = :
domainlist local_domains = : domainlist local_domains = :
.else
.ifdef WW_MAILMAN_DOMAIN
domainlist mailman_domain = WW_MAILMAN_DOMAIN
WW_MAILMAN_ENABLE=1
.else .else
domainlist local_domains = mysql;SELECT domain FROM domains WHERE domain='$domain' AND active>0; domainlist mailman_domain = :
.endif
domainlist local_domains = +mailman_domain : mysql;SELECT domain FROM domains WHERE domain='$domain' AND active>0;
domainlist submission_domains = : domainlist submission_domains = :
domainlist relay_domains = : domainlist relay_domains = :
.endif .endif
...@@ -1073,17 +1082,13 @@ real_local: ...@@ -1073,17 +1082,13 @@ real_local:
local_part_prefix = real- local_part_prefix = real-
transport = local_delivery transport = local_delivery
.ifdef WW_MAILMAN_ENABLE
## MAILMAN com dominio exclusivo ## MAILMAN com dominio exclusivo
list_director: list_director:
driver = accept driver = accept
require_files = /var/lib/mailman/lists/${lc::$local_part} require_files = /var/lib/mailman/lists/${lc::$local_part}
domains = lists.WW_MAIL_DOMAIN domains = WW_MAILMAN_DOMAIN
retry_use_local_part retry_use_local_part
transport = list_transport transport = list_transport
local_part_suffix_optional local_part_suffix_optional
...@@ -1093,6 +1098,16 @@ list_director: ...@@ -1093,6 +1098,16 @@ list_director:
-join : -leave : \ -join : -leave : \
-owner : -request : \ -owner : -request : \
-subscribe : -unsubscribe -subscribe : -unsubscribe
.endif
.ifdef WW_SCRIPTS_ENABLE
### hooked scripts
script_director:
driver = accept
require_files = /usr/local/share/mailscripts/${lc::$local_part}
retry_use_local_part
transport = script_pipe
.endif
### ONLY FOR VERIFICATION OF LOCAL USER ### ONLY FOR VERIFICATION OF LOCAL USER
...@@ -1162,8 +1177,21 @@ dovecot_mysql_users: ...@@ -1162,8 +1177,21 @@ dovecot_mysql_users:
begin transports begin transports
.ifdef WW_SCRIPTS_ENABLE
## hooked scripts pipe
script_pipe:
driver = pipe
check_string = "From "
command = "/usr/local/share/mailscripts/${local_part}"
delivery_date_add
envelope_to_add
escape_string = ">From "
group = mail
path = "/bin:/sbin:/usr/bin:/usr/sbin"
user = mail
.endif
.ifdef WW_MAILMAN_ENABLE
## transport for mailman ## transport for mailman
list_transport: list_transport:
...@@ -1177,6 +1205,7 @@ list_transport: ...@@ -1177,6 +1205,7 @@ list_transport:
group = list group = list
home_directory = /var/lib/mailman home_directory = /var/lib/mailman
user = list user = list
.endif
local_delivery: local_delivery:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment