Difference between pages "Linuxintro:About" and "Greylisting"

From Linuxintro
(Difference between pages)
imported>ThorstenStaerk
 
imported>ThorstenStaerk
 
Line 1: Line 1:
= What is it about =
+
There are different tools for greylisting.
After 8 years of practical Linux, I have some ideas how Linux documentation on the web should be. This is why I started this site. Here is what I think should apply to every tutorial on the web.
 
  
* There are no experts. Being an expert enables you to learn even more from a given text. As an expert, you read something and you find things that really "everyone should know".
+
= Postgrey =
* Be practical. When I searched for "use camcorders with Linux" in the web, I just wanted to know which application to start to connect my camcorder and transfer the video. One article I found was three pages long, started explaining that with Linux, everything is modular and thus better, then went on to a rant about Microsoft, explained how to compile a Linux 2.2 kernel so firewire works and ended with an explanation that Linux is better than Windows. It just forgot to mention which program to start. Always tell the program to start for a given application.
+
Postgrey is [[greyListing]] [[software]] for the [[postfix]] [[MTA]].
* fetch the reader from where he is. When I was teaching Linux, people were asking how to use <tt>ls</tt> to find the size of a directory. Now you cannot find this out with ls, you need to use du. But as long as you do not know du, you will not look it up. And as soon as you know du, you will not need to look it up, because you know it already. So, the consequence is, when writing a tutorial on <tt>ls</tt>, make a link to du in it, about like this:
 
To find out a directories' size, do not use ''ls'', but [[du]]
 
Also make a link to du into your article on ''directory''. Similar thing: You use ethtool to find out if a network cable is plugged into your network card. "Link detected = Yes" means there is a cable (with link), "Link detected = No" yet does not mean there is no cable. It can also mean the network card is not active. Tell the reader.
 
* Man pages are not enough. Or is there a man page "how_to_install_linux_on_a_usb_disk" and man how_to_use_a_camcorder_with_Linux and man how_to_setup_a_webcam_with_Linux?
 
** Man pages give you a fraud security to know something. Read e.g. [http://man-wiki.net/index.php/1:addr2line addr2line's] man page and tell me why addr2line /bin/bash 200 does not work. You cannot tell from the man page.
 
* Think out of the box. When I write a [[bash scripting tutorial]] I also explain [[wc]], [[grep]] and [[awk]] although these are - in an academic sense - not part of the [[bash]]. However, in practical life you cannot script bash well without knowing about how it interfaces with these tools.
 
* Wikipedia is not enough. Wikipedia says about itself it is not a tutorial.
 
  
= How was it done =
+
== How to get it ==
I used plain mediawiki software. Then I added the [http://jimbojw.com/wiki/index.php?title=ArticleComments_Extension ArticleComments extension], [http://code.google.com/apis/recaptcha/docs/mediawiki.html recaptcha extension] and the [http://www.mediawiki.org/wiki/Extension:Rating Rating extension]. Then I [http://www.linuxintro.org/wiki/Mediawiki#FaceBook_like_buttons added the FaceBook "like" buttons].
 
  
= Comments =
+
Download postgrey from http://postgrey.schweikert.ch/
<comments />{{:{{TALKSPACE}}:{{PAGENAME}}}}
+
 
 +
== How to set it up ==
 +
 
 +
* Extract your postgrey [[package]], e.g.:
 +
tar xvzf postgrey-1.32.tar.gz
 +
* install some needed packages
 +
yast -i perl-BerkeleyDB
 +
* Copy postgrey_whitelist_clients to /etc/postfix/
 +
* Copy postgrey_whitelist_recipients to /etc/postfix/
 +
* Add a user named postgrey:
 +
useradd -m postgrey
 +
* start postgrey
 +
./postgrey --inet 127.0.0.1:60000
 +
If you get an error, see ''TroubleShooting''.
 +
* make sure postgrey is listening on port 60000:
 +
<pre>
 +
$ nmap localhost -p59998-60002
 +
 
 +
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2007-08-10 07:44 CEST
 +
Interesting ports on lvps87-230-12-146.dedicated.hosteurope.de (127.0.0.1):
 +
PORT      STATE  SERVICE
 +
59998/tcp closed unknown
 +
59999/tcp closed unknown
 +
60000/tcp open  unknown
 +
60001/tcp closed unknown
 +
60002/tcp closed unknown
 +
 
 +
Nmap finished: 1 IP address (1 host up) scanned in 0.049 seconds
 +
</pre>
 +
* Make sure there is a line like this in /etc/postfix/main.cf:
 +
smtpd_recipient_restrictions = permit_mynetworks,
 +
                                permit_sasl_authenticated,
 +
                                reject_unauth_destination,
 +
                                check_policy_service  inet:127.0.0.1:60000
 +
* restart postfix
 +
/etc/init.d/postfix restart
 +
 
 +
= TroubleShooting =
 +
 
 +
'''Symptome:''' When starting postgrey, you get an error message
 +
Can't locate Net/Server.pm in @INC
 +
 
 +
'''Reason:''' Your perl is installed, but missing Net::Server
 +
 
 +
'''Solution:''' Install Net::Server via [[cpan]]:
 +
perl -mCPAN -e CPAN::Shell
 +
If you have never run CPAN before, you have to answer 25 questions now. Then issue:
 +
install Net::Server
 +
 
 +
= See also =
 +
 
 +
http://www.debuntu.org/postfix-and-postgrey-a-proactive-approach-to-spam-filtering

Revision as of 10:31, 12 October 2008

There are different tools for greylisting.

Postgrey

Postgrey is greyListing software for the postfix MTA.

How to get it

Download postgrey from http://postgrey.schweikert.ch/

How to set it up

  • Extract your postgrey package, e.g.:
tar xvzf postgrey-1.32.tar.gz
  • install some needed packages
yast -i perl-BerkeleyDB
  • Copy postgrey_whitelist_clients to /etc/postfix/
  • Copy postgrey_whitelist_recipients to /etc/postfix/
  • Add a user named postgrey:
useradd -m postgrey
  • start postgrey
./postgrey --inet 127.0.0.1:60000

If you get an error, see TroubleShooting.

  • make sure postgrey is listening on port 60000:
$ nmap localhost -p59998-60002

Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2007-08-10 07:44 CEST
Interesting ports on lvps87-230-12-146.dedicated.hosteurope.de (127.0.0.1):
PORT      STATE  SERVICE
59998/tcp closed unknown
59999/tcp closed unknown
60000/tcp open   unknown
60001/tcp closed unknown
60002/tcp closed unknown

Nmap finished: 1 IP address (1 host up) scanned in 0.049 seconds
  • Make sure there is a line like this in /etc/postfix/main.cf:
smtpd_recipient_restrictions = permit_mynetworks,
                                permit_sasl_authenticated,
                                reject_unauth_destination,
                                check_policy_service  inet:127.0.0.1:60000
  • restart postfix
/etc/init.d/postfix restart

TroubleShooting

Symptome: When starting postgrey, you get an error message

Can't locate Net/Server.pm in @INC 

Reason: Your perl is installed, but missing Net::Server

Solution: Install Net::Server via cpan:

perl -mCPAN -e CPAN::Shell

If you have never run CPAN before, you have to answer 25 questions now. Then issue:

install Net::Server

See also

http://www.debuntu.org/postfix-and-postgrey-a-proactive-approach-to-spam-filtering