Created
March 4, 2019 20:36
-
-
Save rikroe/a8de9e2c0581d5b4c8640f8196854995 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ $# = 2 ] | |
then | |
i=$2 | |
p=61902 # Change this - first free port | |
if [ $1 = "add" ] | |
then | |
echo Making links to $i in home directory... | |
echo "|/home/`whoami`/bin/qmail-lmtp $p 1" > ~/.qmail-$i | |
echo "|/home/`whoami`/bin/qmail-lmtp $p 1" > ~/.qmail-$i-admin | |
echo "|/home/`whoami`/bin/qmail-lmtp $p 1" > ~/.qmail-$i-bounces | |
echo "|/home/`whoami`/bin/qmail-lmtp $p 1" > ~/.qmail-$i-confirm | |
echo "|/home/`whoami`/bin/qmail-lmtp $p 1" > ~/.qmail-$i-join | |
echo "|/home/`whoami`/bin/qmail-lmtp $p 1" > ~/.qmail-$i-leave | |
echo "|/home/`whoami`/bin/qmail-lmtp $p 1" > ~/.qmail-$i-owner | |
echo "|/home/`whoami`/bin/qmail-lmtp $p 1" > ~/.qmail-$i-request | |
echo "|/home/`whoami`/bin/qmail-lmtp $p 1" > ~/.qmail-$i-subscribe | |
echo "|/home/`whoami`/bin/qmail-lmtp $p 1" > ~/.qmail-$i-unsubscribe | |
elif [ $1 = "del" ] | |
then | |
echo "Removing qmail files for $i" | |
rm ~/.qmail-$i | |
rm ~/.qmail-$i-* | |
else | |
echo "Unkown parameters. Usage: mailman3-list [add, del] listname" | |
fi | |
else | |
echo "Unkown parameters. Usage: mailman3-list [add, del] listname" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This shell script creates or deletes all necessary .qmail files for use with mailman3. Make sure to change
p
to your mailman's LMTP port and make the script executable!