FreeBSD-Postfix-MySQL-SpamAssassin-Maia-Virtual Setup

First, I would like to thank DrkShdw, Worth, and Fr0zen from ##FreeBSD on FreeNode for their time and ideas when it came down to me writing this tutorial/guide. So, thanks a ton, fellas! Now, on with it!
I wrote this tutorial because of the many, MANY times I’ve been asked about how to set up Postfix on a FreeBSD system. There are many great tutorials out there that can guide people through a Postfix setup. However, none of them are related to FreeBSD. So, I’ve decided to give it a go and here it is.
Note: Please be aware that there will be a lot more installed than actually concentrated on due to this tutorial utilizing the FreeBSD Ports System and installing any dependencies that a port may require to run efficiently.
Any questions or comments can be sent to the PHO Postfix Mailing Lists. Standard comments are welcome here on the site. However, there will be no replies via the comment pages. Also, it just seems more useful for others to be able to read questions and answers on the mailing lists. You can also join us for whatever reason you see fit on our PHO IRC Server. So, enjoy and please, please, PLEASE let me know if you run into any problems. How the hell am I to fix something if no one reports errors?
With the above being stated and you having still read to here, I’ll go ahead and assume that you’re going to follow this tutorial/guide. If so, please keep in mind that anything writen in BOLD, RED TEXT will be something that needs to be edited. Also, you should be sure that your FreeBSD Ports Tree is up-to-date. So, let’s get started, shall we? Use the links below to begin.

logo_postfixFirst, I would like to thank DrkShdw, Worth, and Fr0zen from ##FreeBSD on FreeNode for their time and ideas when it came down to me writing this tutorial/guide. So, thanks a ton, fellas! Now, on with it!

I wrote this tutorial because of the many, MANY times I’ve been asked about how to set up Postfix on a FreeBSD system. There are many great tutorials out there that can guide people through a Postfix setup. However, none of them are related to FreeBSD. So, I’ve decided to give it a go and here it is. Read the rest of this entry »

Squid2MySQL for FreeBSD 5.2 (08.07.2004 r)

What Squid2MySQL? This authorization, and accounting traffic users
Internet. There is a proxy-server Squid (http://www.squid-cache.org/)
and the database MySQL, (http://dev.mysql.com/)
Squid caching of information involved, and MySQL stores information about
user (name, password, URL and downloaded, etc.).
Binder link – it Squid2MySQL (http://evc.fromru.com/squid2mysql/download.html) 1.0.0
by Eugene V. Chernyshev for Linux.

For those who use Linux as the OS for servers – it will be better
Visit poster’s Squid2MySQL and use information from
Copyright (http://evc.fromru.com/squid2mysql/download.html) site.
I just ported squid2mysql under FreeBSD, and corrected a few errors
them were reported to the author for correspondence e-mail.

This article describes the stages and features of the installation of the corrected
version squid2mysql under FreeBSD.
Let’s go …

1) must be installed MySQL, Squid and Perl. Check
efficiency of these programs: go to MySQL, make a simple
request to table mysql; check Perl command perl-v; do not forget
do for Squid base command squid-z. Check the DNS team
nslookup host, if there will be problems with DNS, you will not run Squid.

2) Download the archive squid2mysql (http://www.uvsw.narod.ru/project/squid2mysql_v.tar.gz)
under FreeBSD (~ 600 Kb) and unpack

# Tar-zxvf squid2mysql_v.tar.gz

3) Go to the newly created directory squid2mysql_v. Go to the subdirectory
for_perl and install the modules for the Perl DBI-1.42.tar.gz and
Msql-Mysql-modules-1.2219.tar.gz or download the newer.

# Tar-zxvf DBI-1.42.tar.gz
# Cd DBI-1.42
# Perl Makefile.PL
# Make
# Make test
# Make install

analogous set module Msql-Mysql-modules-1.2219.tar.gz Read the rest of this entry »

Compiling the Kernel
After installing FreeBSD, compiling the kernel.

Via sysinstall:

# Sysinstall
Configure
Distributions
[x] src
[x] sys

# Cd / sys/i386/conf /
Hostname # cp GENERIC
Hostname # ee

Include at the end of file:

# firewall options IPFIREWALL
options IPFIREWALL_VERBOSE # enable logging to syslogd (8)
options IPFIREWALL_VERBOSE_LIMIT = 100 # limit verbosity
options IPFIREWALL_DEFAULT_TO_ACCEPT # allow everything by default
options IPFIREWALL_FORWARD # packet destination changes
IPFILTER options
IPFILTER_LOG options
options IPDIVERT # divert sockets
options IPSTEALTH # support for stealth forwarding
DUMMYNET options
options HZ = 1000
ALTQ options
options ALTQ_CBQ # Class Bases Queuing
options ALTQ_RED # Random Early Drop
options ALTQ_RIO # RED In / Out
# options ALTQ_HFSC Hierarchical Packet Scheduler
options ALTQ_CDNR # Traffic conditioner
options ALTQ_PRIQ # Priority Queuing
netgraph options
NETGRAPH_PPPOE options
NETGRAPH_SOCKET options
NETGRAPH_IFACE options
options BRIDGE

# Config SEUKERNEL
# Cd .. / compile / SEUKERNEL
# Make depend
# Make
# Make install
# Reboot

Update the ports
Update the ports before you begin installing the packages:

# Portsnap fetch extract

Installing PPPoE
Edit the file:

# Ee / etc / ppp / ppp.conf

Delete everything and paste the configs below:

Ppp.conf ######## ########
BEGIN ######### ##########
default:
set log Chat Command Phase # Enables the client logged.
# enable pap pap Enables authentication (password authentication protocol)
enable chap # Activate account CHAP (Challenge Handshake Authentication Protocol)
# enable echo Sending LCP echos (Check if the link is active)
# 5 September echoperiod Shipping time for each echo (After 5 failures the tun is disconnected)
allow mode direct # Turn on ppp bridging
enable proxy # Enables ppp proxyarping
# How to disable IPV6CP not use IPV6, we do not want their mistakes
September mru 1492 # Set the MRU below 1500
September mtu 1492 # Set the MRU below 1500
September ifaddr 192.168.1.1 192.168.1.2-192.168.1.100 # gateway and range of IPs
set speed sync #
set timeout 0 #
enable lqr #
accept dns # DNS accepted
September radius / etc / radius.conf # Active Radius and specifies where the connection file
END ########### ##########
Ppp.conf ######## ########

Edit / etc / radius.conf (create this file).

RADIUS.CONF ###### ######
BEGIN ######### #########
# # # # type # # # # server password # ######
auth localhost senharadius
acct localhost senharadius Read the rest of this entry »

How do I install bindgraph to make pretty query statistics about BIND servers?

Bindgraph was derived from well-known mailgraph package. It is a tool that makes pretty graphs about queries (such as A, MX, AAAA, TXT and so on) sent to your BIND name server. It will create graph for:
+ Last Hours Graph
+ Day Graph
+ Week Graph
+ Month Graph
+ Year Graph

There are two steps to create graphs:

a] You need enable query logging under bind by updating named.conf file itself. You can log queries to /var/log/query.log file.

b] Create bindgraph.rrd database by enabling bindgraph service.

Install bindgraph

Type the following commands:
# portsnap fetch update
# cd /usr/ports/dns/bindgraph
# make install clean

Configure BIND (named) logging

Open named.conf file, enter: Read the rest of this entry »

Hey this was really easy. Really, it is just a matter of aliasing your ls commands. However, it is only really easy if you know how to do it. When you forget, it is annoying. So here is another post to store the info I once knew but forgot and had to learn again.

Using sh, the default shell

  1. Edit your .shrc file in your home folder:
    # ee /usr/home/username/.shrc
  2. Add/Change the alias commands as follows:
    alias ls=’ls -G’
    alias ll=’ls -laFoG’
    alias l=’ls -lG’

    The first one I added, the second two I only added the -G parameter to the already existing aliases for ls.

  3. Save and close the file.
  4. Logout and login and your shell should have colors when you use ls.

Using bash

  1. Edit your .shrc file in your home folder:
    # ee /usr/home/username/.shrc
  2. Add/Change the alias commands as follows:
    alias ls=’ls -G’
    alias ll=’ls -laFoG’
    alias l=’ls -lG’

    The first one I added, the second two I only added the -G parameter to the already existing aliases for ls.

  3. Save and close the file.
  4. Copy the .profile file to .bash_profile.
    # cp /usr/home/username/.profile /usr/home/username/.bash_profile
  5. Edit the .bash_profile and add the following:
    # Source the .shrc
    source .shrc
  6. Logout and login and your bash shell should have colors when you use ls.

source here