Welcome plugin - user and domain vars?

Tony tony at kode.email
Tue Jul 31 06:07:26 EEST 2018


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


More information about the dovecot mailing list