2021年3月17日 星期三

grep

 grep -E    --> 正規表示是

grep  -v   "EXCLUDE"  排除  EXCLUDE 

grep -i      capital in senstive 

grep  -n   showing the line number 

2021年3月6日 星期六

using mail 在 ubuntu 裡面寄送電子郵件

sudo apt-get install mailutils


cmd 指令 

  # echo “email content” | mail -s “email subject” you@emaildomai


如果要更改 寄送者的 dn 


f請到 

/etc/posfix/main.cf 更改參數

1.


append_dot_mydomain = yes  # --> Setting it to yes appends the domain to the hostname


2.設定參數

myhostname = com.hint.tw

myorigin = /etc/mailname


3.在  /etc/下 建立 mailutils.conf 

address {
   email-domain example.com;
};

 在寄送郵件 就會
是 

alex@example.com



剩下的 待續  .......

ref
https://www.cyberciti.biz/faq/linux-unix-start-stop-restart-postfix/

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-as-a-send-only-smtp-server-on-ubuntu-16-04

https://yosia.net/article/133

https://unix.stackexchange.com/questions/379175/how-do-i-change-postfix-sender-address

https://ftp.gnu.org/old-gnu/Manuals/mailutils-0.2/html_node/configuration.html