Tuesday, October 26, 2010

transparent proxy (useful if you have a kid who loves world of warcraft)
http://www.dd-wrt.com/wiki/index.php/Squid_Transparent_Proxy#Router_Setup

Friday, October 22, 2010

Server step 6

aptitude install dk-filter pyzor razor
cpan -i Mail::DomainKeys

Thursday, October 21, 2010

Server steps 5

These proliants (mine DL140) supposedly had some management tools in old days
Some links

Script for HP ASM
HP Support manual
HP collection for DL140

Server step 4

Time to move old mail to the new server

root@proliant:# aptitude install imapsync

root@proliant:# imapsync --host1 mail --user1 user --passfile1 secret1 --host2 localhost --user2 user --passfile2 secret1 --delete2 --noauthmd5

And don't forget to create password file secret1

That should take a while

Server steps 3

This is the server, huh
root@proliant:/home/# aptitude install sendmail uw-imapd clamav-daemon mimedefang squirrelmail imapsync uw-mailutils

click to see code



root@proliant:/ cat /etc/mail/sendmail.mc
divert(-1)dnl
#-----------------------------------------------------------------------------
# $Sendmail: debproto.mc,v 8.14.3 2010-08-03 06:56:05 cowboy Exp $
#
# Copyright (c) 1998-2009 Richard Nelson. All Rights Reserved.
#
# cf/debian/sendmail.mc. Generated from sendmail.mc.in by configure.
#
# sendmail.mc prototype config file for building Sendmail 8.14.3
#
# Note: the .in file supports 8.7.6 - 9.0.0, but the generated
# file is customized to the version noted above.
#
# This file is used to configure Sendmail for use with Debian systems.
#
# If you modify this file, you will have to regenerate /etc/mail/sendmail.cf
# by running this file through the m4 preprocessor via one of the following:
# * make (or make -C /etc/mail)
# * sendmailconfig
# * m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
# The first two options are preferred as they will also update other files
# that depend upon the contents of this file.
#
# The best documentation for this .mc file is:
# /usr/share/doc/sendmail-doc/cf.README.gz
#
#-----------------------------------------------------------------------------
divert(0)dnl
#
# Copyright (c) 1998-2005 Richard Nelson. All Rights Reserved.
#
# This file is used to configure Sendmail for use with Debian systems.
#
define(`_USE_ETC_MAIL_')dnl
include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
include(`/etc/mail/sasl/sasl.m4')dnl
VERSIONID(`$Id: sendmail.mc, v 8.14.3-9.2ubuntu1 2010-08-03 06:56:05 cowboy Exp $')
OSTYPE(`debian')dnl
DOMAIN(`debian-mta')dnl
dnl # Items controlled by /etc/mail/sendmail.conf - DO NOT TOUCH HERE
undefine(`confHOST_STATUS_DIRECTORY')dnl #DAEMON_HOSTSTATS=
dnl # Items controlled by /etc/mail/sendmail.conf - DO NOT TOUCH HERE
dnl #
dnl # General defines
dnl #
dnl # SAFE_FILE_ENV: [undefined] If set, sendmail will do a chroot()
dnl # into this directory before writing files.
dnl # If *all* your user accounts are under /home then use that
dnl # instead - it will prevent any writes outside of /home !
dnl # define(`confSAFE_FILE_ENV', `')dnl
dnl #
dnl # Daemon options - restrict to servicing LOCALHOST ONLY !!!
dnl # Remove `, Addr=' clauses to receive from any interface
dnl # If you want to support IPv6, switch the commented/uncommentd lines
dnl #
FEATURE(`no_default_msa')dnl
dnl DAEMON_OPTIONS(`Family=inet6, Name=MTA-v6, Port=smtp, Addr=::1')dnl
DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp')dnl
dnl DAEMON_OPTIONS(`Family=inet6, Name=MSP-v6, Port=submission, M=Ea, Addr=::1')dnl
DAEMON_OPTIONS(`Family=inet, Name=MSP-v4, Port=submission, M=Ea')dnl
dnl #
dnl # Be somewhat anal in what we allow
define(`confPRIVACY_FLAGS',dnl
`needmailhelo,needexpnhelo,needvrfyhelo,restrictqrun,restrictexpand,nobodyreturn,authwarnings')dnl
dnl #
dnl # Define connection throttling and window length
define(`confCONNECTION_RATE_THROTTLE', `15')dnl
define(`confCONNECTION_RATE_WINDOW_SIZE',`10m')dnl
dnl #
dnl # Features
dnl #
dnl # use /etc/mail/local-host-names
FEATURE(`use_cw_file')dnl
dnl #
dnl # The access db is the basis for most of sendmail's checking
FEATURE(`access_db', , `skip')dnl
dnl #
dnl # The greet_pause feature stops some automail bots - but check the
dnl # provided access db for details on excluding localhosts...
FEATURE(`greet_pause', `1000')dnl 1 seconds
dnl #
dnl # Delay_checks allows sender<->recipient checking
FEATURE(`delay_checks', `friend', `n')dnl
dnl #
dnl # If we get too many bad recipients, slow things down...
define(`confBAD_RCPT_THROTTLE',`3')dnl
dnl #
dnl # Stop connections that overflow our concurrent and time connection rates
FEATURE(`conncontrol', `nodelay', `terminate')dnl
FEATURE(`ratecontrol', `nodelay', `terminate')dnl
dnl #
dnl # My stuff
define(`SMART_HOST',`smtp.comcast.net')dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
FEATURE(local_procmail,`',`procmail -p -t -Y -a $h -d $u')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
FEATURE(`authinfo',`hash /etc/mail/authinfo')dnl
define(`confDEF_AUTH_INFO', `/etc/mail/auth/auth-info')dnl
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl #
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
EXPOSED_USER(`root')dnl
MASQUERADE_AS(`podolski.org')dnl
MASQUERADE_DOMAIN(`podolski.org')dnl
FEATURE(masquerade_entire_domain)dnl
FEATURE(masquerade_envelope)dnl
dnl #
define(`confMILTER_MACROS_ENVFROM', ``i, {auth_type}, {auth_uthen}, {auth_ssf}, {auth_author}, {mail_mailer}, {mail_host}, {mail_addr}, {md_tag}, {rcpt_mailer}, {rcpt_host}, {rcpt_addr}, {msg_size}'')dnl
define(`confMILTER_LOG_LEVEL',`6')dnl
define(_NEED_MACRO_MAP_,1)dnl
INPUT_MAIL_FILTER(`mimedefang', `S=unix:/var/spool/MIMEDefang/mimedefang.sock, F=T, T=S:15m;R:15m;E:15m')dnl
dnl # End of stuff
dnl #
dnl # If you're on a dialup link, you should enable this - so sendmail
dnl # will not bring up the link (it will queue mail for later)
dnl define(`confCON_EXPENSIVE',`True')dnl
dnl #
dnl # Dialup/LAN connection overrides
dnl #
include(`/etc/mail/m4/dialup.m4')dnl
include(`/etc/mail/m4/provider.m4')dnl
dnl #
dnl # Default Mailer setup
MAILER_DEFINITIONS
MAILER(`procmail')dnl
MAILER(`smtp')dnl



Server steps 2

root@proliant:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.13
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

auto eth1
iface eth1 inet dhcp

root@proliant:~# apt-get install aptitude
root@proliant:~# aptitude install openssh-server

Now I can sit in something comfortable and o the rest remotely



Server steps

First it has the PXE and doesnt have cdrom. For some reason it doesnt want to boot from stick. OK, I have PXE, right?

On the second server (Gentoo in that case):
tftpd, dhcpd, nfs. Can not get server install working but desktop is ok. So it will be desktop, just sitting in some remote place, can not tolerate taking off turbo jet.

Got new server.

DL140. It is actually turbo jet going from runway. Just small. But loud. Hopefully it is powerful the way it is loud.

So it is going to be ubuntu 10.10

Sunday, October 17, 2010

Tuesday, October 5, 2010

Nobel H.A.M.S.T.E.R.

Two russian guys scooped Nobel prize. The article is from some early publications. Look at the list of authors.