Tran Nghi's Site  - Make notes and share experience

Generate File of a certain size?

You can use dd: dd if=/dev/zero of=output.dat bs=24M count=1 or dd if=/dev/zero of=output.dat bs=1M count=24 or dd if=/dev/zero of=outputfile.out bs=1024k count=24 or use bs=1M and count=24. Many find it nicer and easier to read… On the Mac, use 24m (small m), because the Mac doesn’t like the big M. dd if=/dev/zero of=output.dat bs=24m count=1   GIT…

Cannot Send e-mails, Does Not Allow Relaying – Fixed

I was getting this crazy error when sending out an email on my iPhone.. After some research, I just realize that there is a my mistake when making adjustment of /etc/postfix/main.cf Hereby my mistake:     mynetworks = 127.0.0.0/8 113.xxx.77.xxx/32 192.168.1.0/24 Do you recognize it? Do never forget the , comma sign “,” among each…

Mail filtering and improving the score of sending email

Resources: 1) https://help.ubuntu.com/lts/serverguide/mail-filtering.html 2) https://help.ubuntu.com/community/PostfixAmavisNew The recommended and easiest way to install Pyzor is with pip: [email protected]:~# pip install pyzor In order to upgrade your Pyzor version run: [email protected]:~# pip install –upgrade pyzor For me, the latest pyzor-1.0.0 seemed to not working on my environment. Ubuntu 16.04.3 Postfix 3.1.0 Dovecot 0.4.13 SpamAssassin version 3.4.1 running on Perl…

Autodiscover mail setting for automatically Outlook setup

Some mail clients will use a system called “Autodiscover” to figure out which settings to use for the pop/imap/smtp settings. You can set this up if you’d like, it basically requires a subdomain and a SRV record. You can add the SRV record into any domain you want to use these settings for. If you’ve…

Force IMAPS and SMTPS and AMAVIS TLS

config postfix/dovecot using tls/ssl – force encrypt Protocol Usage Plain text/encrypted session Encrypted session only POP3 Incoming mail 110 995 IMAP Incoming mail 143 993 SMTP Outgoing mail 25 465 Submission Outgoing mail 587   Disable IMAP protocol and force IMAPS Older versions of dovecot had an array in the file: /etc/dovecot/dovecot.conf If you find an…

Postfix – Config SPF, DKIM and DMARC

Below is some articles that I have referred to config SPF and DKIM on my self-host mail server. 1) SPF This is the first article that I found: https://wordtothewise.com/2014/06/authenticating-spf/ But this one is more detail: https://linode.com/docs/email/postfix/configure-spf-and-dkim-in-postfix-on-debian-8/ Below is my work – I was setting up for a sub-domain of infotechviet.com: assuming that you’re already have configured the…

Problem with Amazon EC2 Ubuntu instance after installing whereami

The Debian version of whereami is designed to provide multiple network connectivity options for laptops or other portable devices capable of running Debian/Ubuntu Linux. Attempted installation of the whereami package on an Amazon EC2 Debian/Ubuntu Linux instance will terminate any existing connection to the instance and cause all future connection attempts to fail.

Easy way to gain ssl/tls certificate from Let’s Encrypt with Certbot-auto

Certbot is an easy-to-use automatic client that fetches and deploys SSL/TLS certificates for your webserver. Certbot was developed by EFF and others as a client for Let’s Encrypt and was previously known as “the official Let’s Encrypt client” or “the Let’s Encrypt Python client.” Certbot will also work with any other CAs that support the…

Hiding samba share from browse list for unauthorized users

To hide the full share, you can use the following option: [ global ] … access based share enum = yes To hide files/folders inside a share to users who do not have read permission on those files/folders, you can use: [ share ] … hide unreadable = yes

Rejecting Unknown Local Recipients with Postfix

By default, the Postfix SMTP server rejects mail for unknown recipients in local domains.. this configuration causes the problem when you try sending an email (ie. from Mozilla Thunderbird) to unknown user in the same domain, it will pop-up a windows like this (it was not happened with Gmail): I found this regarding document (http://www.postfix.org/LOCAL_RECIPIENT_README.html), but this made…

Message