How to activate Steempress plugin in WordPress !

A week ago, I posted on a story about how to integrate wordpress with Blockchain steem. Here link!

Now I post from my blog that built with CMS wordpress where I installed and activated the stempress!

Let’s start with activating the steempres plugin.

As you can see in the picture you have to click on the “Activate” button and it should look like Stempress!

Now click on the settings and go to the activation menu.
Here we have to connect with the user and “Posting key” from the steem.
The “Posting key” is taken from our account on
Click on “SHOW PRIBATE KEY” to show your real key for login.¬† What you see at first time it’s not your real key.

Once you log in, it should look like this!
That’s all, when you post, you have the option of posting what you write on the blog or not on steem Blockchain. See picture!

I think this is the first wordpress written post that also appears on Steem blockchain.

I wish you an excellent day!

Postfix user sender resctriction

Hello all !

Today we want to restrict local user to send mail to more destinations!

1 First step

postconf -e 'smtpd_recipient_restrictions = check_sender_access hash:/etc/postfix/restricted_senders'
postconf -e 'smtpd_restriction_classes = local_only'
postconf -e 'local_only = check_recipient_access hash:/etc/postfix/local_domains, reject'

2. Step 2 Then create the file /etc/postfix/restricted_senders which looks similar to this one:        local_only       local_only

3. Final step Afterwards create /etc/postfix/local_domains which should look similar to this:                  OK                 OK             OK

After this restart your server postfix! Enjoy!
(Source Thanks falko )

Samba Tips

Hello, in this page we show few tips for samba.

Q: How to force the master browser to re-run?
A: Run next command

# smbcontrol nmbd force-election

Q: How do we find out who the master browser is in the network ?
A: Run next command

 # nmblookup -M -- -

In this case I found some master computer browser.
Q: How do you know the name of netbios if you know IP address ?
A: Run next command

# nmblookup -A
Looking up status of
        OTL-DEPOZIT-2   -         B 
        OTL           -  B 
        OTL-DEPOZIT-2   -         B 
        OTL           -  B 

        MAC Address = 50-E5-49-90-E2-03

Q: And vice versa ?
A: See next

nmblookup -S OTL-DEPOZIT-2
Looking up status of
        OTL-DEPOZIT-2   -         B 
        OTL           -  B 
        OTL-DEPOZIT-2   -         B 
        OTL           -  B 

        MAC Address = 50-E5-49-90-E2-03

Other userful command, smbtree, smbstatus.


How to setup bind9 on Debian 8

This tutorial explains how to setup a DNS server using Bind9 on Debian 8.

# apt update && apt-get install bind9 bind9utils resolvconf
# apt install dnsutils

Start BIND on boot:

# systemctl enable bind9

Backup current Bind9 settings and edit file.

# cp /etc/bind/named.conf.options /etc/bind/named.conf.options.orig
# vim /etc/bind/named.conf.options

And add:

options {
        directory "/var/cache/bind";

        // If there is a firewall between you and nameservers you want
        // to talk to, you may need to fix the firewall to allow multiple
        // ports to talk.  See

        // If your ISP provided one or more IP addresses for stable
        // nameservers, you probably want to use them as forwarders.
        // Uncomment the following block, and insert the addresses replacing
        // the all-0's placeholder.

        // forwarders {
        // };

        // If BIND logs error messages about the root key being expired,
        // you will need to update your keys.  See
        dnssec-validation auto;

        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { none; };
        statistics-file "/var/cache/bind/named.stats";
        rrset-order {order cyclic;};
        allow-transfer { your-nameserver-sec; };

        # Disable built-in server information zones.
        version none;
        hostname none;
        server-id none;

        # Maximum number of simultaneous client TCP connections to accept.
        tcp-clients 50;

        # Attempt to do all the work required to answer the query.
        recursion yes;
        recursive-clients 500;
        allow-recursion { your-network-client; };
        allow-query { any; };

logging {
        channel b_query {
                file "/var/log/bind9/query.log" versions 2 size 1m;
                print-time yes;
                severity info;
        category queries { b_query; };

Create the log directory for Bind9.

# mkdir /var/log/bind9
# chown bind. /var/log/bind9

Edit vim /etc/bind/named.conf to add your domain zone file location.

 zone "your-domain.tld" {
        type master;
        file "/etc/bind/zones/db.your-domain.tld";

And now restart your nameserver:

# systemctl restart bind9
# systemctl status bind9


Configure BIND as a Catching-only DNS Server on Debian Wheezy

How to upgrade Postfixadmin from old version to new version.

Hello, we need now to upgrade from postfixadmin-2.3.5 to postfixadmin-3.0.2.

This document describes upgrading from an older PostfixAdmin version >= v1.5x on Centos Linux.

2: Backup the Database and file!

[root@mail html]# cp -p -R postfixadmin-2.3.5 postfixadmin-2.3.5-bkp
[root@mail html]# mysqldump -uroot -p –routines –single-transaction postfix > /root/work/postfix-sqldump.sql

2: Go to html directory

[root@mail html]# cd /var/www/html/

Get new archive

[root@mail html]# wget

Unarchive new Postfix Admin

[root@mail html]# tar -zxvf postfixadmin-3.0.2.tar.gz

3: Change permissions

[root@mail html]# cd /var/www/html/postfixadmin-3.0.2
[root@mail postfixadmin-3.0.2]# find -type f -print0 | xargs -0 chmod 640
[root@mail postfixadmin-3.0.2]# find -type f -print0 | xargs -0 chown root:apache
[root@mail postfixadmin-3.0.2]# chown -R apache. templates_c/

( if your Apache runs as user “apache” )

4: Configure

Check the file. There you can specify settings that are relevant to your setup.

Comparing with your previous using “diff” might save you some time.

You can use a config.local.php file to contain your local settings. These will override any defined in – and save some time when upgrading to a new version of PostfixAdmin ūüėČ

5: Run setup.php

Go to you apache vhost and change the path.

[root@mail html]# vim /etc/httpd/conf/httpd.conf

ServerPath /postfixadmin-3.0.2
DocumentRoot /var/www/html/postfixadmin-3.0.2
CustomLog /var/log/httpd/postfixadmin_access.log combined
ErrorLog /var/log/httpd/postfixadmin_error.log

Restart apache service:
[root@mail html]# service httpd restart

Now we run setup.php
I open a new tab in my browser and type

If it is ok you should see like this:

Postfix Admin Setup Checker

Running software:

  • PHP version 5.3.3
  • Apache

Checking for dependencies:

  • Magic Quotes: Disabled – OK
  • Depends on: presence – OK
  • Checking $CONF[‘configured’] – OK
  • Smarty template compile directory is writable – OK
  • Depends on: MySQL 3.23, 4.0 – OK
  • Depends on: MySQL 4.1 – OK
    (change the database_type to ‘mysqli’ in if you want to use MySQL)
  • Depends on: SQLite – OK
    (change the database_type to ‘sqlite’ in if you want to use SQLite)
  • Testing database connection – OK – mysql://postfix:xxxxx@localhost/postfix
  • Depends on: session – OK
  • Depends on: pcre – OK
  • Depends on: multibyte string – OK
  • Depends on: IMAP functions – OK

Everything seems fine… attempting to create/update database structure

Database is up to date

Since version 2.3, PostfixAdmin supports alias domains ($CONF[‘alias_domain’]).
If you want to use them, you have to add some queries to your postfix config – see POSTFIX_CONF for details.

This is all that is needed.

How to remove your server from the blacklist!

How to remove your mail server from blacklist, it is a big problem sometimes.

  1. Make sure you have Revers DNS
  2. Make sure you do not have a mail account in your server that spam the internet, you will check with mailq and search in your log file.
  3.  Check if your IP is on a mailing blacklist using our blacklist checking service.
  4. The most heavy it is to remove from Hotmail blacklist. You can find the form here.   You can also join the Junk Mail Reporting Program (JMRP).
  5. Check your IP in next website:,

If will find more resources will post here.


Configure mail server on Centos 7 with Postfix, Dovecot, Apache, postfixadmin and Roundcube.

We starting from Centos 7 Infrastructure Server with Mail Server from Installer.
We have now:

1 – We have public IP
2 – Revers DNS for this IP
3 – Domain already bought.

Step 0. Preparing with minimal aplication to install:

yum -y install wget whois nc vim gpm ppp rp-pppoe dialog logwatch telnet nmap mutt
yum -y install epel-release
yum -y update
yum -y install perl-MailTools perl-MIME-EncWords perl-Email-Valid perl-Test-Pod dovecot dovecot-mysql  dovecot-pigeonhole  perl-Mail-Sender perl-Log-Log4perl imapsync offlineimap amavisd-new clamav perl-Razor-Agent mariadb-server opendkim vim wget crypto-utils mod_ssl.x86_64 php php-mysql php-fpm  clamav-update php-imap.x86_64 NetworkManager-tui mailx lrzip lzop lz4 arj  unzoo cabextract p7zip fail2ban php-mcrypt.x86_64
systemctl stop rpcbind
systemctl disable rpcbind

Step 1.  Setup your hostname server.
hostnamectl set-hostname
Edit you /etc/hosts to look like this
[root@mail ~]# cat /etc/hosts localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 mail

Step 2.  Test postfix local delivery
We create 2 users for local delivery test.
useradd -d /home/john -M -N -s /sbin/nologin john
useradd -d /home/mark -M -N -s /sbin/nologin mark

Now we will send a local mail.
echo Hello | mail -s test john@localhost
and will check if mail has been delivered
tail -f /var/log/maillog
Oct 21 14:55:58 localhost postfix/local[2916]: 770201440486: to=<>, orig_to=<john@localhost>, relay=local, delay=0.19, delays=0.13/0.02/0/0.04, dsn=2.0.0, status=sent (delivered to mailbox)

if works go to next step

Step 3. Setup MariaDB.
Config next /etc/my.cnf.d/server.cnf file like this:
# this is read by the standalone daemon and embedded servers
innodb_file_format = Barracuda
# this is only for the mysqld standalone daemon

Enable mariadb service
systemctl enable mariadb.service
Start mariadb database server
systemctl start mariadb.service
Secure mariadb installation

Step 4. Configure Clam Antivirus

We need to configure how clam refreshes his database
vim /etc/sysconfig/freshclam

comment or remove last line
#  FRESHCLAM_DELAY=disabled-warn    # REMOVE ME

we will make a edit clamav config file
vim /etc/freshclam.conf

comment or remove line with words¬†¬† “example”.

and finally update your viruses database.

Step 5. Configure basic settings in spamassasin

Enable spamassasin service

systemctl start spamassassin.service
systemctl status spamassassin.service
systemctl enable spamassassin.service
update spamassasin definitions
 Step 6. Integrate spamassasin and clamav with amavisd.
First install some app:
yum -y install clamav clamav-devel clamav-server clamd
We need to provide some config files.
cp /usr/share/doc/clamav-server-0.99.2/clamd.sysconfig /etc/sysconfig/clamd.amavisd
We need to adapt config file to our actual configuration.
vim /etc/sysconfig/clamd.amavisd

and add to last line

We will create a couple of new files
vim /etc/tmpfiles.d/clamd.amavisd.conf
add this content
d /var/run/clamd.amavisd 0755 amavis amavis -
Edit next file
vim /usr/lib/systemd/system/clamd@.service
with this content
Description = clamd scanner (%i) daemon
After =
Type = simple
ExecStart = /usr/sbin/clamd -c /etc/clamd.d/%i.conf --foreground=yes
Restart = on-failure
PrivateTmp = true
Now we can enable clamd@amavisd service
systemctl start clamd@amavisd
systemctl enable clamd@amavisd
systemctl status clamd@amavisd
Configure amavisd service
vim /etc/amavisd/amavisd.conf
At line 16 set number of amavisd childrens.
More childres uses more ram but delivers more mail at once, one amavisd children consumes near 30% of cpu in a low end server, be careful if you receive a lot of mails at once can be a big punch in your cpu have too many childrens.
$max_servers = <number>
line 20 set $mydomain
$mydomain = ‚Äė‚Äô;
line 152 aprox set your hostname
$myhostname= ‚Äė‚Äô;
Start service Amavisd
systemctl start amavisd.service
Enable service
systemctl enable amavisd.service
Step 7. Enable Apache and minim config.
yum -y install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mssql php-snmp php-soap php-tidy curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel mod_fcgid php-cli httpd-devel spamassassin unzip bzip2 unrar perl-DBD-mysql
systemctl start httpd.service
systemctl enable httpd.service
Edit config file
vim /etc/httpd/conf/httpd.conf
at line 86 edit with your admin email
# ServerAdmin root@localhost
at line 152 should be
## AllowOverride None
AllowOverride All
Config php
vim /etc/php.ini
at line 763 edit like this
at line 877 edit like this
;date.timezone =
date.timezone = Europe/Berlin
And now restart apache
systemctl restart httpd.service
Step 8. Setup Postfixadmin
Download Postxiadmin
 Move file to tar.gz file
mv postfixadmin-3.0.tar.gz\?r\=https\ postfixadmin-3.0.tar.gz
Extract folder
tar -zxvf postfixadmin-3.0.tar.gz -C /var/www/html/
cd /var/www/html/
chown -R root.apache postfixadmin-3.0/
 ln -s postfixadmin-3.0/ postfixadmin
We need to create postfix user database:
mysql -u root -p
MariaDB [(none)]> create database postfix;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> GRANT all on postfix.* to 'postfix'@'localhost' identified by 'yourPASSword';
Query OK, 0 rows affected (0.00 sec)
Now we have database, edit config file:
vim /var/www/html/postfixadmin/
$CONF[‘configured’] = true;
$CONF[‘setup_password’] = ‘YOUR-STRONG-PASSWORD’;
$CONF[‘database_type’] = ‘mysqli’;
$CONF[‘database_host’] = ‘localhost’;
$CONF[‘database_user’] = ‘postfix’;
$CONF[‘database_password’] = ‘yourPASSword’;
$CONF[‘database_name’] = ‘postfix’;
$CONF[‘show_password’] = ‘YES’;
$CONF[‘page_size’] = ’30’;
$CONF[‘default_aliases’] = array (
‘abuse’ => ‘’,
‘hostmaster’ => ‘’,
‘postmaster’ => ‘’,
‘webmaster’ => ‘’
$CONF[‘domain_path’] = ‘NO’;
$CONF[‘domain_in_mailbox’] = ‘YES’;
$CONF[‘maildir_name_hook’] = ‘NO’;
$CONF[‘transport’] = ‘YES’;
$CONF[‘vacation’] = ‘YES’;
$CONF[‘vacation_domain’] = ‘’;
$CONF[‘vacation_control’] =’YES’;
If your domain do not exist, activate this
Now got to browser and type http://your-ip/postfixadmin/setup.php and setup your admin password.
Setup Postfixadmin Now login and create new domain and email http://YOUR-IP-server/postfixadmin/login.php
Step 10   Setup Dovecot.
Now we enable IMAP and POP3 service.
vim /etc/dovecot/dovecot-sql.conf.ext
# The mysqld.sock socket may be in different locations in different systems
driver = mysql
connect = host=localhost dbname=postfix user=postfix password=yourpassword
# Default password scheme.
# depends on your $CONF['encrypt'] setting:
# md5crypt  -> MD5-CRYPT
# md5       -> PLAIN-MD5
# cleartext -> PLAIN
default_pass_scheme = MD5-CRYPT
# Query to retrieve password. user can be used to retrieve username in other
# # formats also.
password_query = SELECT username AS user,password FROM mailbox WHERE username = '%u' AND active='1'
# Query to retrieve user information.
## user_query = SELECT maildir, 1001 AS uid, 1001 AS gid FROM mailbox WHERE username = '%u' AND active='1'
user_query = SELECT CONCAT('/var/spool/vmail/', domain,'/', maildir) AS home, CONCAT('maildir:/var/spool/vmail/',domain,'/', maildir) AS mail, 5000 AS uid, 12 AS gid, concat('dict:storage=',CAST(ROUND(quota / 1024) AS CHAR), '::proxy::quota') AS quota, CONCAT('*:storage=',CAST(quota AS CHAR), 'B') AS quota_rule FROM mailbox WHERE username = '%u' AND active = '1'
Now we edit next file:
vim /etc/dovecot/conf.d/dovecot-mysql-quota.conf.ext
connect = host=localhost dbname=postfix user=postfix password=yourpassword
map {
  pattern = priv/quota/storage
  table = quota2
  username_field = username
  value_field = bytes
map {
  pattern = priv/quota/messages
  table = quota2
  username_field = username
  value_field = messages
vim /etc/dovecot/dovecot.conf
line 24 tells dovecot what protocols  should serve
protocols = imap pop3
line 31 is what interfaces where dovecot will be listening
listen = *, ::
line 44 welcome message,
#login_greeting = Dovecot ready.
login_greeting = Server OK.
line 69 defines behavior when reboot dovecot service
shutdown_clients = yes
Edit custom logging
vim /etc/dovecot/conf.d/10-logging.conf
line 8 log file
log_path = /var/log/dovecot.log
line 32 logging verbose password for debuging
#auth_verbose_passwords = no
auth_verbose_passwords = plain
line 41 enable debug password
#auth_debug_passwords = no
auth_debug_passwords = yes
Restart dovecot
systemctl restart dovecot.service
Create user for delivery internal and log.
useradd -r -u 5000 -g mail -d /var/spool/vmail -s /sbin/nologin -c "Virtual mailbox" vmail
Create folder vmail
mkdir /var/spool/vmail
change owner of log file
chown vmail /var/log/dovecot.log
Create logrotate for dovecot
vim /etc/logrotate.d/dovecot
/var/log/dovecot.log {
/bin/kill -USR1 `cat /var/run/dovecot/ 2>/dev/null` 2> /dev/null || true
Config authenticated user
vim /etc/dovecot/conf.d/10-auth.conf
line 10 disable plain test on
disable_plaintext_auth = yes
Auth mecanism
auth_mechanisms = plain login cram-md5
and databate type user setup
#!include auth-system.conf.ext
!include auth-sql.conf.ext
Setup SSL
SSL protocols
ssl_protocols = !SSLv2 !SSLv3
SSL ciphers to use
Prefer the server’s order of ciphers over client’s.
ssl_prefer_server_ciphers = yes
 Now dovecot needs to know what protocols will  serve and how
vim /etc/dovecot/conf.d/10-master.conf
service imap-login {
  inet_listener imap {
    port = 143
  inet_listener imaps {
    port = 993
    ssl = yes
service pop3-login {
  inet_listener pop3 {
    port = 110
  inet_listener pop3s {
    port = 995
    ssl = yes
service auth {
  unix_listener /var/spool/postfix/private/auth {
    mode = 0666
    user = vmail
    group = mail
Enable sieve in dovecot
vim /etc/dovecot/conf.d/15-lda.conf
protocol lda {
# Space separated list of plugins to load (default is global mail_plugins).
#mail_plugins = $mail_plugins
mail_plugins = $mail_plugins sieve
end for today

File underconstruction ……¬† please return back in few days.