<?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>postfix &#8211; SMsoft &#8211; informatica e dintorni</title>
	<atom:link href="https://blog.smsoft.it/tag/postfix/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.smsoft.it</link>
	<description>consigli settimanali su MacOS, GNU/Linux ed Open Source</description>
	<lastBuildDate>Tue, 11 Mar 2014 09:30:09 +0000</lastBuildDate>
	<language>it-IT</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=88278</generator>
	<item>
		<title>Testare un server SMTP</title>
		<link>https://blog.smsoft.it/2014/03/11/testare-un-server-smtp/</link>
					<comments>https://blog.smsoft.it/2014/03/11/testare-un-server-smtp/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 11 Mar 2014 09:30:09 +0000</pubDate>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MacOS]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Sicurezza]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[swaks]]></category>
		<guid isPermaLink="false">http://blog.smsoft.it/?p=2248</guid>

					<description><![CDATA[Per testare il funzionamento di un server smtp, è possibile fare una connessione telnet sulla porta 25 ed eseguire i vari comandi. Se però non volete perdere tempo a scrivere, c&#8217;è una pratica utility in perl che può farlo per voi. Parliamo di swaks. Dopo aver scaricato il codice o installato il pacchetto con il ... <a title="Testare un server SMTP" class="read-more" href="https://blog.smsoft.it/2014/03/11/testare-un-server-smtp/" aria-label="Per saperne di più su Testare un server SMTP">Leggi tutto</a>]]></description>
										<content:encoded><![CDATA[<p>Per testare il funzionamento di un server smtp, è possibile fare una connessione telnet sulla porta 25 ed eseguire i vari comandi. Se però non volete perdere tempo a scrivere, c&#8217;è una pratica utility in perl che può farlo per voi. Parliamo di <a href="http://www.jetmore.org/john/code/swaks/" target="_blank" rel="noopener noreferrer">swaks</a>.</p>
<p>Dopo aver <a href="http://www.jetmore.org/john/code/swaks/files/swaks-20120320.0/swaks" target="_blank" rel="noopener noreferrer">scaricato il codice</a> o installato il pacchetto con il classico <strong>apt-get install swaks</strong>, petete dare un&#8217;occhiata alla <a href="http://www.jetmore.org/john/code/swaks/latest/doc/ref.txt" target="_blank" rel="noopener noreferrer">documentazione</a> ed iniziare ad usarlo. </p>
<p>Ad esempio, un test:</p><pre class="urvanov-syntax-highlighter-plain-tag">./swaks --to blog@smsoft.it -s mail.mailserver.com -a PLAIN -f noreply@mailserver.com -au noreply@mailserver.com -ap udz6p2c5r
=== Trying mail.mailserver.com:25...
=== Connected to www.mailserver.com.
<-  220 mail.mailserver.com ESMTP Postfix (Debian/GNU)
 -> EHLO me.local
<-  250-mail.mailserver.com
<-  250-PIPELINING
<-  250-SIZE 15728640
<-  250-ETRN
<-  250-STARTTLS
<-  250-AUTH PLAIN LOGIN
<-  250-AUTH=PLAIN LOGIN
<-  250-ENHANCEDSTATUSCODES
<-  250-8BITMIME
<-  250 DSN
 -> AUTH PLAIN Ath455vcmVlAY2hlYXB2RlLmNvbQB1Ym5kemcDJj
<-  235 2.7.0 Authentication successful
 -> MAIL FROM:<noreply@mailserver.com>
<-  250 2.1.0 Ok
 -> RCPT TO:<blog@smsoft.it>
<-  250 2.1.5 Ok
 -> DATA
<-  354 End data with <CR><LF>.<CR><LF>
 -> Date: Tue, 15 Jan 2013 11:00:30 +0100
 -> To: blog@smsoft.it
 -> From: noreply@mailserver.com
 -> Subject: test Tue, 15 Jan 2013 11:00:30 +0100
 -> X-Mailer: swaks v20120320.0 jetmore.org/john/code/swaks/
 -> 
 -> This is a test mailing
 -> 
 -> .
<-  250 2.0.0 Ok: queued as 915FE1A000A8
 -> QUIT
<-  221 2.0.0 Bye
=== Connection closed with remote host.</pre><p></p>
<p>enjoy!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.smsoft.it/2014/03/11/testare-un-server-smtp/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Postfix: inviare posta usando gmail.com come smarthost</title>
		<link>https://blog.smsoft.it/2013/09/24/postfix-inviare-posta-usando-gmail-com-come-smarthost/</link>
					<comments>https://blog.smsoft.it/2013/09/24/postfix-inviare-posta-usando-gmail-com-come-smarthost/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 24 Sep 2013 09:18:07 +0000</pubDate>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[smarthost]]></category>
		<guid isPermaLink="false">http://blog.smsoft.it/?p=2583</guid>

					<description><![CDATA[Se non abbiamo ancora installato postfix, possiamo iniziare con: [crayon-6a41c755198c3112223928/] ora bisogna modificare il file /etc/postfix/main.cf aggiungendo: [crayon-6a41c755198cf398221455/] ora creare il file /etc/postfix/sasl_passwd: [crayon-6a41c755198d5758196384/] dove sotituiremo user.name@gmail.com:password con il nostro account gmail. Poi sistemiamo i permessi e convertiamo il file in .db per farlo usare da postfix: [crayon-6a41c755198d9618335884/] infine prepariamo il certificato: [crayon-6a41c755198dd975462714/] e ricarichiamo ... <a title="Postfix: inviare posta usando gmail.com come smarthost" class="read-more" href="https://blog.smsoft.it/2013/09/24/postfix-inviare-posta-usando-gmail-com-come-smarthost/" aria-label="Per saperne di più su Postfix: inviare posta usando gmail.com come smarthost">Leggi tutto</a>]]></description>
										<content:encoded><![CDATA[<p>Se non abbiamo ancora installato postfix, possiamo iniziare con:</p><pre class="urvanov-syntax-highlighter-plain-tag">apt-get install postfix libsasl2-2 ca-certificates libsasl2-modules</pre><p></p>
<p>ora bisogna modificare il file <strong>/etc/postfix/main.cf</strong> aggiungendo:</p><pre class="urvanov-syntax-highlighter-plain-tag">relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_use_tls = yes</pre><p></p>
<p>ora creare il file <strong>/etc/postfix/sasl_passwd</strong>:</p><pre class="urvanov-syntax-highlighter-plain-tag">[smtp.gmail.com]:587    user.name@gmail.com:password</pre><p>dove sotituiremo user.name@gmail.com:password con il nostro account gmail.</p>
<p>Poi sistemiamo i permessi e convertiamo il file in .db per farlo usare da postfix:</p><pre class="urvanov-syntax-highlighter-plain-tag">chmod 400 /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd</pre><p></p>
<p>infine prepariamo il certificato:</p><pre class="urvanov-syntax-highlighter-plain-tag">cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem | sudo tee -a /etc/postfix/cacert.pem</pre><p></p>
<p>e ricarichiamo le impostazioni con:</p><pre class="urvanov-syntax-highlighter-plain-tag">/etc/init.d/postfix reload</pre><p></p>
<p>Bene, a questo punto controllando il file <strong>/var/log/mail.log</strong> potremo verificare che il relay tramite gmail funzioni correttamente.</p>
<p>enjoy!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.smsoft.it/2013/09/24/postfix-inviare-posta-usando-gmail-com-come-smarthost/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>postfix: Recipient address rejected: Domain not found</title>
		<link>https://blog.smsoft.it/2010/11/30/postfix-recipient-address-rejected-domain-not-found/</link>
					<comments>https://blog.smsoft.it/2010/11/30/postfix-recipient-address-rejected-domain-not-found/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 30 Nov 2010 13:50:33 +0000</pubDate>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[4.1.2]]></category>
		<category><![CDATA[450]]></category>
		<category><![CDATA[mail.log]]></category>
		<category><![CDATA[postfix]]></category>
		<guid isPermaLink="false">http://blog.smsoft.it/?p=949</guid>

					<description><![CDATA[Se non riuscite ad inviare posta e tra i log di postfix (mail.log, etc) vedete: Nov 20 14:38:48 mail postfix/smtpd[26826]: NOQUEUE: reject: RCPT from unknown[123.123.123.123]: 450 4.1.2 : Recipient address rejected: Domain not found; from= to= proto=ESMTP helo= molto probabilmente il problema è nel fatto che postfix non riesce ad effettuare la risoluzione DNS del ... <a title="postfix: Recipient address rejected: Domain not found" class="read-more" href="https://blog.smsoft.it/2010/11/30/postfix-recipient-address-rejected-domain-not-found/" aria-label="Per saperne di più su postfix: Recipient address rejected: Domain not found">Leggi tutto</a>]]></description>
										<content:encoded><![CDATA[<p>Se non riuscite ad inviare posta e tra i log di postfix (mail.log, etc) vedete:</p>
<blockquote><p>Nov 20 14:38:48 mail postfix/smtpd[26826]: NOQUEUE: reject: RCPT from unknown[123.123.123.123]: 450 4.1.2 <info@example_dest.ext>: Recipient address rejected: Domain not found; from=<info@example_mitt.ext> to=<info@example_dest.ext> proto=ESMTP helo=<server3400></p></blockquote>
<p>molto probabilmente il problema è nel fatto che postfix non riesce ad effettuare la risoluzione DNS del dominio indicato nel log.</p>
<p>Facendo delle prove ho notato che nel mio caso il problema era proprio quello, ma pur modificando i server DNS nel classico file <strong>/etc/resolv.conf</strong> le cose non cambiavano. Controllando la documentazione mi sono accorto che postfix crea una copia del file resolv.conf in <strong>/var/spool/postfix/etc/</strong>.<br />
Pertanto, il nuovo file <strong>/etc/resolv.conf</strong> va copiato anche in <strong>/var/spool/postfix/etc/resolv.conf</strong></p>
<p>enjoy</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.smsoft.it/2010/11/30/postfix-recipient-address-rejected-domain-not-found/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Postfix e l&#8217;errore Sender address rejected: not owned by user</title>
		<link>https://blog.smsoft.it/2010/11/04/postfix-e-lerrore-sender-address-rejected-not-owned-by-user/</link>
					<comments>https://blog.smsoft.it/2010/11/04/postfix-e-lerrore-sender-address-rejected-not-owned-by-user/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 04 Nov 2010 07:39:21 +0000</pubDate>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[mta]]></category>
		<category><![CDATA[not owned by user]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[reject_sender_login_mismatch]]></category>
		<guid isPermaLink="false">http://blog.smsoft.it/?p=933</guid>

					<description><![CDATA[Dopo aver aggiornato l&#8217;MTA su un server mail (postfix), mi sono ritrovato con un problema: alcuni mittenti non riuscivano più a spedire posta. A prima vista si trattava dell&#8217;errore 5.7.1 e quindi sono andato a ricontrollare se i client erano effettivamente configurati per effettuare l&#8217;autenticazione per la posta in uscita. Sembrava tutto a posto ed ... <a title="Postfix e l&#8217;errore Sender address rejected: not owned by user" class="read-more" href="https://blog.smsoft.it/2010/11/04/postfix-e-lerrore-sender-address-rejected-not-owned-by-user/" aria-label="Per saperne di più su Postfix e l&#8217;errore Sender address rejected: not owned by user">Leggi tutto</a>]]></description>
										<content:encoded><![CDATA[<p>Dopo aver aggiornato l&#8217;MTA su un server mail (postfix), mi sono ritrovato con un problema: alcuni mittenti non riuscivano più a spedire posta. A prima vista si trattava dell&#8217;errore 5.7.1 e quindi sono andato a ricontrollare se i client erano effettivamente configurati per effettuare l&#8217;autenticazione per la posta in uscita. Sembrava tutto a posto ed allora ho controllato meglio i log (mail.log, mail.info, syslog); In particolare l&#8217;errore era del tipo:</p>
<blockquote><p>&#8230;. Sender address rejected: not owned by user &#8230;.</p></blockquote>
<p>In pratica mi stava dicendo che l&#8217;indirizzo email del mittente non combaciava con l&#8217;indirizzo email usato per l&#8217;autenticazione. Controllando il file di configurazione di postfix <strong>/etc/postfix/main.cf</strong> ho modificato la seguente riga:</p><pre class="urvanov-syntax-highlighter-plain-tag">smtpd_sender_restrictions = permit_mynetworks, reject_sender_login_mismatch, permit_sasl_authenticated</pre><p>in</p><pre class="urvanov-syntax-highlighter-plain-tag">smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated</pre><p>ho poi riavviato postfix</p><pre class="urvanov-syntax-highlighter-plain-tag">/etc/init.d/postfix restart</pre><p>e l&#8217;errore è sparito.</p>
<h2>Nota:</h2>
<p>E&#8217; ovvio che rimuovendo tale direttiva, il livello di sicurezza si abbassa. In alternativa è possibile lasciare attiva la direttiva prima indicata e creare un file con l&#8217;associazione degli indirizzi email mittenti e gli account usati per autenticarsi. La definizione è possibile abilitando la direttiva <strong>smtpd_sender_login_maps</strong> nel file di configurazione di postfix <strong>/etc/postfix/main.cf</strong> . In tale direttiva viene indicato il file che contiene l&#8217;associazione tra mittente ed account del server, ad esempio:</p><pre class="urvanov-syntax-highlighter-plain-tag">smtpd_sender_login_maps = hash:/etc/postfix/sender_login_maps</pre><p>va poi creato il file <strong>/etc/postfix/sender_login_maps</strong> con un contenuto del tipo:</p><pre class="urvanov-syntax-highlighter-plain-tag">xyz@dominio_reale.ext abc@dominio_locale.ext</pre><p>dove <strong>xyz@dominio_reale.ext</strong> è l&#8217;indirizzo email reale del mittente e <strong>abc@dominio_locale.ext</strong> è l&#8217;indirizzo (attivo sul server mail) che il mittente usa per autenticarsi.<br />
Infine bisogna lanciare il comando:</p><pre class="urvanov-syntax-highlighter-plain-tag">postmap /etc/postfix/sender_login_maps</pre><p>e chiaramente riavviare postfix</p><pre class="urvanov-syntax-highlighter-plain-tag">/etc/init.d/postfix restart</pre><p>enjoy</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.smsoft.it/2010/11/04/postfix-e-lerrore-sender-address-rejected-not-owned-by-user/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
