Welcome plugin - user and domain vars?

Aki Tuomi aki.tuomi at dovecot.fi
Tue Jul 31 09:07:03 EEST 2018



On 31.07.2018 06:07, Tony wrote:
> Hi List,
>
> I have multiple mail domains and depending on the domain name was
> looking for a way to pass the user and domain into a welcome.sh
> script. I looked at the quota script and saw of the 3 vars one of them
> is for the user.
>
> BOUNDARY="$1"
> USER="$2"
> MSG=""
>
> For the username - could we still reference USER="$2" in order to pass
> the username in the welcome email or is this only supported with the
> quota plugin?
>
> For the domain - how could one pass the 1st time login user's mail
> domain to the script? I looked at the welcome-plugin.c source, but
> didn't find anything that might reference a domain. Ideally I was
> hoping maybe something similar to the quota script could work..
>
>  MSG=""
>  if [[ "$DOMAIN" = "domain.net" ]]; then
>     MSG="..."
>  elif [[ "$DOMAIN" = "domain.com" ]]; then
>     MSG="..."
>  elif [[ "$DOMAIN" = "domain.me" ]]; then
>     MSG="..."
>  elif [[ "$DOMAIN" = "domain.email" ]]; then
>     MSG="..."
>  fi
>
> Thanks for any suggestions.
>
> Cheers,
> Tony

https://wiki.dovecot.org/Plugins/Welcome

You can use the 'welcome_script = welcome %u' to do this, by changing it
to 'welcome_script = welcome %u %Ld' or maybe 'welcome_script = %Ln %Ln'?


More information about the dovecot mailing list