<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<div class="moz-cite-prefix">On 3/10/19 9:07 AM, Yassine Chaouche
via dovecot wrote:<br>
</div>
<blockquote type="cite"
cite="mid:fef4408b-da9a-8d08-abde-3968ec55ebec@algerian-radio.dz">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>On 3/9/19 12:41 PM, Monis Monther via dovecot wrote:<br>
</p>
<blockquote type="cite"
cite="mid:CAAyHf+oEckzy1dYLb4-OeCtfTQ7OCeLWqdJiRXO2ZPG5j9mksw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<div dir="ltr">
<div dir="ltr">Hi,
<div><br>
</div>
<div>We have an alias group named <a
href="mailto:xyz@example.com" moz-do-not-send="true">xyz@example.com</a>,
this alias group has 3 actual users <a
href="mailto:a@example.com" moz-do-not-send="true">a@example.com</a>,
<a href="mailto:b@example.com" moz-do-not-send="true">b@example.com</a>
and <a href="mailto:c@example.com" moz-do-not-send="true">c@example.com</a></div>
<div><br>
</div>
<div>We set vacation rule on the generic sieve rule, the
problem is that 3 responses are sent to the original
sender. (obviously because the rule is being executed with
each user in the alias group)</div>
<div><br>
</div>
<div>Is it possible to set auto response only once, we tried
the ( :days 1) option but still all 3 respond back.</div>
<div><br>
</div>
<div>How can such a setup be achieved. (Single auto response
to an alias group)<br clear="all">
<div><br>
</div>
<div>CentOS 7.5</div>
<div>
<div>dovecot-pigeonhole-2.3.4.1-1.x86_64</div>
<div>dovecot-2.3.4.1-1.x86_64</div>
</div>
<div>postfix 2.10-1</div>
<div><br>
</div>
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>Best Regards</div>
<div>Monis</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<p>Hello Monis,</p>
<p>As a workaround, you can turn <a
class="moz-txt-link-abbreviated" href="mailto:xyz@example.com"
moz-do-not-send="true">xyz@example.com</a> into an actual
mailbox and give <a class="moz-txt-link-abbreviated"
href="mailto:a@example.com" moz-do-not-send="true">a@example.com</a>,
<a class="moz-txt-link-abbreviated" href="mailto:b@example.com"
moz-do-not-send="true">b@example.com</a> and <a
class="moz-txt-link-abbreviated" href="mailto:c@example.com"
moz-do-not-send="true">c@example.com</a> read-only shared
folder access. <br>
</p>
<p>Yassine.<br>
</p>
</blockquote>
<p><br>
</p>
<p>As a request for comments and improvements, here's a my script to
share folders via acl files and symlinks (dovecot must be
configured accordingly) :<br>
</p>
<p>root@messagerie[10.10.10.19] /usr/local/scripts/mail # cat
sharemailbox.single <br>
#!/bin/bash<br>
<br>
function create_link {<br>
l_src=$1<br>
l_dst=$2<br>
l_maildir=$3<br>
t_maildir=$(echo "$3" | tr . ․)<br>
t_dst="$l_dst"/.shared."$t_maildir"<br>
echo pointing "$t_dst" to "$l_src"<br>
echo ln -s "$l_src/" "$t_dst" <br>
ln -s "$l_src/" "$t_dst" <br>
<br>
}<br>
<br>
<br>
function verifier_email {<br>
l_email=$1<br>
if ! searchmailbox.strict.sql $l_email > /dev/null<br>
then<br>
echo "l'utilisateur $l_email n'a pas pu être trouvé dans
la base de données." >&2<br>
return 1<br>
fi<br>
return 0<br>
}<br>
<br>
function set_acl {<br>
l_maildir=$1<br>
l_email=$2<br>
echo "giving $l_email access to $l_maildir"<br>
if [ ! -d $l_maildir ]<br>
then<br>
#.Sent isn't there yet.<br>
return<br>
fi<br>
acl_file="$l_maildir/dovecot-acl"<br>
echo "echo user=$l_email lr >> $acl_file"<br>
echo user="$l_email" lr >> "$acl_file"<br>
chown vmail:vmail "$acl_file"<br>
}<br>
<br>
<br>
if [ "$#" -lt 2 ]<br>
then<br>
echo "usage : $0 <a class="moz-txt-link-abbreviated" href="mailto:partage@domain.com">partage@domain.com</a> <a class="moz-txt-link-abbreviated" href="mailto:user1@domain.com">user1@domain.com</a>
<a class="moz-txt-link-abbreviated" href="mailto:user2@domain.com">user2@domain.com</a> ... "<br>
exit 1<br>
fi<br>
<br>
email="$1"<br>
inbox="${email%@*}"<br>
domain="${email#*@}"<br>
src="/var/vmail/$domain/$inbox"<br>
if ! verifier_email "$email"<br>
then<br>
echo "exit at 1"<br>
exit 1<br>
fi<br>
<br>
<br>
shift <br>
for share_email in $@<br>
do<br>
if ! verifier_email $share_email<br>
then<br>
continue<br>
fi<br>
share_inbox="${share_email%@*}"<br>
share_domain="${share_email#*@}"<br>
share_maildir=/var/vmail/"$share_domain"/"$share_inbox"<br>
#echo grep "$share_email" "$src"/dovecot-acl <br>
if grep "$share_email" "$src"/dovecot-acl > /dev/null
2>&1<br>
then<br>
# then is executed when exit status is 0<br>
# exist status is 0 when there is a match<br>
echo "$share_email" has already access to "$email"<br>
else<br>
set_acl $src $share_email<br>
create_link $src $share_maildir $inbox<br>
fi<br>
done<br>
root@messagerie[10.10.10.19] /usr/local/scripts/mail #<br>
<br>
</p>
</body>
</html>