Hi all linux gurus,
i'm a little newbie in linux yet, but i'm trying to configure a script that allow simply modifing a text file (we'll call it spam-server.txt) to change the /etc/postfix/mainf.cf
I know that some could be modified by "postconf -e" command, but, perhaps, not my case, 'couse i'm trying to modify "smtpd_recipient_restrictions" line to add a series of checks. Tryed this
postconf -e 'smtpd_recipient_restrictions= `cat spam-server.txt`'
wrong result ...
So i've a file containing all check to add (spam-server.txt) and what i was supposed to do is something like
sed 's/,permit/`cat spam-server.txt`&/g' /testing/main.cf > /testing/main.cf.new
so the sed command search for ",permit" line and add before the spam-server.txt text.... or maybe, this is what i supposed it could do... but when i go searching in /testing/main.cf.net can find only this line:
smtpd_recipient_restrictions = `cat spam-server.txt`,permit
surely something missundertanding... can someone help me?
PS: sorry newbie question