I wrote a python script that runs through our Active Directory to get a list of email addresses to use for postfix's relay recipients map. My python script works correctly, however my cron job is not. To be exact, postmap will not run. Heres the script I'm using for my cron job.
Code:
#!/bin/sh
python /opt/postfix_cah/postfix_relay.py > /dev/null 2>&1
cd /etc/postfix
postmap relay_recipients
And my crontab
Code:
# Synchronize relay recipients from Active Directory
*/10 * * * * /opt/postfix_cah/relay.sh
I added that as root with "crontab -e". Heres the thing, if I run the script manually the postmap part will work which leads me to believe its some sort of permission issue. Any help