<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://kb.rvmgroup.it/index.php?action=history&amp;feed=atom&amp;title=Migliorare_la_configurazione_antispam_di_postfix</id>
	<title>Migliorare la configurazione antispam di postfix - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://kb.rvmgroup.it/index.php?action=history&amp;feed=atom&amp;title=Migliorare_la_configurazione_antispam_di_postfix"/>
	<link rel="alternate" type="text/html" href="https://kb.rvmgroup.it/index.php?title=Migliorare_la_configurazione_antispam_di_postfix&amp;action=history"/>
	<updated>2026-05-10T04:12:47Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://kb.rvmgroup.it/index.php?title=Migliorare_la_configurazione_antispam_di_postfix&amp;diff=7314&amp;oldid=prev</id>
		<title>Gabriele.vivinetto at 08:04, 5 November 2010</title>
		<link rel="alternate" type="text/html" href="https://kb.rvmgroup.it/index.php?title=Migliorare_la_configurazione_antispam_di_postfix&amp;diff=7314&amp;oldid=prev"/>
		<updated>2010-11-05T08:04:38Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:04, 5 November 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Stub}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Stub}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Riferimenti da Verificare==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [http://www200.pair.com/mecham/spam/additional_settings_v2.html Additional Anti-UCE settings]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [http://www.ebb.org/bkuhn/blog/2008/01/09/postfix-secondary-mx-local-deliver.html Postfix Trick to Force Secondary MX to Deliver Locally]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [http://www.freespamfilter.org/FC4.html How to install Postfix, Amavisd-new, SpamAssassin, Pyzor, Rzor, DCC, and ClamAV on Fedora Core 4 v2.1.8]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*[http://doc.sumy.ua/network/postfix/faq.html#virtual_setup Postfix Frequently Asked Questions]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*[http://www.postfix.org/ADDRESS_VERIFICATION_README.html Postfix Address Verification]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*[http://doc.sumy.ua/network/postfix/faq.html Postfix Frequently Asked Questions:Postfix accepts mail for non-existing local users]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*[http://www200.pair.com/mecham/spam/amavisd-settings.html Amavisd-new critical settings]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* http://jimsun.linxnet.com/misc/postfix-anti-UCE.txt&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Postfix is free and powerful MTA. You can easily configure Postfix to block spam. You need to add&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Postfix is free and powerful MTA. You can easily configure Postfix to block spam. You need to add&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Gabriele.vivinetto</name></author>
	</entry>
	<entry>
		<id>https://kb.rvmgroup.it/index.php?title=Migliorare_la_configurazione_antispam_di_postfix&amp;diff=5673&amp;oldid=prev</id>
		<title>10.0.254.3: New page: {{Stub}}  Postfix is free and powerful MTA. You can easily configure Postfix to block spam. You need to add following directives to /etc/postfix/main.cf file:  *=&gt; disable_vrfy_command = y...</title>
		<link rel="alternate" type="text/html" href="https://kb.rvmgroup.it/index.php?title=Migliorare_la_configurazione_antispam_di_postfix&amp;diff=5673&amp;oldid=prev"/>
		<updated>2008-04-01T13:44:54Z</updated>

		<summary type="html">&lt;p&gt;New page: {{Stub}}  Postfix is free and powerful MTA. You can easily configure Postfix to block spam. You need to add following directives to /etc/postfix/main.cf file:  *=&amp;gt; disable_vrfy_command = y...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
Postfix is free and powerful MTA. You can easily configure Postfix to block spam. You need to add&lt;br /&gt;
following directives to /etc/postfix/main.cf file:&lt;br /&gt;
&lt;br /&gt;
*=&amp;gt; disable_vrfy_command = yes : Disable the SMTP VRFY command. This stops some techniques used to harvest email addresses.&lt;br /&gt;
&lt;br /&gt;
*=&amp;gt; smtpd_delay_reject = yes : It allows Postfix to log recipient address information when rejecting a client name/address or sender address, so that it is possible to find out whose mail is being rejected.&lt;br /&gt;
&lt;br /&gt;
*=&amp;gt; smtpd_helo_required = yes : Require that a remote SMTP client introduces itself at the beginning of an SMTP session with the HELO or EHLO command. Many spam bot ignores HELO/EHLO command and you save yourself from spam. &lt;br /&gt;
&lt;br /&gt;
Following lines further restrictions on HELO command:&lt;br /&gt;
*smtpd_helo_restrictions = permit_mynetworks,&lt;br /&gt;
*reject_non_fqdn_hostname, Reject email if remote hostname is not in fully-qualified domain form. Usually bots *sending email don’t have FQDN names.&lt;br /&gt;
*reject_invalid_hostname, Reject all bots sending email from computers connected via DSL/ADSL computers. They don’t have valid internet hostname.&lt;br /&gt;
&lt;br /&gt;
You can put the following access restrictions that the Postfix SMTP server applies in the context of the RCPT TO command.&lt;br /&gt;
*=&amp;gt; smtpd_recipient_restrictions =&lt;br /&gt;
 reject_invalid_hostname, - Reject email if it not valid hostname&lt;br /&gt;
 reject_non_fqdn_hostname, - Reject email if it not valid FQDN&lt;br /&gt;
 reject_non_fqdn_sender, - Reject the request when the MAIL FROM address is not in fully-qualified domain form.  For example email send from xyz or abc is rejected.&lt;br /&gt;
 reject_non_fqdn_recipient, - Reject the request when the RCPT TO address is not in fully-qualified domain form&lt;br /&gt;
 reject_unknown_sender_domain, - Reject email, if sender domain does not exists&lt;br /&gt;
 reject_unknown_recipient_domain, Reject email, if recipient domain does not exists&lt;br /&gt;
 permit_mynetworks,&lt;br /&gt;
 reject_rbl_client list.dsbl.org, Configure spam black lists&lt;br /&gt;
 reject_rbl_client sbl.spamhaus.org,&lt;br /&gt;
 reject_rbl_client cbl.abuseat.org,&lt;br /&gt;
 reject_rbl_client dul.dnsbl.sorbs.net&lt;br /&gt;
&lt;br /&gt;
Open /etc/postfix/main.cf file :&lt;br /&gt;
 # vi /etc/postfix/main.cf&lt;br /&gt;
Set/modify configuration as follows&lt;br /&gt;
&lt;br /&gt;
 disable_vrfy_command = yes&lt;br /&gt;
 smtpd_delay_reject = yes&lt;br /&gt;
 smtpd_helo_required = yes&lt;br /&gt;
 smtpd_helo_restrictions = permit_mynetworks,&lt;br /&gt;
     reject_non_fqdn_hostname,&lt;br /&gt;
     reject_invalid_hostname,&lt;br /&gt;
     permit&lt;br /&gt;
&lt;br /&gt;
smtpd_recipient_restrictions =&lt;br /&gt;
   permit_sasl_authenticated,&lt;br /&gt;
   reject_invalid_hostname,&lt;br /&gt;
   reject_non_fqdn_hostname,&lt;br /&gt;
   reject_non_fqdn_sender,&lt;br /&gt;
   reject_non_fqdn_recipient,&lt;br /&gt;
   reject_unknown_sender_domain,&lt;br /&gt;
   reject_unknown_recipient_domain,&lt;br /&gt;
   permit_mynetworks,&lt;br /&gt;
   reject_rbl_client list.dsbl.org,&lt;br /&gt;
   reject_rbl_client sbl.spamhaus.org,&lt;br /&gt;
   reject_rbl_client cbl.abuseat.org,&lt;br /&gt;
   reject_rbl_client dul.dnsbl.sorbs.net,&lt;br /&gt;
   permit&lt;br /&gt;
&lt;br /&gt;
 smtpd_error_sleep_time = 1s&lt;br /&gt;
 smtpd_soft_error_limit = 10&lt;br /&gt;
 smtpd_hard_error_limit = 20&lt;br /&gt;
&lt;br /&gt;
Also force (highlighted using red color) Postfix to limit incoming or receiving email rate to avoid spam.&lt;br /&gt;
&lt;br /&gt;
Save and close the file. Restart postfix:&lt;br /&gt;
 # /etc/init.d/postfix restart&lt;br /&gt;
&lt;br /&gt;
Watch out maillog file. Now you should see lots of spam email blocked by above configuration directive:&lt;br /&gt;
 # tail -f /var/log/maillog&lt;br /&gt;
Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Jan  9 06:07:22 server postfix/smtpd[10308]: NOQUEUE: reject: RCPT from 183-12-81.ip.adsl.hu[81.183.12.81]: 554 Service unavailable; Client host [81.183.12.81] blocked using dul.dnsbl.sorbs.net; Dynamic IP Addresses See: http://www.sorbs.net/lookup.shtml?81.183.12.81; from= to= proto=ESMTP helo=&amp;lt;183-12-230.ip.adsl.hu&amp;gt;&lt;br /&gt;
Jan  9 06:07:23 server postfix/smtpd[10308]: lost connection after RCPT from 183-12-81.ip.adsl.hu[81.183.12.81]&lt;br /&gt;
Jan  9 06:07:23 server postfix/smtpd[10308]: disconnect from 183-12-81.ip.adsl.hu[81.183.12.81]&lt;br /&gt;
Jan  9 06:10:43 server postfix/anvil[10310]: statistics: max connection rate 1/60s for (smtp:81.183.12.81) at Jan  9 06:07:17&lt;br /&gt;
Jan  9 06:10:43 server postfix/anvil[10310]: statistics: max connection count 1 for (smtp:81.183.12.81) at Jan  9 06:07:17&lt;br /&gt;
Jan  9 06:10:43 server postfix/anvil[10310]: statistics: max cache size 1 at Jan  9 06:07:17&lt;br /&gt;
Jan  9 06:16:58 server postfix/smtpd[10358]: warning: 81.92.197.249: address not listed for hostname unassigned.or.unconfigured.reverse.nfsi-telecom.net&lt;br /&gt;
Jan  9 06:16:58 server postfix/smtpd[10358]: connect from unknown[81.92.197.249]&lt;br /&gt;
Jan  9 06:17:00 server postfix/smtpd[10358]: NOQUEUE: reject: RCPT from unknown[81.92.197.249]: 550 : Recipient address rejected: User unknown in virtual alias table; from=&amp;lt;&amp;gt; to= proto=ESMTP helo=&lt;br /&gt;
Jan  9 06:17:00 server postfix/smtpd[10358]: disconnect from unknown[81.92.197.249]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next time I will write about simple procmail and spamassassin combination to filter out spam :)&lt;br /&gt;
&lt;br /&gt;
Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or full RSS feed to get all updates. You can Email this page to a friend. &lt;br /&gt;
&lt;br /&gt;
==Riferimenti==&lt;br /&gt;
*[http://www.cyberciti.biz/tips/postfix-spam-filtering-with-blacklists-howto.html Postfix configure anti spam with blacklist]&lt;/div&gt;</summary>
		<author><name>10.0.254.3</name></author>
	</entry>
</feed>