At least the problem with running the script.
Line 1 should not start with a #
I assume that is an artifact of how mouss pasted the script into the
message....
thanks
On 12/23/2012 12:09 AM, Robert Moskowitz wrote:
I have now made it past creating my cert, setting up mysql and
installing postfixadmin. I have even gotten a 'show columns' of all
the tables created in setup for postfixadmin. Next is setting up
postfix itself, which comes as the default mailer on Centos 6. So as
Centos comes with a main.cf file, I thought to try the script below to
get a 'feel' for things as I work out all the things that at least
this the tutorial I am starting with 'says' I need to do. First
understand then proceed; or some such.
But I had problems with the script. See below for this...
On 12/14/2012 05:01 PM, mouss wrote:
Le 14/12/2012 01:55, Robert Moskowitz a écrit :
On 12/13/2012 05:47 PM, Noel Jones wrote:
On 12/13/2012 4:17 PM, Robert Moskowitz wrote:
In the totorial:
http://www.campworld.net/thewiki/pmwiki.php/LinuxServersCentOS/Cent6VirtMailServer
There are modified postfix .cf files. I don't want to just use a
modified postfix file, I want to user postconf to do the
modifications. And I am not experienced using things like diff to
work out what changes were made from the base install files.
Can anyone lend some expertise in identifying the mods so I can work
this up as postconf commands?
Why? If you're just going to paste in changes it doesn't matter too
much if you paste in a pre-made .cf file or if you run a bunch of
postconf commands.
For the past 3 years I have been running with a setup based on:
http://www.howtoforge.com/virtual-users-and-domains-with-postfix-courier-mysql-and-squirrelmail-fedora-14-x86_64
Here the postfix changes are done via postconf, so I CAN tell what
changes are made and understand what is going on.
# postconf -d
shows default settings (builtin defaults).
# postconf -n
shows "local" settings.
that said, some "local" settings may use the same value as the default
config, which is mostly useless. on the url you posted, an example is
inet_interfaces = all, since this is the default:
# postconf -d inet_interfaces
inet_interfaces = all
so the setting is useless and can be removed from main.cf. same for
mydestination, alias_maps...
You can chase these with something like:
# postconf -n | while read parameter equal value; do
default_value=`postconf -d $parameter 2>&1`;
if [ "$value" = "$default_value" ]; then
echo "NOTICE: Useless setting: $parameter = $value";
fi;
done
I made a file with these 6 lines and did a chmod +x and ran it from
'su -' and got the following error:
line 6: syntax error near unexpected token 'done'
line 6: 'done'
I really have not written scripts for ~20 years, and even then I
followed templates. So please help me in getting this script
running. Thank you.
Such settings can be removed from main.cf.
(the "2>&1" will avoid "false positives" when a parameter is "unknown"
to 'postconf -d'...).
Better to learn why each line is there, and why. And most
important, if *you* need it.
Kind of my point. What changes is the author of the tutorial really
making so I can understand why.
http://www.postfix.org/documentation.html
http://www.postfix.org/STANDARD_CONFIGURATION_README.html
http://www.postfix.org/VIRTUAL_README.html
main.cf parameters and their defaults are documented here:
http://www.postfix.org/postconf.5.html
Generally, only parameters that differ from their default should be
included in your main.cf.
Again, what I want to get to. Understand what changes the author made
to the defaults. Looks like I will first have to learn how to
understand the output of diff.
do not blindly follow howotos/utorials/etc. better learn from the
official documentation. see Noel's postf for a few URLs. more on postfix
site.
A tutorial gives me a starting point, pointed toward my goal.
Understand the tutorial and then figure out if it is really what I
want and what else more or less I need to do.
you can also consider getting a copy of "the book of postfix".