postlogin script - still confused

Michael Fox news at mefox.org
Sun Dec 25 22:57:21 UTC 2016


> You need to use executable = script-login -- /path/post-login.sh -a -r -g
> note the double-dash. it tells getopt to stop processing arguments.
>
> Aki

OK. Thanks.  So let me make sure I have this right, since there is no syntax
defined on the wiki - just an example which doesn't show the above syntax.

The valid possibilities are:

  executable = script-login [-d] /path/script1 /path/script2 ...
-or-
  executable = script-login [-d] -- /path/script1 -a -r -g -s

In other words, I can either call multiple scripts, each with no arguments,
or I can call one script with arguments.  But I cannot call multiple
scripts, some with arguments, some without arguments.  Is that correct?  If
not, please show all valid syntax options.


Also, regarding the exec "$@" line shown at the end of the wiki examples.

If I pass arguments "-a -r -g -s" to my script, as in:
  executable = script-login -- /path/script1 -a -r -g -s

then doesn't the exec "$@" line at the end become:
  exec -a -r -g -s

And surely that's not right.  So, could you please explain in words the
purpose of the exec line at the end - what it does, why it's needed, and
what to do if I'm sending arguments to my postlogin script?

Thanks,
Michael





More information about the dovecot mailing list