<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tips and Tux &#187; antispam</title>
	<atom:link href="http://www.tipsandtux.org/wordpress/tag/antispam/feed" rel="self" type="application/rss+xml" />
	<link>http://www.tipsandtux.org/wordpress</link>
	<description>di Linux, Piante Carnivore e non solo... il informatipapàliticarnivoro</description>
	<lastBuildDate>Fri, 03 Sep 2010 10:23:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title></title>
		<link>http://www.tipsandtux.org/wordpress/92.html</link>
		<comments>http://www.tipsandtux.org/wordpress/92.html#comments</comments>
		<pubDate>Sun, 11 Apr 2010 22:42:20 +0000</pubDate>
		<dc:creator>superpaia</dc:creator>
				<category><![CDATA[Gnu/Linux]]></category>
		<category><![CDATA[antispam]]></category>
		<category><![CDATA[qmail]]></category>

		<guid isPermaLink="false">http://www.tipsandtux.org/wordpress/?p=92</guid>
		<description><![CDATA[<p>Ecco un bel sistema per trovare se qualche &#8220;bravo ragazzo&#8221; ha inserito una pagina php (e soprattutto qual&#8217;è il file!) nel nostro webserver (ovviamente &#8220;bucandolo&#8221;) per poter spedire email a mezzo mondo (nel caso specifico dove ho risolto il problema c&#8217;è in coda la bellezza di mezzo milione di email!):</p>
<p>Many email messages are sent from PHP <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.tipsandtux.org/wordpress/92.html"></a></span>]]></description>
			<content:encoded><![CDATA[<p>Ecco un bel sistema per trovare se qualche &#8220;bravo ragazzo&#8221; ha inserito una pagina php (e soprattutto qual&#8217;è il file!) nel nostro webserver (ovviamente &#8220;bucandolo&#8221;) per poter spedire email a mezzo mondo (nel caso specifico dove ho risolto il problema c&#8217;è in coda la bellezza di mezzo milione di email!):</p>
<p><a href="http://kb.parallels.com/en/1711" target="_blank">Many email messages are sent from PHP scripts on the server. How can I find what domains these scripts are running on?</a></p>
<p><span id="more-92"></span>Lo cito perché ne vale la pena (è per Qmail, al di là che comunque si citi la piattaforma Plesk) :</p>
<h2><em>Resolution</em></h2>
<p><em> There is a way to find what the folder the PHP script that sends mail was run from. Note, the paths can be slightly differ from the listed below depending on your OS and Plesk version:</em></p>
<p><em><strong>1) </strong>create /var/qmail/bin/sendmail-wrapper script with the content:</em></p>
<p><em>#!/bin/sh<br />
(echo X-Additional-Header: $PWD ;cat) | tee -a /var/tmp/mail.send|/var/qmail/bin/sendmail-qmail &#8220;$@&#8221;</em></p>
<p><em>Note, it should be the two lines including &#8216;#!/bin/sh&#8217;.<br />
</em></p>
<p><em><strong>2) </strong>then create log file /var/tmp/mail.send and grant it &#8220;a+rw&#8221; rights, make the wrapper executable, rename old sendmail and link it to the new wrapper:</em></p>
<p><em>~# touch /var/tmp/mail.send<br />
~# chmod a+rw /var/tmp/mail.send<br />
~# chmod a+x /var/qmail/bin/sendmail-wrapper<br />
~# mv /var/qmail/bin/sendmail /var/qmail/bin/sendmail-qmail<br />
~# ln -s /var/qmail/bin/sendmail-wrapper /var/qmail/bin/sendmail</em></p>
<p><em><strong>3) </strong>Wait for an hour or so and revert sendmail back:</em></p>
<p><em>~# rm -f /var/qmail/bin/sendmail<br />
~# ln -s /var/qmail/bin/sendmail-qmail /var/qmail/bin/sendmail</em></p>
<p><em>Examine /var/tmp/mail.send file, there should be lines starting with &#8220;X-Additional-Header:&#8221; pointing out to domains&#8217; folders where the scripts which sent the mail are located.<br />
You can see all the folders mail PHP scripts were run from with the following command:</em></p>
<p><em>~# grep X-Additional /var/tmp/mail.send | grep `cat /etc/psa/psa.conf | grep HTTPD_VHOSTS_D | sed -e &#8217;s/HTTPD_VHOSTS_D//&#8217; `</em></p>
<p><em>f you see no output from the command above, it means that no mail was sent using PHP mail() function from the Plesk virtual hosts directory.</em></p>
<p><em> </em></p>
<!-- Begin WP-Social-Bookmarking -->
<div class="WP-Social-Bookmarking"> 
<a href="http://www.onlinerel.com/sfeed/?f=aHR0cDovL3d3dy50aXBzYW5kdHV4Lm9yZy93b3JkcHJlc3MvOTIuaHRtbA==&l=it-IT" target="_blank" title="Onlinerel"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/onlinerel.png" style="width:24px;height:24px;border:0px;" alt="Onlinerel" title="Onlinerel" /></a>
<a href="http://facebook.com/sharer.php?u=http://www.tipsandtux.org/wordpress/92.html&amp;t=" target="_blank" rel="nofollow" title="Facebook"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/facebook.png" style="width:24px;height:24px;border:0px;" alt="Facebook" title="Facebook" /></a>
<a href="http://twitter.com/home?status=http://www.tipsandtux.org/wordpress/92.html  " target="_blank" rel="nofollow" title="Twitter"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/twitter.png" style="width:24px;height:24px;border:0px;" alt="Twitter" title="Twitter" /></a>
<a href="http://www.myspace.com/Modules/PostTo/Pages/?c=http://www.tipsandtux.org/wordpress/92.html&t=" target="_blank" rel="nofollow" title="Myspace"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/myspace.png" style="width:24px;height:24px;border:0px;" alt="Myspace" title="Myspace" /></a>
<a href="http://friendfeed.com/share?url=http://www.tipsandtux.org/wordpress/92.html&title=" target="_blank" rel="nofollow" title="Friendfeed"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/friendfeed.png" style="width:24px;height:24px;border:0px;" alt="Friendfeed" title="Friendfeed" /></a>
<a href="http://www.technorati.com/faves?add=http://www.tipsandtux.org/wordpress/92.html" target="_blank" rel="nofollow" title="Technorati"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/technorati.png" style="width:24px;height:24px;border:0px;" alt="Technorati" title="Technorati" /></a>
<a href="http://del.icio.us/post?url=http://www.tipsandtux.org/wordpress/92.html&amp;title=" target="_blank" rel="nofollow" title="del.icio.us"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/delicious.png" style="width:24px;height:24px;border:0px;" alt="del.icio.us" title="del.icio.us" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http://www.tipsandtux.org/wordpress/92.html&amp;title=" target="_blank" rel="nofollow" title="Digg"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/digg.png" style="width:24px;height:24px;border:0px;" alt="Digg" title="Digg" /></a>
<a href="http://google.com/bookmarks/mark?op=add&amp;bkmk=http://www.tipsandtux.org/wordpress/92.html&amp;title=" target="_blank" rel="nofollow" title="Google"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/google.png" style="width:24px;height:24px;border:0px;" alt="Google" title="Google" /></a>
<a href="http://buzz.yahoo.com/submit?submitUrl=&amp;u=http://www.tipsandtux.org/wordpress/92.html" target="_blank" rel="nofollow" title="Yahoo Buzz"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/yahoobuzz.png" style="width:24px;height:24px;border:0px;" alt="Yahoo Buzz" title="Yahoo Buzz" /></a>
<a href="http://stumbleupon.com/submit?url=http://www.tipsandtux.org/wordpress/92.html&amp;title=&amp;newcomment=" target="_blank" rel="nofollow" title="StumbleUpon"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/stumbleupon.png" style="width:24px;height:24px;border:0px;" alt="StumbleUpon" title="StumbleUpon" /></a>
</div><br /> <!-- End WP-Social-Bookmarking -->

]]></content:encoded>
			<wfw:commentRss>http://www.tipsandtux.org/wordpress/92.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 2</title>
		<link>http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-2.html</link>
		<comments>http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-2.html#comments</comments>
		<pubDate>Wed, 17 Feb 2010 15:42:06 +0000</pubDate>
		<dc:creator>superpaia</dc:creator>
				<category><![CDATA[Gnu/Linux]]></category>
		<category><![CDATA[antispam]]></category>
		<category><![CDATA[mailscanner]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.tipsandtux.org/wordpress/?p=73</guid>
		<description><![CDATA[<p>Una volta fatte le opportune verifiche che la &#8220;configurazione base&#8221; funzioni, dal sito www.mailscanner.info scarico la versione più recente del file tar.gz per SuSE.
Lo decomprimo (io di solito creo una cartella /software dove mettere il software vario) e poi eseguo, dall&#8217;interno della cartella e come utente root, il comando ./install.sh
A questo punto l&#8217;installazione di MailScanner inizia, <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-2.html">Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 2</a></span>]]></description>
			<content:encoded><![CDATA[<p>Una volta fatte le opportune verifiche che la &#8220;configurazione base&#8221; funzioni, dal sito www.mailscanner.info scarico la versione più recente del file tar.gz per SuSE.<br />
Lo decomprimo (io di solito creo una cartella /software dove mettere il software vario) e poi eseguo, dall&#8217;interno della cartella e come utente root, il comando ./install.sh<br />
A questo punto l&#8217;installazione di MailScanner inizia, con relativa compilazione dei file necessari. Tutto in automatico!</p>
<p><span id="more-73"></span><br />
Alla fine dell&#8217;installazione per i sistemi SuSe è necessario effettuare la seguente configurazione nel file /etc/MailScanner/MailScanner.conf :<br />
Run As User = postfix<br />
Run As Group = postfix<br />
Incoming Queue Dir = /var/spool/postfix/hold<br />
Outgoing Queue Dir = /var/spool/postfix/incoming<br />
MTA = postfix<br />
Monitors for ClamAV Updates = [...]  /var/lib/clamav/*.cvd</p>
<p>Successivamente cambio i diritti sulle directory di servizio di MailScanner:<br />
chown -R postfix:postfix /var/spool/MailScanner/incoming<br />
chown -R postfix:postfix /var/spool/MailScanner/quarantine</p>
<p>Inserire nel file /etc/postfix/header_checks<br />
la seguente riga: /^Received:/ HOLD</p>
<p>Poi, visto che sarà MailScanner ad occuparsi della gestione della posta agendo come MTA, spengo amavis e postfix e lo avvio.<br />
(Naturalmente anche al runlevel di boot disabiliterò postfix/amavis e abiliterò MailScanner)</p>
<p>A questo punto verifico l&#8217;invio della posta con una connessione SMTP, solito telnet sulla porta 25 del server e verifica dei risultati con &#8220;tail -f /var/log/mail&#8221;.</p>
<p>Riferimenti:</p>
<p>http://www.mailscanner.info/postfix.html</p>
<!-- Begin WP-Social-Bookmarking -->
<div class="WP-Social-Bookmarking"> 
<a href="http://www.onlinerel.com/sfeed/?f=aHR0cDovL3d3dy50aXBzYW5kdHV4Lm9yZy93b3JkcHJlc3MvaW5zdGFsbGF6aW9uZS1kaS1tYWlsc2Nhbm5lci1zdS1zbGVzLTExLWEtNjQtYml0LXBhcnRlLTIuaHRtbA==&l=it-IT" target="_blank" title="Onlinerel"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/onlinerel.png" style="width:24px;height:24px;border:0px;" alt="Onlinerel" title="Onlinerel" /></a>
<a href="http://facebook.com/sharer.php?u=http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-2.html&amp;t=Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 2" target="_blank" rel="nofollow" title="Facebook"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/facebook.png" style="width:24px;height:24px;border:0px;" alt="Facebook" title="Facebook" /></a>
<a href="http://twitter.com/home?status=http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-2.html  Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 2" target="_blank" rel="nofollow" title="Twitter"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/twitter.png" style="width:24px;height:24px;border:0px;" alt="Twitter" title="Twitter" /></a>
<a href="http://www.myspace.com/Modules/PostTo/Pages/?c=http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-2.html&t=Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 2" target="_blank" rel="nofollow" title="Myspace"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/myspace.png" style="width:24px;height:24px;border:0px;" alt="Myspace" title="Myspace" /></a>
<a href="http://friendfeed.com/share?url=http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-2.html&title=Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 2" target="_blank" rel="nofollow" title="Friendfeed"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/friendfeed.png" style="width:24px;height:24px;border:0px;" alt="Friendfeed" title="Friendfeed" /></a>
<a href="http://www.technorati.com/faves?add=http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-2.html" target="_blank" rel="nofollow" title="Technorati"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/technorati.png" style="width:24px;height:24px;border:0px;" alt="Technorati" title="Technorati" /></a>
<a href="http://del.icio.us/post?url=http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-2.html&amp;title=Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 2" target="_blank" rel="nofollow" title="del.icio.us"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/delicious.png" style="width:24px;height:24px;border:0px;" alt="del.icio.us" title="del.icio.us" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-2.html&amp;title=Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 2" target="_blank" rel="nofollow" title="Digg"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/digg.png" style="width:24px;height:24px;border:0px;" alt="Digg" title="Digg" /></a>
<a href="http://google.com/bookmarks/mark?op=add&amp;bkmk=http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-2.html&amp;title=Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 2" target="_blank" rel="nofollow" title="Google"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/google.png" style="width:24px;height:24px;border:0px;" alt="Google" title="Google" /></a>
<a href="http://buzz.yahoo.com/submit?submitUrl=Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 2&amp;u=http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-2.html" target="_blank" rel="nofollow" title="Yahoo Buzz"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/yahoobuzz.png" style="width:24px;height:24px;border:0px;" alt="Yahoo Buzz" title="Yahoo Buzz" /></a>
<a href="http://stumbleupon.com/submit?url=http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-2.html&amp;title=Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 2&amp;newcomment=Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 2" target="_blank" rel="nofollow" title="StumbleUpon"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/stumbleupon.png" style="width:24px;height:24px;border:0px;" alt="StumbleUpon" title="StumbleUpon" /></a>
</div><br /> <!-- End WP-Social-Bookmarking -->

]]></content:encoded>
			<wfw:commentRss>http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 1</title>
		<link>http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-1.html</link>
		<comments>http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-1.html#comments</comments>
		<pubDate>Mon, 15 Feb 2010 14:25:27 +0000</pubDate>
		<dc:creator>superpaia</dc:creator>
				<category><![CDATA[Gnu/Linux]]></category>
		<category><![CDATA[antispam]]></category>
		<category><![CDATA[mailscanner]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.tipsandtux.org/wordpress/?p=67</guid>
		<description><![CDATA[<p>Installiamo MailScanner per la gestione attraverso interfaccia grafica (MailWatch) della posta su un server perimetrale</p>
<p>Prerequisito è l&#8217;installazione del sistema SuSE Linux Enterprise, a cui vanno aggiunti i pacchetti postfix, apache2, mysql e relativi tool (essendo un server posizionato in DMZ ho aggiunto anche bind, server dns).</p>
<p></p>
<p>Dopo l&#8217;installazione, se in possesso di codici, si procede agli aggiornamenti <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-1.html">Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 1</a></span>]]></description>
			<content:encoded><![CDATA[<p>Installiamo MailScanner per la gestione attraverso interfaccia grafica (MailWatch) della posta su un server perimetrale</p>
<p>Prerequisito è l&#8217;installazione del sistema SuSE Linux Enterprise, a cui vanno aggiunti i pacchetti postfix, apache2, mysql e relativi tool (essendo un server posizionato in DMZ ho aggiunto anche bind, server dns).</p>
<p><span id="more-67"></span></p>
<p>Dopo l&#8217;installazione, se in possesso di codici, si procede agli aggiornamenti delle patch. Per questo utilizziamo YaST. Fatte le patch e dopo un bel riavvio installiamo gli applicativi.<br />
Disabilitiamo i servizi in avvio automatico non necessari.</p>
<p>Procediamo per &#8220;step&#8221;, dapprima configuriamo il sistema postfix, integrandolo con amavis, clamav e spamassassin.</p>
<p>Si configurano paramentri base nel file <em>/etc/postfix/main.cf</em> sono:<br />
<em>myhostname = mail.dominiopubblico.it<br />
inet_interfaces = all<br />
relay_domains = dominiopubblico.it<br />
mynetworks_style = host<br />
mynetworks = 127.0.0.1, IP.DEL.SERVER.LINUX, IP.DEL.SERVER.diPostaAziendale</em></p>
<p>poi aggiungo il minimo indispensabile (che a volte è molto di più che trovo da qualche cliente già impostato&#8230;) per evitare &#8220;quintalate&#8221; di spam:<br />
<em>smtpd_helo_required = yes<br />
disable_vrfy_commands = yes<br />
smtpd_etrn_restrictions = reject<br />
smtpd_recipient_restrictions =<br />
reject_invalid_hostname,<br />
reject_non_fqdn_sender,<br />
reject_non_fqdn_recipient,<br />
reject_unknown_sender_domain,<br />
reject_unknown_recipient_domain,<br />
permit_mynetworks,<br />
reject_unauth_destination,<br />
reject_rhsbl_sender dsn.rfc-ignorant.org,<br />
reject_rhsbl_sender block.rhs.mailpolice.com,<br />
reject_rhsbl_client block.rhs.mailpolice.com,<br />
reject_rhsbl_client dynamic.rhs.mailpolice.com,<br />
reject_rhsbl_sender dynamic.rhs.mailpolice.com,<br />
reject_rhsbl_client blackhole.securitysage.com,<br />
reject_rhsbl_sender blackhole.securitysage.com,<br />
reject_rbl_client list.dsbl.org,<br />
reject_rbl_client bl.spamcop.net,<br />
reject_rbl_client zen.spamhaus.org,<br />
reject_rbl_client dnsbl.njabl.org,<br />
permit<br />
smtpd_data_restrictions =<br />
reject_unauth_pipelining,<br />
permit</em></p>
<p>abilito l&#8217;interazione tra postfix e amavis:<br />
<em>content_filter = vscan:[127.0.0.1]:10024</em><br />
e nel file <em>/etc/postfix/master.cf </em>configuro le righe:<br />
<em>localhost:10025 inet    n       -       n       -       -       smtpd -o content_filter=<br />
vscan  unix    -    -    y    -    2    smtp  -o smtp_data_done_timeout=1200  -o smtp_send_xforward_command=yes -o disable_dns_lookups=yes</em> <em></em></p>
<p>a questo punto nel file <em>/etc/postfix/transport</em> imposto l&#8217;indirizzo ip del server di posta finale:<br />
dominiopubblico.it smtp:[IP.DEL.SERVER.diPostaAziendale]<br />
salvo il file e poi &#8220;compilo&#8221; il file per postfix:<br />
<em>postmap /etc/postfix/transport</em></p>
<p>nel file di configurazione di Amavis è necessario (<em>/etc/amavis.conf</em>), almeno solo per ora, configurare la variable myhostname:<br />
<em>$myhostname = &#8216;mail-as.dominiopubblico.it&#8217;;</em></p>
<p>a questo posso riavviare il servizio postfix ed amavis ed il sistema è già pronto per i primi test di invio e ricezione della posta.<br />
Su questa &#8220;base&#8221; andremo ad installare MailScanner e MailWatch successivamente.</p>
<p>Riferimenti:<br />
<a href="http://www.postfix.org" target="_blank">www.postfix.org</a><br />
<a href="http://www.novell.org" target="_blank">www.novell.org</a></p>
<p>Consiglio:<br />
Gnu/Linux ha il vantaggio di avere dei file di configurazione per i vari applicativi installati, prima della modifica io ho la buona abitudine di salvare il file di configurazione di base:<br />
srvmail:/etc/postfix # cp main.cf main.cf.orig<br />
Inoltre è opportuno avere la stessa buona abitudine per quando si agisce in maniera &#8220;pesante&#8221; su configurazioni già esistenti.</p>
<!-- Begin WP-Social-Bookmarking -->
<div class="WP-Social-Bookmarking"> 
<a href="http://www.onlinerel.com/sfeed/?f=aHR0cDovL3d3dy50aXBzYW5kdHV4Lm9yZy93b3JkcHJlc3MvaW5zdGFsbGF6aW9uZS1kaS1tYWlsc2Nhbm5lci1zdS1zbGVzLTExLWEtNjQtYml0LXBhcnRlLTEuaHRtbA==&l=it-IT" target="_blank" title="Onlinerel"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/onlinerel.png" style="width:24px;height:24px;border:0px;" alt="Onlinerel" title="Onlinerel" /></a>
<a href="http://facebook.com/sharer.php?u=http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-1.html&amp;t=Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 1" target="_blank" rel="nofollow" title="Facebook"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/facebook.png" style="width:24px;height:24px;border:0px;" alt="Facebook" title="Facebook" /></a>
<a href="http://twitter.com/home?status=http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-1.html  Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 1" target="_blank" rel="nofollow" title="Twitter"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/twitter.png" style="width:24px;height:24px;border:0px;" alt="Twitter" title="Twitter" /></a>
<a href="http://www.myspace.com/Modules/PostTo/Pages/?c=http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-1.html&t=Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 1" target="_blank" rel="nofollow" title="Myspace"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/myspace.png" style="width:24px;height:24px;border:0px;" alt="Myspace" title="Myspace" /></a>
<a href="http://friendfeed.com/share?url=http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-1.html&title=Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 1" target="_blank" rel="nofollow" title="Friendfeed"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/friendfeed.png" style="width:24px;height:24px;border:0px;" alt="Friendfeed" title="Friendfeed" /></a>
<a href="http://www.technorati.com/faves?add=http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-1.html" target="_blank" rel="nofollow" title="Technorati"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/technorati.png" style="width:24px;height:24px;border:0px;" alt="Technorati" title="Technorati" /></a>
<a href="http://del.icio.us/post?url=http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-1.html&amp;title=Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 1" target="_blank" rel="nofollow" title="del.icio.us"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/delicious.png" style="width:24px;height:24px;border:0px;" alt="del.icio.us" title="del.icio.us" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-1.html&amp;title=Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 1" target="_blank" rel="nofollow" title="Digg"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/digg.png" style="width:24px;height:24px;border:0px;" alt="Digg" title="Digg" /></a>
<a href="http://google.com/bookmarks/mark?op=add&amp;bkmk=http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-1.html&amp;title=Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 1" target="_blank" rel="nofollow" title="Google"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/google.png" style="width:24px;height:24px;border:0px;" alt="Google" title="Google" /></a>
<a href="http://buzz.yahoo.com/submit?submitUrl=Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 1&amp;u=http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-1.html" target="_blank" rel="nofollow" title="Yahoo Buzz"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/yahoobuzz.png" style="width:24px;height:24px;border:0px;" alt="Yahoo Buzz" title="Yahoo Buzz" /></a>
<a href="http://stumbleupon.com/submit?url=http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-1.html&amp;title=Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 1&amp;newcomment=Installazione di MailScanner su SLES 11 a 64 bit &#8211; Parte 1" target="_blank" rel="nofollow" title="StumbleUpon"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/stumbleupon.png" style="width:24px;height:24px;border:0px;" alt="StumbleUpon" title="StumbleUpon" /></a>
</div><br /> <!-- End WP-Social-Bookmarking -->

]]></content:encoded>
			<wfw:commentRss>http://www.tipsandtux.org/wordpress/installazione-di-mailscanner-su-sles-11-a-64-bit-parte-1.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postfix: Verifica LDAP in real-time</title>
		<link>http://www.tipsandtux.org/wordpress/postfix-verifica-ldap-in-real-time.html</link>
		<comments>http://www.tipsandtux.org/wordpress/postfix-verifica-ldap-in-real-time.html#comments</comments>
		<pubDate>Mon, 01 Feb 2010 23:22:29 +0000</pubDate>
		<dc:creator>superpaia</dc:creator>
				<category><![CDATA[Gnu/Linux]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[antispam]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[postfix]]></category>

		<guid isPermaLink="false">http://www.tipsandtux.org/wordpress/?p=23</guid>
		<description><![CDATA[<p></p>
<p style="margin-bottom: 0cm;">Nella ricezione della posta è opportuno che sia verificata prima di essere inoltrata al server di posta, ovvero che il destinatario esista. Già con questo &#8220;piccolo&#8221; controllo parte dello spam non viene consegnato e non va ad usare risorse utili sul nostro server.</p>
<p style="margin-bottom: 0cm;">Quindi è fondamentale, assieme ad altri controlli, aggiungere questo tipo <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.tipsandtux.org/wordpress/postfix-verifica-ldap-in-real-time.html">Postfix: Verifica LDAP in real-time</a></span>]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } 		H4 { margin-bottom: 0.21cm } 		H4.western { font-family: "Helvetica"; font-size: 11pt; font-style: italic } 		H4.cjk { font-size: 11pt; font-style: italic } 		H4.ctl { font-size: 11pt; font-style: italic } --></p>
<p style="margin-bottom: 0cm;">Nella ricezione della posta è opportuno che sia verificata prima di essere inoltrata al server di posta, ovvero che il destinatario esista. Già con questo &#8220;piccolo&#8221; controllo parte dello spam non viene consegnato e non va ad usare risorse utili sul nostro server.</p>
<p style="margin-bottom: 0cm;">Quindi è fondamentale, assieme ad altri controlli, aggiungere questo tipo di verifica, per ottenere un servizio di posta migliore!</p>
<p style="margin-bottom: 0cm;"><span style="font-size: small;">Questa piccola guida è riferita all&#8217;uso di Postfix, con supporto ldap, in ambiente Gnu/Linux con server Exchange o Lotus Domino</span></p>
<p style="margin-bottom: 0cm;"><span id="more-23"></span></p>
<p><span style="text-decoration: underline;">Query LDAP verso Lotus Domino:</span></p>
<p style="margin-bottom: 0cm;">la sintassi per postfix da aggiungere in<em> /etc/postfix/main.c</em>f è :</p>
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;"><em>[...]</em></p>
<p style="margin-bottom: 0cm;"><em>ldap_timeout = 10</em></p>
<p style="margin-bottom: 0cm;"><em>ldap_search_base =</em></p>
<p style="margin-bottom: 0cm;"><em>ldap_server_host = ip_del_server_di_posta_Domino</em></p>
<p style="margin-bottom: 0cm;"><em>ldap_server_port = 389</em></p>
<p style="margin-bottom: 0cm;"><em>ldap_query_filter = (mail=%s)</em></p>
<p style="margin-bottom: 0cm;"><em>ldap_result_filter = %s</em></p>
<p style="margin-bottom: 0cm;"><em>ldap_result_attribute = mail</em></p>
<p style="margin-bottom: 0cm;"><em>ldap_scope = sub</em></p>
<p style="margin-bottom: 0cm;"><em>ldap_bind = no</em></p>
<p style="margin-bottom: 0cm;"><em>relay_recipient_maps = ldap:ldap</em></p>
<p style="margin-bottom: 0cm;"><em>[...]</em></p>
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;"><span style="text-decoration: underline;">Query Ldap verso M$crosoft Exchange:</span></p>
<p style="margin-bottom: 0cm;">mentre nel caso di server M$crosoft Exchange la sintassi da aggiungere in<em> /etc/postfix/main.cf </em>è:</p>
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;"><em>[...]</em></p>
<p style="margin-bottom: 0cm;"><em>ldap_server_host = ip_del_server_di_posta_Exchange</em></p>
<p style="margin-bottom: 0cm;"><em>ldap_search_base = dc=dominio,dc=it</em></p>
<p style="margin-bottom: 0cm;"><em>ldap_version = 3</em></p>
<p style="margin-bottom: 0cm;"><em>ldap_bind_dn = CN=postfix,CN=Users,DC=dominio,DC=it </em><span style="font-style: normal;">&lt;&#8211; utente, &#8220;base&#8221;, inserito in Active Directory per poter fare la query LDAP</span></p>
<p style="margin-bottom: 0cm;"><em>ldap_bind_pw = utente_postfix_password</em></p>
<p style="margin-bottom: 0cm;"><em>ldap_query_filter = (proxyAddresses=smtp:%s)</em></p>
<p style="margin-bottom: 0cm;"><em>ldap_result_attribute = mail</em></p>
<p style="margin-bottom: 0cm;"><em>relay_recipient_maps = ldap:ldap</em></p>
<p style="margin-bottom: 0cm;"><em>smtpd_recipient_limit = 240</em></p>
<p style="margin-bottom: 0cm;"><em>[...]</em></p>
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;">In entrambi i casi occorre salvare il file e riavviare il servizio Postfix.<em><br />
</em></p>
<p style="margin-bottom: 0cm;">
<!-- Begin WP-Social-Bookmarking -->
<div class="WP-Social-Bookmarking"> 
<a href="http://www.onlinerel.com/sfeed/?f=aHR0cDovL3d3dy50aXBzYW5kdHV4Lm9yZy93b3JkcHJlc3MvcG9zdGZpeC12ZXJpZmljYS1sZGFwLWluLXJlYWwtdGltZS5odG1s&l=it-IT" target="_blank" title="Onlinerel"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/onlinerel.png" style="width:24px;height:24px;border:0px;" alt="Onlinerel" title="Onlinerel" /></a>
<a href="http://facebook.com/sharer.php?u=http://www.tipsandtux.org/wordpress/postfix-verifica-ldap-in-real-time.html&amp;t=Postfix: Verifica LDAP in real-time" target="_blank" rel="nofollow" title="Facebook"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/facebook.png" style="width:24px;height:24px;border:0px;" alt="Facebook" title="Facebook" /></a>
<a href="http://twitter.com/home?status=http://www.tipsandtux.org/wordpress/postfix-verifica-ldap-in-real-time.html  Postfix: Verifica LDAP in real-time" target="_blank" rel="nofollow" title="Twitter"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/twitter.png" style="width:24px;height:24px;border:0px;" alt="Twitter" title="Twitter" /></a>
<a href="http://www.myspace.com/Modules/PostTo/Pages/?c=http://www.tipsandtux.org/wordpress/postfix-verifica-ldap-in-real-time.html&t=Postfix: Verifica LDAP in real-time" target="_blank" rel="nofollow" title="Myspace"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/myspace.png" style="width:24px;height:24px;border:0px;" alt="Myspace" title="Myspace" /></a>
<a href="http://friendfeed.com/share?url=http://www.tipsandtux.org/wordpress/postfix-verifica-ldap-in-real-time.html&title=Postfix: Verifica LDAP in real-time" target="_blank" rel="nofollow" title="Friendfeed"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/friendfeed.png" style="width:24px;height:24px;border:0px;" alt="Friendfeed" title="Friendfeed" /></a>
<a href="http://www.technorati.com/faves?add=http://www.tipsandtux.org/wordpress/postfix-verifica-ldap-in-real-time.html" target="_blank" rel="nofollow" title="Technorati"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/technorati.png" style="width:24px;height:24px;border:0px;" alt="Technorati" title="Technorati" /></a>
<a href="http://del.icio.us/post?url=http://www.tipsandtux.org/wordpress/postfix-verifica-ldap-in-real-time.html&amp;title=Postfix: Verifica LDAP in real-time" target="_blank" rel="nofollow" title="del.icio.us"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/delicious.png" style="width:24px;height:24px;border:0px;" alt="del.icio.us" title="del.icio.us" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http://www.tipsandtux.org/wordpress/postfix-verifica-ldap-in-real-time.html&amp;title=Postfix: Verifica LDAP in real-time" target="_blank" rel="nofollow" title="Digg"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/digg.png" style="width:24px;height:24px;border:0px;" alt="Digg" title="Digg" /></a>
<a href="http://google.com/bookmarks/mark?op=add&amp;bkmk=http://www.tipsandtux.org/wordpress/postfix-verifica-ldap-in-real-time.html&amp;title=Postfix: Verifica LDAP in real-time" target="_blank" rel="nofollow" title="Google"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/google.png" style="width:24px;height:24px;border:0px;" alt="Google" title="Google" /></a>
<a href="http://buzz.yahoo.com/submit?submitUrl=Postfix: Verifica LDAP in real-time&amp;u=http://www.tipsandtux.org/wordpress/postfix-verifica-ldap-in-real-time.html" target="_blank" rel="nofollow" title="Yahoo Buzz"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/yahoobuzz.png" style="width:24px;height:24px;border:0px;" alt="Yahoo Buzz" title="Yahoo Buzz" /></a>
<a href="http://stumbleupon.com/submit?url=http://www.tipsandtux.org/wordpress/postfix-verifica-ldap-in-real-time.html&amp;title=Postfix: Verifica LDAP in real-time&amp;newcomment=Postfix: Verifica LDAP in real-time" target="_blank" rel="nofollow" title="StumbleUpon"><img src="http://www.tipsandtux.org/wordpress/wp-content/plugins/wp-social-bookmarking/images/stumbleupon.png" style="width:24px;height:24px;border:0px;" alt="StumbleUpon" title="StumbleUpon" /></a>
</div><br /> <!-- End WP-Social-Bookmarking -->

]]></content:encoded>
			<wfw:commentRss>http://www.tipsandtux.org/wordpress/postfix-verifica-ldap-in-real-time.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
