<?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/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>Postfix &#8211; Programador</title>
	<atom:link href="https://agcapa.es/category/postfix/feed/" rel="self" type="application/rss+xml" />
	<link>https://agcapa.es</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Tue, 02 Feb 2016 15:19:52 +0000</lastBuildDate>
	<language>es</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.7</generator>
<site xmlns="com-wordpress:feed-additions:1">130542897</site>	<item>
		<title>Many email messages are sent from PHP scripts on the server. How can I find the domains on which these scripts are running if I am using Postfix?</title>
		<link>https://agcapa.es/many-email-messages-are-sent-from-php-scripts-on-the-server-how-can-i-find-the-domains-on-which-these-scripts-are-running-if-i-am-using-postfix/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 02 Feb 2016 15:19:52 +0000</pubDate>
				<category><![CDATA[Postfix]]></category>
		<guid isPermaLink="false">http://agcapa.es/?p=319</guid>

					<description><![CDATA[<p>Many email messages are sent from PHP scripts on the server. How can I find the domains on which these scripts are running if I am using Postfix? Article ID: 114845, created on Sep 26, 2012, last review on Dic 18, 2015 APLICABLE A: Plesk for Linux/Unix Plesk Automation 11.5 Symptoms Many email messages are&#8230;</p>
<p>La entrada <a rel="nofollow" href="https://agcapa.es/many-email-messages-are-sent-from-php-scripts-on-the-server-how-can-i-find-the-domains-on-which-these-scripts-are-running-if-i-am-using-postfix/">Many email messages are sent from PHP scripts on the server. How can I find the domains on which these scripts are running if I am using Postfix?</a> se publicó primero en <a rel="nofollow" href="https://agcapa.es">Programador</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="article-container">
<h2 class="title">Many email messages are sent from PHP scripts on the server. How can I find the domains on which these scripts are running if I am using Postfix?</h2>
<p class="text-muted small">Article ID: <a href="http://kb.odin.com/en/114845">114845</a>, created on Sep 26, 2012, last review on Dic 18, 2015</p>
<div></div>
<div id="ArticleAppliesTo-22128"><strong>APLICABLE A:</strong></p>
<div class="articleApplies">
<ul>
<li>Plesk for Linux/Unix</li>
<li>Plesk Automation 11.5</li>
</ul>
</div>
</div>
<div class="article-internal-flag"></div>
<div id="article-content">
<h2>Symptoms</h2>
<p>Many email messages are being sent from PHP scripts on the server. How can I find the domains on which these scripts are running if I am using Postfix?</p>
<h2>Resolution</h2>
<p><strong>Note:</strong> This article is for Postfix. If you are using the Qmail mail server, see article<br />
<a title="1711" href="http://kb.odin.com/1711">1711</a>: Many email messages are sent from PHP scripts on the server. How can I find the domains on which these scripts are running?</p>
<p>There is a way to determine from which folder the PHP script that sends mail was run.</p>
<p><strong>Note:</strong> Depending on your operating system and Plesk version, the paths can differ slightly from those listed below.</p>
<ol>
<li>Create a <code>/usr/sbin/sendmail.postfix-wrapper</code> script with the following content:
<p>Create a file and open it for editing:</p>
<pre><code>#touch /usr/sbin/sendmail.postfix-wrapper
#vi /usr/sbin/sendmail.postfix-wrapper
</code></pre>
<p>Add the following content:</p>
<pre><code>#!/bin/sh
(echo X-Additional-Header: $PWD ;cat) | tee -a /var/tmp/mail.send|/usr/sbin/sendmail.postfix-bin "$@"
</code></pre>
<p>Note that this should be two lines, including <strong>#!/bin/sh</strong>.</li>
<li>Create a log file, <code>/var/tmp/mail.send</code>, and grant it <strong>a+rw</strong> rights. Make the wrapper executable, rename the old <code>sendmail</code>, and link it to the new wrapper. Then run the commands below:
<pre><code>~# touch /var/tmp/mail.send
~# chmod a+rw /var/tmp/mail.send
~# chmod a+x /usr/sbin/sendmail.postfix-wrapper
~# mv /usr/sbin/sendmail.postfix /usr/sbin/sendmail.postfix-bin
~# ln -s /usr/sbin/sendmail.postfix-wrapper /usr/sbin/sendmail.postfix
</code></pre>
</li>
<li>Wait for an hour and change the sendmail back:
<pre><code>~# rm -f /usr/sbin/sendmail.postfix
~# mv /usr/sbin/sendmail.postfix-bin /usr/sbin/sendmail.postfix
</code></pre>
</li>
</ol>
<p>Check the <code>/var/tmp/mail.send</code> file. There should be lines starting with <strong>X-Additional-Header:</strong> pointing to the domain folders where the scripts that sent the mail are located.</p>
<p>You can see all the folders from which mail PHP scripts were run with the following command:</p>
<pre><code>    ~# grep X-Additional /var/tmp/mail.send | grep `cat /etc/psa/psa.conf | grep HTTPD_VHOSTS_D | sed -e 's/HTTPD_VHOSTS_D//' `
</code></pre>
<p><span style="color: red;"> <strong>NOTE:</strong> If you see no output from the above command, it means no mail was sent using the PHP mail() function from the Plesk virtual hosts directory. </span></p>
<p>Usually, that means one of the mail accounts has been compromised. Check the login attempt count:</p>
<pre><code># zgrep -c 'sasl_method=LOGIN' /usr/local/psa/var/log/maillog*
/usr/local/psa/var/log/maillog:221000
/usr/local/psa/var/log/maillog.processed:362327
/usr/local/psa/var/log/maillog.processed.1.gz:308956
</code></pre>
<p>If you see an unusually high number of login attempts, it is very likely accounts were compromised. You can try identifying these accounts in the following way:</p>
<pre><code># zgrep 'sasl_method=LOGIN' /usr/local/psa/var/log/maillog* | awk '{print $9}' | sort | uniq -c | sort -nr | head
891574 sasl_username=admin@example.com
</code></pre>
<p>To stop spam from being sent, change passwords for the compromised accounts and restart the Postfix service.</p>
<p>For <code>Plesk 12</code> also visit <a href="http://download1.parallels.com/Plesk/Doc/en-US/online/plesk-administrator-guide/index.htm?fileName=71349.htm">Administrator&#8217;s Guide page</a></p>
</div>
</div>
<div class="kcs-customers-words">
<h2>Palabras de búsqueda:</h2>
<h1 class="customer-word onclick-search-with-content">Deferred E-Mails In Queue Not Delivering</h1>
<h1 class="customer-word onclick-search-with-content">wrapper</h1>
<h1 class="customer-word onclick-search-with-content">Spam on PPA Node</h1>
<h1 class="customer-word onclick-search-with-content">Mail Spamming</h1>
<h1 class="customer-word onclick-search-with-content">spam from external domain</h1>
<h1 class="customer-word onclick-search-with-content">11</h1>
<h1 class="customer-word onclick-search-with-content">pleskfatalexception</h1>
<h1 class="customer-word onclick-search-with-content">sending email name of someone else</h1>
<h1 class="customer-word onclick-search-with-content">SPam</h1>
<h1 class="customer-word onclick-search-with-content">mail</h1>
<h1 class="customer-word onclick-search-with-content">Script can be send mail but the option was disable on hosting plan</h1>
<h1 class="customer-word onclick-search-with-content">Suspicious E-Mail Headers In Mail Queue</h1>
<h1 class="customer-word onclick-search-with-content">Hello, Since last update to plesk12 have many problems of spam received as sent. We have verified that the settings wrapper in plesk 11.5 is not equal in plesk 12. I followed the steps in the kb http://kb.sp.parallels.com/1711 but not correct for plesk12. Could you install wrapper to ples12, please? Thanks.</h1>
<h1 class="customer-word onclick-search-with-content">php ini plesk</h1>
<h1 class="customer-word onclick-search-with-content">apache</h1>
<h1 class="customer-word onclick-search-with-content">spam</h1>
<h1 class="customer-word onclick-search-with-content">spam issue</h1>
<h1 class="customer-word onclick-search-with-content">mail queue spam</h1>
<h1 class="customer-word onclick-search-with-content">mail queue</h1>
<h1 class="customer-word onclick-search-with-content">error wrapper</h1>
<h1 class="customer-word onclick-search-with-content">mails rdns do not match to SMTP banner</h1>
<h1 class="customer-word onclick-search-with-content">Nonostante sia stato attivata la&#8217;utentificazione smtp, da giorni in coda mail ci sono svariate mail inviate da WORLDST-UQ3K9Q0</h1>
<h1 class="customer-word onclick-search-with-content">thousands of spam for an email address that doesn&#8217;t exist</h1>
<h1 class="customer-word onclick-search-with-content">postfix/smtp: certificate verification failed for gmail Equifax Secure Certificate Authority</h1>
<h1 class="customer-word onclick-search-with-content">outgoing spam</h1>
<h1 class="customer-word onclick-search-with-content">Spam mails getting sent</h1>
<h1 class="customer-word onclick-search-with-content">Spam being sent to our SMTP</h1>
<h1 class="customer-word onclick-search-with-content">plesk server mail not nbeing sent</h1>
<h1 class="customer-word onclick-search-with-content">DNS Flood Analysis</h1>
<h1 class="customer-word onclick-search-with-content">sql</h1>
<h1 class="customer-word onclick-search-with-content">spammer</h1>
<h1 class="customer-word onclick-search-with-content">plesk panel running slow</h1>
<h1 class="customer-word onclick-search-with-content">Mail Spmming</h1>
<h1 class="customer-word onclick-search-with-content">script</h1>
</div>
<p>La entrada <a rel="nofollow" href="https://agcapa.es/many-email-messages-are-sent-from-php-scripts-on-the-server-how-can-i-find-the-domains-on-which-these-scripts-are-running-if-i-am-using-postfix/">Many email messages are sent from PHP scripts on the server. How can I find the domains on which these scripts are running if I am using Postfix?</a> se publicó primero en <a rel="nofollow" href="https://agcapa.es">Programador</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">319</post-id>	</item>
		<item>
		<title>Postfix Mail Server</title>
		<link>https://agcapa.es/postfix-mail-server/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 16 Oct 2013 14:43:10 +0000</pubDate>
				<category><![CDATA[Postfix]]></category>
		<guid isPermaLink="false">http://agcapa.es/?p=186</guid>

					<description><![CDATA[<p>Install most of the needed software from Fedora Extras using yum: yum install postfix mysql-server spamassassin clamav amavisd-new cyrus-sasl clamav-update sqlgrey Start sasl: /sbin/service saslauthd start Start your favorite email client and send a test message to another server/mail system. Connect to the server with the following settings: Host: host.example.com User: local-user Password: local-user&#8217;s password&#8230;</p>
<p>La entrada <a rel="nofollow" href="https://agcapa.es/postfix-mail-server/">Postfix Mail Server</a> se publicó primero en <a rel="nofollow" href="https://agcapa.es">Programador</a>.</p>
]]></description>
										<content:encoded><![CDATA[<ol>
<li>
<ol>
<li>Install most of the needed software from Fedora Extras using yum:</li>
<pre><strong>yum install postfix mysql-server spamassassin 
 clamav amavisd-new cyrus-sasl clamav-update sqlgrey</strong></pre>
</ol>
</li>
<li>
<ol>
<li>Start sasl:</li>
<pre><strong>/sbin/service saslauthd start</strong></pre>
<li>Start your favorite email client and send a test message to another server/mail system. Connect to the server with the following settings:
<ul>
<li>Host: host.example.com</li>
<li>User: local-user</li>
<li>Password: local-user&#8217;s password</li>
<li>Force TLS for SMTP</li>
<li>Force SMTP Auth</li>
</ul>
</li>
<p>In addition to a remote account, you could also send a test message to root, another account or yourself.</ol>
<ol>
<li>Configure amavisd-new. Make the following changes to the <em>/etc/amavisd/amavisd.conf</em> config file:<br />
$myhostname is only needed when the server has not  been assigned a FQDN, however, it does not hurt to set the variable;  check with the command &#8216;hostname&#8217;</li>
<pre><strong>$mydomain = 'example.com';
$myhostname = 'host.example.com';</strong></pre>
<li>Configure SpamAssassin to do extended checks such as rbl, pyzor, razor2, etc. Make the following changes to the <em>/etc/mail/spamassassin/local.cf</em> config file:</li>
<pre><strong>report_safe             1
use_bayes               1
bayes_auto_learn        1
skip_rbl_checks         0
use_razor2              1
use_dcc                 1
use_pyzor               1
whitelist_from *@example.com</strong></pre>
<li>Enable ClamAV to do automatic updates to virus definitions. Make the following changes to <em>/etc/sysconfig/freshclam</em>:<br />
Note: The change is to comment out this line.</li>
<pre><strong>#FRESHCLAM_DELAY=disabled-warn  # REMOVE ME</strong></pre>
<li>Update <em>/etc/freshclam.conf</em> to enable automatic updates:<br />
Note: The change is to comment out &#8216;Example&#8217;.&nbsp;</p>
<pre><strong>#Example</strong></pre>
</li>
<li>Start everything up:</li>
<pre><strong>/sbin/service amavisd start
/sbin/service clamd.amavisd start
/sbin/service spamassassin start</strong></pre>
</ol>
<ol>
<li>Add the following to <em>/etc/postfix/master.cf</em>:</li>
<pre><strong>smtp-amavis unix -      -       n       -       2       smtp
    -o smtp_data_done_timeout=1200
    -o smtp_send_xforward_command=yes
    -o disable_dns_lookups=yes
    -o max_use=20

127.0.0.1:10025 inet n  -       n       -       -  smtpd
    -o content_filter=
    -o local_recipient_maps=
    -o relay_recipient_maps=
    -o smtpd_restriction_classes=
    -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 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</strong></pre>
<li>Add the following to the <em>/etc/postfix/main.cf</em> config file:</li>
<pre><strong>content_filter = smtp-amavis:[127.0.0.1]:10024</strong></pre>
<li>Restart postfix to apply the changes:</li>
<pre><strong>/sbin/service postfix restart</strong></pre>
</ol>
<ol>
<li>Setup the mysql database:</li>
<p>This assumes mysql server has not been setup and we are dealing with a fresh configuration. If mysql is already setup, you will need to use the &#8216;-p&#8217; switch for the mysql commands and there is no reason to set a new mysql root password. Also note, you may use whatever user/database name you want but this will need to be updated in the conf file.</p>
<pre><strong>/sbin/service mysqld start
mysql -u root</strong></pre>
<li>This will bring you to the mysql shell where you can add the needed user and database for sqlgrey:</li>
<p>Commands are in <strong>bold</strong> responses are in <em>italics</em></p>
<pre><strong>mysql&gt; create database sqlgrey;</strong>
<em>Query OK, 1 row affected (0.01 sec)</em>
<strong>mysql&gt; grant all on sqlgrey.* to sqlgrey@localhost identified by 'mysqlUserPassword';</strong>
<em>Query OK, 0 rows affected (0.01 sec)</em>
<strong>mysql&gt; quit</strong><em>
Bye</em></pre>
<li>Set a root password for mysql:</li>
<pre><strong>mysqladmin -u root password "mysqlRootPassword"</strong></pre>
<li>Configure sqlgrey for the database. Make the following changes to the <em>/etc/sqlgrey/sqlgrey.conf</em> config:</li>
<pre><strong>db_type = mysql
db_pass = mysqlUserPassword
admin_mail = server-admin@example.com</strong></pre>
<li>Start the sqlgrey service:</li>
<pre><strong>/sbin/service sqlgrey start</strong></pre>
</ol>
<ol>
<li>Configure postfix to do the greylist check. Make the following update to the <em>/etc/postfix/main.cf</em> config file:</li>
<pre><strong>smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, check_policy_service inet:127.0.0.1:2501</strong></pre>
<li>Restart postfix to apply the changes:</li>
<pre><strong>/sbin/service postfix restart</strong></pre>
</ol>
</li>
<h3>
<li>Install Needed Software</li>
</h3>
<div>
<h3>
<li>Configure and Test Postfix</li>
</h3>
<div>
<ol>
<li>Do some basic configuration to setup postfix before first starting it. Find the configuration variables and update them. Edit the <em>/etc/postfix/main.cf</em> configuration file and make the following changes:</li>
<pre>mydomain = example.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks_style = host</pre>
<li>Start the server for the first time:</li>
<pre>/sbin/service postfix start</pre>
<li>Send a test mail to a local user using telnet:</li>
<p>commands are in <strong>bold</strong> reponses are in <em>italics</em></p>
<pre><strong>telnet localhost 25</strong>
<em>Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 host.example.com ESMTP Postfix</em>&gt;
<strong>EHLO testdomain.com</strong>
<em>250-host.example.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME</em>
<strong>MAIL FROM: &lt;user@testdomain.com&gt;</strong>
<em>250 2.1.0 Ok</em>
<strong>RCPT TO: &lt;local-user@example.com&gt;</strong>
<em>250 2.1.5 Ok</em>
<strong>DATA</strong>
<em>354 End data with &lt;CR&gt;&lt;LF&gt;.&lt;CR&gt;&lt;LF&gt;</em>
<strong>Subject: Hello local-user
Hey local-user,
I just wanted to send some test mail to you :-)
.
</strong><em>250 2.0.0 Ok: queued as B95C8110064</em>
<strong>QUIT</strong></pre>
<li>Check the users mail with the &#8216;mail&#8217; command when logged in as the <em>local-user</em>:</li>
<pre><strong>mail</strong></pre>
<p>If this worked delete the users mail and move on, &#8216;man mail&#8217; for more information about the mail command.</ol>
</div>
<h3>
<li>Do Some More Configuration for Postfix</li>
</h3>
<p>This section start to configure postfix to be more secure. There are some options that are personal preferences of the author and may be changed. They are as follows:</p>
<ul>
<li>Mail is stored in $HOME</li>
<li>TLS required for sending mail remotely</li>
<li>Certificates in <em>/etc/postfix</em></li>
<li>The &#8216;standard&#8217; is <em>/etc/pki/tls</em></li>
</ul>
<ol>
<li>Update the /etc/postfix/main.cf postfix configuration file and make the following changes:
<ol>
<li>The following changes are updates:</li>
<pre><strong>home_mailbox = Maildir/</strong></pre>
<li>These changes are additions to the configuration file and may be added at the end of the file.</li>
<pre><strong>#TLS - SMTP AUTH
disable_vrfy_command = yes
smtpd_use_tls = yes
smtpd_tls_auth_only = yes
tls_random_source = dev:/dev/urandom
smtpd_tls_cert_file = /etc/postfix/cert.pem
smtpd_tls_key_file = /etc/postfix/key.pem
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
# Add some security
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination</strong></pre>
</ol>
</li>
<li>Move your certificates to the proper location <em>(/etc/postfix/cert.pem and /etc/postfix/key.pem respectivly)</em> and set proper permissions <em>(600)</em>.<br />
If you don&#8217;t have a certificate already, you may generate a self signed cert with the following commands:&nbsp;</p>
<pre><strong>cd /etc/postfix
openssl req -new -x509 -nodes -out cert.pem -keyout key.pem -days 3650
chmod 600 *.pem
</strong></pre>
</li>
<li>Restart the server:</li>
<pre><strong>/sbin/service postfix restart</strong></pre>
<li>Try to send test mail to your local-user account both from localhost and a remote server.</li>
<p>This should work. It would also be a good test to make sure that your server will not relay mail so try to send mail to another host using your server. It is recommended to continue to send testing mail with telnet so the maximum amount of information is available to debug what is going wrong. You should notice a new response from the server after you &#8216;<em>EHLO</em>&#8216;:</p>
<pre><em>EHLO testdomain.com
250-host.example.com
250-PIPELINING
250-SIZE 10240000
250-ETRN</em>
<strong>250-STARTTLS</strong>
<em>250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN</em></pre>
<li>Test if TLS is working correctly:</li>
<p>commands are in <strong>bold</strong> reponses are in <em>italics</em></p>
<pre><strong>telnet localhost 25</strong>
<em>Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 host.example.com ESMTP Postfix</em>
<strong>EHLO testdomain.com</strong>
<em>250-host.example.com
250-PIPELINING
250-SIZE 10240000
250-ETRN
250-STARTTLS</em>
<em>250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
</em><strong>STARTTLS
</strong><em>220 2.0.0 Ready to start TLS</em></pre>
<p>If you do not see &#8216;Ready to start TLS&#8217;, something is wrong with your TLS setup.</ol>
</div>
<h3>
<li>Test SMTP Auth Using a Standard Mail Client</li>
</h3>
<p>Use your favorite mail client to test if SMTP auth is working. If TLS is not working, SMTP auth will also not work because this howto forces postfix to use TLS when doing SMTP auth.</p>
<h3>
<li>Setup Amavisd-New, Spam Assassin, Clam-AV</li>
</h3>
<p>Amavisd-new is the content filter that will run the spamassassin and clamav checks. It could also be configured to do other checks and has many other features. Those addtional features are outside the scope of this howto and might be added later.</p>
<h3>
<li>Configure Postfix to Use the New Content Filtering System</li>
</h3>
<p>Postfix needs to be told to use the new content filtering system. A few things need to be changed to enable the new filtering system.</p>
<h3>
<li>Setup Grey Listing</li>
</h3>
<p>Grey listing is an anti-spam technique that is used to twart spammers from doing drive by spamming. There are two steps to get it working with postfix. Setting up the mysql database and then enabiling the checks. You may use any supported database you would like but additional database configurations are outside of the scope of this howto. <em>Replace sensitive information such as passwords with unique settings.</em></p>
<h3>
<li>Setup Postfix to Do Grey Listing</li>
</h3>
<p>Postfix needs to be configured to check the greylisting service for the status of a sender.</p>
<h3>
<li>Set Services to Run on Boot</li>
</h3>
<p>The combination of services need to get set to run on boot. Do so with &#8216;chkconfig&#8217;:</p>
<pre><strong>/sbin/chkconfig postfix on</strong>
<strong>/sbin/chkconfig amavisd on</strong>
<strong>/sbin/chkconfig clamd.amavisd on</strong>
<strong>/sbin/chkconfig spamassassin on</strong>
<strong>/sbin/chkconfig mysqld on</strong>
<strong>/sbin/chkconfig sqlgrey on</strong></pre>
</ol>
<h2>Troubleshooting</h2>
<p>&nbsp;</p>
<h3>How to Test</h3>
<div>
<p>Test by sending mail from a remote service/server.</p>
</div>
<h3>Common Problems and Fixes</h3>
<div>
<p>The most common issue is networking issues. Please be sure your networking is setup correctly. For example the below is to allow port 25:tcp using iptables:</p>
</div>
<pre><strong>-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT</strong></pre>
<p>La entrada <a rel="nofollow" href="https://agcapa.es/postfix-mail-server/">Postfix Mail Server</a> se publicó primero en <a rel="nofollow" href="https://agcapa.es">Programador</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">186</post-id>	</item>
		<item>
		<title>Como mostrar y vaciar la cola de postfix</title>
		<link>https://agcapa.es/como-mostrar-y-vaciar-la-cola-de-postfix/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 06 Mar 2013 14:57:29 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Postfix]]></category>
		<guid isPermaLink="false">http://agcapa.es/?p=131</guid>

					<description><![CDATA[<p>Como mostrar y vaciar la cola de postfix qshape deferred &#124; head Para ver todos loe email en cola Tip rapidísimo de postfix. Para mostrar que emails están en cola, osea, aun no se han enviado: mailq Para borrar un email de la cola: postsuper -d queue_id Para borrar todos esos emails de la cola:&#8230;</p>
<p>La entrada <a rel="nofollow" href="https://agcapa.es/como-mostrar-y-vaciar-la-cola-de-postfix/">Como mostrar y vaciar la cola de postfix</a> se publicó primero en <a rel="nofollow" href="https://agcapa.es">Programador</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div id="post-472">
<h2>Como mostrar y vaciar la cola de postfix</h2>
<div id="post-472">
<pre>qshape deferred | head
Para ver todos loe email en cola</pre>
</div>
<div>
<p>Tip rapidísimo de postfix.</p>
<p>Para mostrar que emails están en cola, osea, aun no se han enviado:</p>
<div>
<div>
<pre>mailq</pre>
</div>
</div>
<p>Para borrar un email de la cola:</p>
<div>
<div>
<pre>postsuper -d queue_id</pre>
</div>
</div>
<p>Para borrar todos esos emails de la cola:</p>
<div>
<div>
<pre>postsuper -d ALL

Mas comandos:
<code> postsuper -d numero</code> (eliminar el mensaje)
 <code>postsuper -d ALL</code> (eliminar todos los mensajes)
 <code>postsuper -r Number</code> (Encolar de nuevo el mensaje)
 <code>postsuper -r ALL</code> (Encolar de nuevo todos los mensajes)
 <code>postqueue -p </code> (Mostrar la cola de correo por pantalla)
 <code>postqueue -f </code> (Hacer un flush de la cola de correo, intentar enviar todos los correos)

Para saber cual es la cabecera de un mail:
 postcat -q Numero de la cabecera | more</pre>
</div>
</div>
</div>
</div>
<p>La entrada <a rel="nofollow" href="https://agcapa.es/como-mostrar-y-vaciar-la-cola-de-postfix/">Como mostrar y vaciar la cola de postfix</a> se publicó primero en <a rel="nofollow" href="https://agcapa.es">Programador</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">131</post-id>	</item>
		<item>
		<title>abrir relay en postfix</title>
		<link>https://agcapa.es/abrir-relay-en-postfix/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 18 May 2011 08:34:27 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Postfix]]></category>
		<guid isPermaLink="false">https://disternet.agcapa.com/?p=73</guid>

					<description><![CDATA[<p>Mynetworks = 127.0.0.0/8,166.166.165.0/24,206.236.6.266</p>
<p>La entrada <a rel="nofollow" href="https://agcapa.es/abrir-relay-en-postfix/">abrir relay en postfix</a> se publicó primero en <a rel="nofollow" href="https://agcapa.es">Programador</a>.</p>
]]></description>
										<content:encoded><![CDATA[<pre>Mynetworks = 127.0.0.0/8,166.166.165.0/24,206.236.6.266
</pre>
<p>La entrada <a rel="nofollow" href="https://agcapa.es/abrir-relay-en-postfix/">abrir relay en postfix</a> se publicó primero en <a rel="nofollow" href="https://agcapa.es">Programador</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">73</post-id>	</item>
		<item>
		<title>change pasword squirrelmail</title>
		<link>https://agcapa.es/change-pasword-squirrelmail/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 17 Mar 2011 14:37:03 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Postfix]]></category>
		<guid isPermaLink="false">https://disternet.agcapa.com/?p=51</guid>

					<description><![CDATA[<p>Install the SquirrelMail Change Password Plugin Service Configuration1. Install the Poppassd service. ImportantPoppassd should be installed on the same server where dovecot is installed. And if it is not on the same server as SquirrelMail, then open the poppassd port 106. SquirrelMail2. Connect to your SquirrelMail server and note down its version. SquirrelMail3. Download the&#8230;</p>
<p>La entrada <a rel="nofollow" href="https://agcapa.es/change-pasword-squirrelmail/">change pasword squirrelmail</a> se publicó primero en <a rel="nofollow" href="https://agcapa.es">Programador</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Install the SquirrelMail Change Password Plugin<br />
Service Configuration1. Install the Poppassd service.<br />
ImportantPoppassd should be installed on the same server where dovecot is installed. And if it is not on the same server as SquirrelMail, then open the poppassd port 106.<br />
SquirrelMail2. Connect to your SquirrelMail server and note down its version.<br />
SquirrelMail3. Download the Change Passwd 4.2f and Compatibility 2.0.x plugins.<br />
SquirrelMail4. Extract the downloaded files and put them into the /usr/share/squirrelmail/plugins directory.<br />
NoteThe SquirrelMail Change Password and Compatibility archives has to be extracted directly into the SquirrelMail plugin directory to enable Linux to apply the proper SELinux Context into the files. See the SquirrelMail RetrieveUserData plugin if you need help on how to do it.<br />
SquirrelMail Configuration5. From a Terminal window, type in /usr/share/squirrelmail/config/conf.pl and press Enter. This will launch the SquirrelMail Configuration utility.<br />
NoteIf your Terminal window has a white background, make sure that the colors are off by looking for the command Turn color on. If the command is Turn color off, type in C and press Enter to turn the colors off. This will ensure that you will be able to read all of the text.<br />
SquirrelMail Configuration6. Type in 8 and press Enter to list the Plugins submenu.<br />
SquirrelMail Configuration7. Install the change_passwd plugin by typing in the number corresponding to it and press Enter. When you are done, type in q and press Enter to quit then type in y and press Enter to save your changes.<br />
Terminal<br />
8. If your version of SquirrelMail is not 1.4.13 and higher or 1.5.1 and higher, you need to patch your SquirrelMail source. Go to /usr/share/squirrelmail/plugins/compatibility and apply the compatibility patch by typing in the commands below.</p>
<p>cd /usr/share/squirrelmail/plugins/compatibility/<br />
patch -p0 < patches/compatibility_patch-1.4.8.diff

Replace 1.4.8 with your SquirrelMail version.
GEdit9. In the /usr/share/squirrelmail/plugins/change_passwd directory, copy the file config.php.sample and save it as config.php. Edit config.php and review the default settings.

Below are settings in config.php you may wish to change

    * $minimumPasswordLength - Minimum length of the password.
    * $changePasswdInLogin - Change password from the login form.

Test the SquirrelMail Change Password
SquirrelMail1. Login to SquirrelMail and go to the Options page. You should see the new Change Password section.
SquirrelMail2. Click the Change Password link to view the new Change Password page.
</p>
<p>La entrada <a rel="nofollow" href="https://agcapa.es/change-pasword-squirrelmail/">change pasword squirrelmail</a> se publicó primero en <a rel="nofollow" href="https://agcapa.es">Programador</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">51</post-id>	</item>
		<item>
		<title>Bloquear un dominio en postfix</title>
		<link>https://agcapa.es/bloquear-un-dominio-en-postfix/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 25 Feb 2011 11:55:33 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Postfix]]></category>
		<guid isPermaLink="false">http://disternet.agcapa.com/?p=13</guid>

					<description><![CDATA[<p>Bloqueo de SPAM mediante postfix Si estás en la larga lista de las víctimas de SPAM (correo no deseado), puedes seguir varias técnicas para bloquearlo, o bien una combinación de todas ellas. * Bloqueo de mensajes según remitente. * Bloqueo de mensajes según listas negras de dominios. * Bloqueo de mensajes según el contenido de&#8230;</p>
<p>La entrada <a rel="nofollow" href="https://agcapa.es/bloquear-un-dominio-en-postfix/">Bloquear un dominio en postfix</a> se publicó primero en <a rel="nofollow" href="https://agcapa.es">Programador</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Bloqueo de SPAM mediante postfix<br />
Si estás en la larga lista de las víctimas de SPAM (correo no deseado), puedes seguir varias técnicas para bloquearlo, o bien una combinación de todas<br />
ellas.</p>
<p>    * Bloqueo de mensajes según remitente.<br />
    * Bloqueo de mensajes según listas negras de dominios.<br />
    * Bloqueo de mensajes según el contenido de las cabeceras.</p>
<p>En mi caso (un caso grave, hay que decirlo), decidí usar los tres al mismo<br />
tiempo. Os explico cómo.<br />
Bloqueo de mensajes según remitente<br />
Para bloquear los mensajes bien por un remitente concreto o bien por el dominio o parte del dominio, es necesario crear un fichero llamado access en el directorio del postfix (en mi caso, /etc/postfix), como por ejemplo:</p>
<p>kornet.net 517 Delivery not authorized, message refused<br />
kr 517 Delivery not authorized, message refused<br />
goodlook@korea.net 517 Delivery not authorized, message refused</p>
<p>Tras lo cual es necesario crear el fichero con extensión db<br />
correspondiente, mediante el comando postfix access en el directorio del<br />
postfix.</p>
<p>Por último, hay que añadir la siguiente línea en el fichero /etc/postfix/main.cf:</p>
<p>smtpd_sender_restrictions = hash:/etc/postfix/access</p>
<p>La entrada <a rel="nofollow" href="https://agcapa.es/bloquear-un-dominio-en-postfix/">Bloquear un dominio en postfix</a> se publicó primero en <a rel="nofollow" href="https://agcapa.es">Programador</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">13</post-id>	</item>
	</channel>
</rss>
