Hi, I'm trying to get messages sent to an alias to invoke a ruby script.
Looking at the postfix log the message is being delivered, but I believe the script isn't being run with sufficient permissions.
The script is really simple:Jun 3 18:31:21 hostname postfix/local[12968]: 340B911A3B4: to=<email@domain.com>, relay=local, delay=0.24, delays=0.2/0.01/0/0.03, dsn=2.0.0, status=sent (delivered to command: /var/mailscripts/script)
It should just write the message to myfile. I'm not exactly sure what user/group postfix runs under, and I believe this is the heart of my problem.Code:#!/usr/bin/env ruby1.9 text = ARGV[0] puts `echo "#{text}" >> /var/mailscripts/myfile`
Bookmarks