Ed Greenberg
New Pleskian
One of the things we have found is that users who forward to their gmail tend to forward a lot of spam. We wound up on lots of blacklists that way. One of the things we did that seems to have made a big difference is to run outgoing mail through spamassassin. The recipe I found wasn't for a plesk server, so after moving things around, this is what we do:
install spamassassin using plesk autoinstaller
yum -y install clamd clamav-db clamav amavisd-new perl-Error
Set Amavisd-new to start after reboot and start Amavisd-new:
chkconfig amavisd on
service amavisd start
Set ClamAV to start after reboot and start ClamAV:
chkconfig clamd.amavisd on
service clamd.amavisd start
Set Postfix to use amavids on port 10024:
edit /etc/postfix/main.cf
add after other parameters add:
#use amavisd as filter on port 10024
content_filter=amavisfeed:[127.0.0.1]:10024
Edit Postfix configuration file:
edit /etc/postfix/master.cf
Add the following lines at the bottom of the file to connect Postfix to Amavisd-new (explanation and updates found in /usr/share/doc/amavisd-new-2.6.4/README_FILES/README.postfix):
amavisfeed unix - - n - 2 lmtp
-o lmtp_data_done_timeout=1200
-o lmtp_send_xforward_command=yes
-o lmtp_tls_note_starttls_offer=no
127.0.0.1:10025 inet n - n - - smtpd
-o content_filter=
-o smtpd_delay_reject=no
-o smtpd_client_restrictions=permit_mynetworks,reject
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o smtpd_data_restrictions=reject_unauth_pipelining
-o smtpd_end_of_data_restrictions=
-o smtpd_restriction_classes=
-o mynetworks=127.0.0.0/8
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o smtpd_client_connection_count_limit=0
-o smtpd_client_connection_rate_limit=0
-o receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_milters
-o local_header_rewrite_clients=
-o smtpd_milters=
-o local_recipient_maps=
-o relay_recipient_maps=
reload postfix to get the change:
service postfix reload
install spamassassin using plesk autoinstaller
yum -y install clamd clamav-db clamav amavisd-new perl-Error
Set Amavisd-new to start after reboot and start Amavisd-new:
chkconfig amavisd on
service amavisd start
Set ClamAV to start after reboot and start ClamAV:
chkconfig clamd.amavisd on
service clamd.amavisd start
Set Postfix to use amavids on port 10024:
edit /etc/postfix/main.cf
add after other parameters add:
#use amavisd as filter on port 10024
content_filter=amavisfeed:[127.0.0.1]:10024
Edit Postfix configuration file:
edit /etc/postfix/master.cf
Add the following lines at the bottom of the file to connect Postfix to Amavisd-new (explanation and updates found in /usr/share/doc/amavisd-new-2.6.4/README_FILES/README.postfix):
amavisfeed unix - - n - 2 lmtp
-o lmtp_data_done_timeout=1200
-o lmtp_send_xforward_command=yes
-o lmtp_tls_note_starttls_offer=no
127.0.0.1:10025 inet n - n - - smtpd
-o content_filter=
-o smtpd_delay_reject=no
-o smtpd_client_restrictions=permit_mynetworks,reject
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o smtpd_data_restrictions=reject_unauth_pipelining
-o smtpd_end_of_data_restrictions=
-o smtpd_restriction_classes=
-o mynetworks=127.0.0.0/8
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o smtpd_client_connection_count_limit=0
-o smtpd_client_connection_rate_limit=0
-o receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_milters
-o local_header_rewrite_clients=
-o smtpd_milters=
-o local_recipient_maps=
-o relay_recipient_maps=
reload postfix to get the change:
service postfix reload