/usr/share/whereami/actions/masqmail_route is in whereami 0.3.34-0.4.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #!/bin/sh
#
# $Id: masqmail_route,v 1.3 2002/11/01 22:05:29 andrew Exp $
#
# Integration (well sort of :-) of whereami with masqmail.
#
# This script looks at the masqmail configuration of the online
# file (usually "/tmp/connect_route") and removes it. If one of
# our current locations matches a location for which masqmail
# is configured then we create a new file with that location.
#
# whereami sets the list of locations to be comma-separated - possibly a mistake!
LOCATIONS="`echo ${LOCATION} | tr ',' ' '`"
# Work out what masqmail has specified for the notification file
ONLINE_FILE="`grep "^online_file *=" /etc/masqmail/masqmail.conf | cut -f2 -d= | tr -d \\"\\ `"
# Remove any existing indications of which location we should use
rm -f ${ONLINE_FILE}
for LOCN in ${LOCATIONS} ; do
if grep "^connect_route.${LOCN} *=" /etc/masqmail/masqmail.conf >/dev/null ; then
logger -t whereami -i "Setting masqmail route in ${ONLINE_FILE} to \"${LOCN}\""
echo "${LOCN}" > ${ONLINE_FILE}
# We exit on the first success
exit 0;
fi
done
|