Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
So i've a file containing all check to add (spam-server.txt) and what i was supposed to do is something like
Code:
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:
i want a list in a text file becouse we are an isp provider, we have a lot of computers in housing and many customers have an "home mail server" so the idea is:
- create a text file contains rules
- do a script that download this file in each client once a day, read it and modify main.cf if any changes are done to the original one, restart postfix program
- add script to any client crontab
so , becouse it happens that sometimes we change this parameters, changing simple one file in our server any client will download the new one and upgrade itself.
I wasn't clear enough. The main.cf.template file that I suggest you copy to main.cf and then append to, would NOT contain the smtpd_client_restrictions entry - it would contain everything except that.
I wasn't clear enough. The main.cf.template file that I suggest you copy to main.cf and then append to, would NOT contain the smtpd_client_restrictions entry - it would contain everything except that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.