History of postmax

!1. Software Install
{code source="bash"}yum install postfix spamassassin amavisd-new clamav
chkconfig postfix on
chkconfig clamd on
chkconfig freshclam on
chkconfig amavisd on
chkconfig amavis on{/code}

!2. Anti-Virus Configuration
Tweak __/etc/amavisd.conf__
SpamAssassin settings are made in this file. Also, make sure $inet_socket_port = 10024;

{code souce="bash"}/etc/init.d/clamd start
service amavisd start
service amavis start
# If you are behind a proxy, you need adjust /etc/freshclam.conf
freshclam
freshclam start{/code}

postconf -e 'content_filter = amavis:[127.0.0.1]:10024'
postconf -e 'receive_override_options = no_address_mappings'

Append these lines to __/etc/postfix/master.cf__
{code source="text"}amavis unix - - - - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
127.0.0.1:10025 inet n - - - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
-o smtpd_bind_address=127.0.0.1{/code}

!3. Test Setup
Use telnet to see if the appropriate ports are open:

telnet yourhost.com 25
telnet localhost 3310
telnet localhost 10025
telnet localhost 10024

!4. Spam Denial
!!__[http://tqmcube.com/rbldnsd.php|RBLDNSD]__
This is a local DNS server database that performs local (e.g. FAST) DNS lookups against a list of dynamic and blacklisted IP's. Successful local lookup means it's on the blacklist and will be rejected.

#Install the rbldns RPM (available in Fedora Extras, or [http://www.corpit.ru/mjt/rbldnsd.html|source])
#Edit your __named.conf__ and add:{code source="txt"}
zone "clients.blocked.rbl" IN {
type forward;
forward first;
forwarders { 127.0.0.1 port 530; };
};
zone "hosts.blocked.rbl" IN {
type forward;
forward first;
forwarders { 127.0.0.1 port 530; };
};{/code}
#Edit __/etc/sysconfig/rbldnsd__ and add the following lines:{code source="txt"}RBLDNSD="dsbl -r/var/lib/rbldnsd -b 127.0.0.1/530 \
clients.blocked.rbl:ip4set:clients,dynamic \
hosts.blocked.rbl:dnset:hosts \
"{code}
#Get the [http://tqmcube.com/files/dnsbl_lists.tar.bz2|latest RBLDNS databases] and move database files to /var/lib/rbldnsd
# Gentlepeople, start your daemons: "service restart named; service restart rbldnsd;" Test with telnet localhost 53; and telnet locahost 530;
# Preform a test lookup:{code source="text"}
$dig @localhost 223.61.83.162.clients.blocked.rbl -t txt
;; ANSWER SECTION:
223.61.83.162.clients.blocked.rbl. 2048 IN TXT "DNSBL. 162.83.61.223 is a known spam source. Mail from 162.83.61.223 is NOT accepted on this server!"
{/code}
# Update the following line of your __/etc/postfix/main.cf__{code source="txt"}
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination,reject_rbl_client clients.blocked.rbl,reject_rhsbl_client hosts.blocked.rbl,reject_rhsbl_sender hosts.blocked.rbl{/code}

__En-masse IP Block__ Here is a tutorial for [http://www.fadden.com/techmisc/asian-spam.htm|Blocking E-mail from China and Korea] using Postfix and the [http://okean.com/asianspamblocks.html|Okean CIDR Blocks]

!5. Other tutorails
[http://devnull.com/kyler/dspam.20040512.html]
[http://howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-mandriva2008.1-p3]
Page History
Date/CommentUserIPVersion
30 May 2008 (11:33 UTC)
spamassassin sa-update
spiderr66.194.217.22351
Current • Source
spiderr66.194.217.22350
View • Compare • Difference • Source
spiderr66.194.217.22249
View • Compare • Difference • Source
spiderr66.194.217.22248
View • Compare • Difference • Source
spiderr66.194.217.22247
View • Compare • Difference • Source
spiderr66.194.217.22146
View • Compare • Difference • Source
spiderr66.194.217.22145
View • Compare • Difference • Source
spiderr66.194.217.22343
View • Compare • Difference • Source
spiderr66.194.217.22240
View • Compare • Difference • Source
spiderr66.194.217.22337
View • Compare • Difference • Source
spiderr66.194.217.22335
View • Compare • Difference • Source
spiderr66.194.217.22233
View • Compare • Difference • Source
spiderr66.194.217.22232
View • Compare • Difference • Source
spiderr66.194.217.22331
View • Compare • Difference • Source
spiderr66.194.217.22128
View • Compare • Difference • Source
spiderr66.194.217.22227
View • Compare • Difference • Source
spiderr66.194.217.22224
View • Compare • Difference • Source
spiderr66.194.217.22123
View • Compare • Difference • Source
spiderr66.194.217.22120
View • Compare • Difference • Source
spiderr69.134.60.20414
View • Compare • Difference • Source
spiderr66.194.217.2211
View • Compare • Difference • Source