Difference: SystemAdmin (1 vs. 5)

Revision 5
26 Apr 2015 - Main.ClifCox
Line: 1 to 1
 
META TOPICPARENT name="EugMakerSpace"

System Admin Notes

Line: 6 to 6
 

Basic Packages:

Here are some basic packages that we'll probably need.
Added:
>
>
apt-get install debian-archive-keyring less tcsh bzip2 zip unzip rsync rdate dnsutils whois pciutils aptitude
apt-get install sudo vim ssh telnet ftp

Apache:

 
Changed:
<
<
apt-get install debian-archive-keyring less tcsh bzip2 zip unzip rsync rdate dnsutils whois pciutils aptitude
apt-get install sudo vim ssh telnet ftp apache2 php5
>
>
Mostly we have to copy over the config, and temporary update it with the test domain name. The test domain name shouldn't appear anywhere else in any config file except where it's used as the actual domain name. If you have any filenames with this string in them, check that references to them don't appear in any of the config files.
apt-get -t testing install apache2 php5 libapache2-mod-fcgid
apt-get install javascript-common
rsync -Pav "eugenemakerspace.com:/etc/apache2" /etc

Here is where we update the domain names in the config files to work with the test domain. The pearl script has some extra possibly useful commented out lines in it and looks like this:
#! /usr/bin/perl -sni
# This Perl shell script replaces one or several patterns in a file with others.
# The patterns have to be hard coded.
# Called with a list of files to clean, it replaces them with clean contents.

# The only other thing it does is strip trailing white space

s/[ \t]+$//g; # Strip off trailing white space.

#s/\s*=\d+\s*$//g;
#s/^.*:webserver\s=\swww.//g;
# ... s/www.eugeneweb.com/amusher.org\s=\swww.//g;
s/eugenemakerspace\.com/newems.eugeneweb.com/g;
#s/ide_/ide-/g;
#s/(img\s*src=\s*\")([^\/\"]*\")/$1images\/$2/ig;
#s/(height=\"\d+\")>/$1 border="2">/ig;
#s/^\d+\s*$/\n/;
#s/^\d+ //;
#s/%(\d\d)?TWIKIWEB%(\d\d)?/System/g;
print;

Now we give it a list of files to fix up:

cd /etc/apache2
~clif/.bin/fixit sites-available/000-default.conf sites-available/eugenemakerspace.com sites-available/default-ssl.conf
/etc/init.d/apache2 stop
/etc/init.d/apache2 start
 

Postfix:

Usually you can just install the debian package but Posfix's home is: http://www.postfix.org/
Revision 4
25 Apr 2015 - Main.ClifCox
Line: 1 to 1
 
META TOPICPARENT name="EugMakerSpace"

System Admin Notes

Line: 6 to 6
 

Basic Packages:

Here are some basic packages that we'll probably need.
Changed:
<
<
apt-get install debian-archive-keyring less tcsh bzip2 zip unzip rsync rdate dnsutils whois pciutils aptitude
apt-get install sudo vim ssh telnet ftp apache2
>
>

apt-get install debian-archive-keyring less tcsh bzip2 zip unzip rsync rdate dnsutils whois pciutils aptitude
apt-get install sudo vim ssh telnet ftp apache2 php5
 

Postfix:

Usually you can just install the debian package but Posfix's home is: http://www.postfix.org/
Line: 243 to 211
  * ^TO_.*php-general@lists.nos.php.net | /home/FUDdata/scripts/maillist.php 1
Added:
>
>

Foswiki:

It seems to be missing from the main repos, so add this to your sources.list:
deb http://fosiki.com/Foswiki_debian/ stable main contrib
deb-src http://fosiki.com/Foswiki_debian/ stable main contrib

Then get their public key:
apt-key adv --keyserver the.earth.li --recv-keys 379393E0AAEE96F6

Get some extra packages:
apt-get install libapache2-mod-fcgid

Now Foswiki itself, and the old config files:
apt-get install foswiki
rsync -Pav eugenemakerspace.com:/etc/foswiki /etc

Then go to:

 http://newems.eugeneweb.com/foswiki/bin/configure
 Also see: http://foswiki.org/System/InstallationGuidePart1 
 and: http://foswiki.org/System/InstallationGuidePart2 
 BTW, the dataset is in /var/lib/foswiki

Copy over all the data:

First the custom webs we added:

rsync -Pav eugenemakerspace.com:/var/lib/foswiki/data/{Ism,Sandbox,Sites} /var/lib/foswiki/data
rsync -Pav  eugenemakerspace.com:/var/lib/foswiki/pub/{Ism,Sandbox,Sites} /var/lib/foswiki/pub

Then the users:
rsync -Pav --ignore-existing eugenemakerspace.com:/var/lib/foswiki/data/Main /var/lib/foswiki/data
rsync -Pav --ignore-existing eugenemakerspace.com:/var/lib/foswiki/pub/Main /var/lib/foswiki/pub

Copy over the password, and wikiusers files:
 
Added:
>
>
rsync -Pav "eugenemakerspace.com:/var/lib/foswiki/data/.htpasswd*" /var/lib/foswiki/data
rsync -Pav eugenemakerspace.com:/var/lib/foswiki/data/Main/WikiUsers.txt /var/lib/foswiki/data/Main
 

Mailing list <-> Forum notes:

WP Plugins:

Revision 3
24 Apr 2015 - Main.ClifCox
Line: 1 to 1
 
META TOPICPARENT name="EugMakerSpace"

System Admin Notes

Line: 23 to 23
 
home_mailbox = Maildir/  mail_spool_directory = /var/mail/efn.org/

You will probably want to copy the most recent postfix config dir over.
Added:
>
>
rsync -Pav eugenemakerspace.com:/etc/postfix /etc
 

Sometimes your Imap client and server can get out of sync on what folders or subfolders exist, which can generate a lot of errors. It's best to restart your client and re-read the folder list when this happens.

If you have a brand new account then courier package util maildirmake is good for creating an empty Maildir. eg,.
Revision 2
23 Apr 2015 - Main.ClifCox
Line: 1 to 1
 
META TOPICPARENT name="EugMakerSpace"

System Admin Notes

Added:
>
>

Basic Packages:

Here are some basic packages that we'll probably need.
apt-get install debian-archive-keyring less tcsh bzip2 zip unzip rsync rdate dnsutils whois pciutils aptitude
apt-get install sudo vim ssh telnet ftp apache2
 

Postfix:

Changed:
<
<
Usulally you can just install the debian package but Posfix's home is: http://www.postfix.org/
apt-get -t testing install postfix-tls postfix-mysql

>
>
Usually you can just install the debian package but Posfix's home is: http://www.postfix.org/

apt-get install postfix-pcre postfix-mysql procmail

 

Can postfix deliver to maildirs on it's own or does it need something like procmail to help? eg:
Line: 10 to 15
 

Can postfix deliver to maildirs on it's own or does it need something like procmail to help? eg:
Added:
>
>
 
mailbox_command = /usr/bin/procmail -a "$EXTENSION" DEFAULT=$HOME/Maildir/ MAILDIR=$HOME/Maildir
Changed:
<
<
BTW it ignores postfixes idea of where the maildirs are. You can either have local mail go into a users home or into the mail spool useing one of these options:
home_mailbox = Maildir/
 *mail_spool_directory = /var/mail/efn.org/* 
>
>
BTW it ignores postfixes idea of where the maildirs are. You can either have local mail go into a users home or into the mail spool using one of these options:

home_mailbox = Maildir/  mail_spool_directory = /var/mail/efn.org/

You will probably want to copy the most recent postfix config dir over.
 

Sometimes your Imap client and server can get out of sync on what folders or subfolders exist, which can generate a lot of errors. It's best to restart your client and re-read the folder list when this happens.

If you have a brand new account then courier package util maildirmake is good for creating an empty Maildir. eg,.
Added:
>
>
 
maildirmake ~shane/Maildir
chown -R shane.shane ~shane/Maildir/
Line: 32 to 43
 

imapd:# DEFDOMAIN="@example.com"
Changed:
<
<
Things to do:
Check on the realy domain mapings so that it works with postfixadmin.

Here is some info on stats for postfix:
http://www.postfix.org/addon.html#logfile
http://jimsun.linxnet.com/postfix_contrib.html
http://taz.net.au/postfix/mrtg/

Caveats:
Be carefull about adding values to new variables in Postfix because they often inharet from others before they're defined even from deprecated ones. for example virtual_alias_maps inherits from virtual_maps and if you don't copy it into virtual_alias_maps before you add the mailman stuff you will break your MTA.
When in doubt check a default value with something like:
>
>
Things to do:
Check on the realy domain mapings so that it works with postfixadmin.

Here is some info on stats for postfix:
http://www.postfix.org/addon.html#logfile
http://jimsun.linxnet.com/postfix_contrib.html
http://taz.net.au/postfix/mrtg/

Caveats:
Be careful about adding values to new variables in Postfix because they often inherit from others before they're defined even from deprecated ones. for example virtual_alias_maps inherits from virtual_maps and if you don't copy it into virtual_alias_maps before you add the mailman stuff you will break your MTA.
When in doubt check a default value with something like:
 
postconf [-d] | egrep virtual_alias_maps
Changed:
<
<
For the actuall or default value of a variable

Configureing notes and philosophys:
http://pantz.org/email/postfix/postfixconfigfiles.shtml
Check out Header_Checks also.
To find the current version do:
 *postconf mail_version* 
>
>
For the actuall or default value of a variable

Configuring notes and philosophies:
http://pantz.org/email/postfix/postfixconfigfiles.shtml
Check out Header_Checks also.
To find the current version do:

postconf mail_version
 

Mailman

Home: http://www.list.org/
Another: http://www.gnu.org/software/mailman/mailman.html
FAQ: http://www.python.org/cgi-bin/faqw-mm.py

First install the debian Mailman package. If you have an old version that you have modified you might need to remove it first to avoid errors.
Changed:
<
<
 *apt-get install mailman*

>
>

 apt-get install mailman

 

Mailman needs a so-called "site list", which is the list from which password reminders and such are sent out from. This list needs to be created before mailman will start. To create the list, run "newlist mailman" and follow the instructions on-screen. Note that you also need to start mailman after that, using /etc/init.d/mailman start. Now you can get to the main page from: http://eugeneweb.com/cgi-bin/mailman/listinfo

In case you want to access mailman thru a shorter URL you should add
something like the following to your webserver configuration (this
line is for apache):
In this case you need to set the DEFAULT_URL_PATTERN in /etc/mailman/mm_cfg.py to http://%s/mailman/ for the cookie authentication code to work. Note that you need to change the base URL for all the already-created lists as well.

In the past we had to keep the second line as well for some links that seem to have incorrect URLs, or at least from virtual domains, maybe we didn't catch all the previously created lists.

The public archives are located in /var/lib/mailman/archives/public,
you can create a symlink from /var/www if you like, or create an alias like
the following:
Changed:
<
<
 *Alias /pipermail/ /var/lib/mailman/archives/public/* 
>
>

Alias /pipermail/ /var/lib/mailman/archives/public/
 

You can also add these two to a virtual host config which enables access from that virtual host. Be sure to put them at the start of the list so that /cgi-bin/mailman/ is found before
/cgi-bin/.

Read /usr/share/doc/mailman/README.Debian.gz for more info. If you add these aliases you need to change DEFAULT_URL_PATTERN, and PRIVATE_ARCHIVE_URL here:
Also uncomment # MTA='Postfix' near the bottom. Read:
Changed:
<
<
 *zless /usr/share/doc/mailman/README.POSTFIX.gz* 
>
>

zless /usr/share/doc/mailman/README.POSTFIX.gz
 

Make some changes to /etc/postfix/main.cf, Here the lines to update/add:
Changed:
<
<
Be carefull about adding values to new variables in Postfix because they often inharet from others before they're defined even from deprecated ones. for example virtual_alias_maps inherits from virtual_maps and if you don't copy it into virtual_alias_maps before you add the mailman stuff you will break your MTA.

Add a patch to help with the list name collision problem:
See this post: http://mail.python.org/pipermail/mailman-developers/2005-January/017673.html
Get the modified Postfix.py:
and carefully edit the current Postfix.py here: /usr/lib/mailman/Mailman/MTA/Postfix.py
>
>
Be carefull about adding values to new variables in Postfix because they often inherit from others before they're defined even from deprecated ones. for example virtual_alias_maps inherits from virtual_maps and if you don't copy it into virtual_alias_maps before you add the mailman stuff you will break your MTA.

Add a patch to help with the list name collision problem:
See this post: http://mail.python.org/pipermail/mailman-developers/2005-January/017673.html
Get the modified Postfix.py:
and carefully edit the current Postfix.py here: /usr/lib/mailman/Mailman/MTA/Postfix.py
 
/usr/lib/mailman/Mailman/MTA//usr/lib/mailman/Mailman/MTA/PostfixVirtual.py /usr/lib/mailman/Mailman/MTA/Postfix.py
Changed:
<
<
It seems like it is still nessasary to add each virtual domain to:
 *add_virtualhost(), and POSTFIX_STYLE_VIRTUAL_DOMAINS* 
>
>
It seems like it is still necessary to add each virtual domain to:

add_virtualhost(), and POSTFIX_STYLE_VIRTUAL_DOMAINS

Also remove the restriction on changing the list name, find real_name near the end of the file
and change it like so:
Initialize the Aliases and Database, set the admin password
To add a new list do:
 
Deleted:
<
<
Also remove the restriction on changeing the list name, find real_name near the end of the file
and change it like so:
Initialize the Aliases and Database, set the admin password
To add a new list do:
 
newlist com.oregonlocations.mopantalk@oregonlocations.com talk@mopan.org
Changed:
<
<
When you change the default list name you will have to add it to privacy --> recipent filters too.

To remove one do:
>
>
When you change the default list name you will have to add it to privacy --> recipient filters too.

To remove one do:
 
rmlist -a com.oregonlocations.mopantalk
Changed:
<
<
To remove a message from the archive or the whole arcive see this:
http://wiki.list.org/pages/viewpage.action?pageId=4030681
>
>
To remove a message from the archive or the whole archive see this:
http://wiki.list.org/pages/viewpage.action?pageId=4030681
 
vi /var/lib/mailman/archives/private/com.eugenemakerspace.board.mbox/com.eugenemakerspace.board.mbox
mv /var/lib/mailman/archives/private/com.eugenemakerspace.board/ /var/lib/mailman/archives/private/com.eugenemakerspace.board.old/
/var/lib/mailman/bin/arch com.eugenemakerspace.board
Changed:
<
<
Importing lists from another server:

Copy list db in .../lists
Change the name to include the virtdomain prefix
Use check_db to check it.
Use config_list to update the old host_name(s) to the current one, otherwise the default is displayed.
also update the web_page_url var found with dumpdb but not listed with check_db, (though it can be
set with it).
Values to check: owner (listmgr@efn.nos.org) host_name, web_page_url
Use mmmove.pl to read the old /etc/aliases file and generate the new aliases and vitual files.
edit /etc/mailman/mm_cfg.py to add the virtual domain(s)
Copy the list archives
mv archives/private/listname to reverse virtualdomain.listname
mv archives/private/listname.mbox and .../listname.mbox to same.
Symlink from public to private.
Use bin/arch --wipe listname to rebuild the archives
Check / Set permissions

Removeing email address from archives:
Based on: http://jstsch.com/post/properly_hide_e-mail_addresses_in_mailman_archives

A quick patch-up solves things! Find HyperArch.py in your Mailman binaries dir and find the section which contains ARCHIVER_OBSCURES_EMAILADDRS. Change the try block into something like this:
>
>
Importing lists from another server:

Copy list db in .../lists
Change the name to include the virtdomain prefix
Use check_db to check it.
Use config_list to update the old host_name(s) to the current one, otherwise the default is displayed.
also update the web_page_url var found with dumpdb but not listed with check_db, (though it can be
set with it).
Values to check: owner (listmgr@efn.nos.org) host_name, web_page_url
Use mmmove.pl to read the old /etc/aliases file and generate the new aliases and vitual files.
edit /etc/mailman/mm_cfg.py to add the virtual domain(s)
Copy the list archives
mv archives/private/listname to reverse virtualdomain.listname
mv archives/private/listname.mbox and .../listname.mbox to same.
Symlink from public to private.
Use bin/arch --wipe listname to rebuild the archives
Check / Set permissions

Removing email address from archives:
Based on: http://jstsch.com/post/properly_hide_e-mail_addresses_in_mailman_archives

A quick patch-up solves things! Find HyperArch.py in your Mailman binaries dir and find the section which contains ARCHIVER_OBSCURES_EMAILADDRS. Change the try block into something like this:
 
vi /usr/lib/mailman/Mailman/Archiver/HyperArch.py

               if self.author == self.email:

 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback