postlogin script

Michael Fox news at mefox.org
Sun Dec 11 16:47:56 UTC 2016


I'm using the postlogin service, following the examples in the wiki.  But I
can't find any documentation on the behavior (what's allowed/not allowed) of
the script-login binary.  So, some questions:

 

Question 1:

The examples show the following at the end of the post-login.sh script:
exec "$@"

My understanding is that this would exec each of the command line arguments
to the post-login.sh script.  But, there are no arguments sent to the
post-login.sh script in the examples.  So what is this line supposed to do?

 

Question 2:

One of the examples shows exporting some environmental variables, followed
by the above exec line:

    export MAIL=maildir:/tmp/test

    export USERDB_KEYS="$USERDB_KEYS mail"

    exec "$@"

Now, I'm really confused.  Can someone explain step-by-step why this does
anything at all?

 

Question 3:

I'd like to be able to pass some information to the post-login.sh script,
such as the service (%s), as a positional parameter.  

For example:  executable = script-login /path/post-login.sh %Ls

Or even more explicitly:  executable = script-login /path/post-login.sh imap

But it appears that the script-login binary is expecting only script names
to be passed to it so that it can handle more than one script.  Is there a
way to pass arguments to the different scripts?

 

Thanks,

Michael

 

 

 

 

 



More information about the dovecot mailing list