May 102016

required: inotify-tools

first create this bash script, let’s name it as

while true; do
	inotifywait -e modify /etc/postfix/transport
	postmap hash:/etc/postfix/transport

make it executable

chmod 755

run the script

./ > /dev/null 2>&1&

this script will stay on background proccess.

try modify transport file smtp:[x.x.x.x]:25 smtp:[x.x.x.x]:25

save it, and test it

postmap -q hash:/etc/postfix/transport


 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>