sendmail
sendmail is the agent in a postfix to send mail, which is responsible for sending messages to a remote server, and can receive mail. sendmail when sending e-mail, read the contents of the default input from standard bricks, a "." to end.
Scope of this command: RedHat, RHEL, Ubuntu, CentOS, Fedora.
1 , grammar
sendmail [option ...] [recipient ...]
2 , the options parameter list
Options |
Explanation |
-bd |
Enter deamon mode |
-with a |
Initialize the alias database |
-bm |
Read a message from standard input |
-bp |
List mailing list |
-bs |
Smtp independent mode, reads from the standard input, to the standard output |
-C |
main.cf location |
-F |
Specifies the sender's full name |
-f |
Specify the sender |
-i |
Ignore the line only a single point |
-q |
At given intervals in the message queue processing |
3 , examples
1 ) Send an email to someone
[root@localhost ~]# sendmail david // 发送邮件给 david ,默认的发送者是 root
123.
.
[root@localhost ~]# tail /var/spool/mail/david // 查看 david 邮箱,收到邮件
Delivered-To: [email protected]
Received: by mailsrv.david.cn (Postfix, from userid 0)
id 5B3A7143211; Fri, 5 Oct 2018 21:33:34 +0800 (CST)
Message-Id: <[email protected]>
Date: Fri, 5 Oct 2018 21:33:29 +0800 (CST)
From: [email protected] (wejie)
To: undisclosed-recipients:;
123.
|
2 ) specify the sender
[root@localhost ~]# sendmail -f weijie david //weijie 发送邮件给 david
hehe
.
You have new mail in /var/spool/mail/root
[root@localhost ~]# tail /var/spool/mail/david // 查看 david 邮箱,发送者是魏杰
Delivered-To: [email protected]
Received: by mailsrv.david.cn (Postfix, from userid 0)
id 3544314308F; Fri, 5 Oct 2018 21:37:11 +0800 (CST)
Message-Id: <[email protected]>
Date: Fri, 5 Oct 2018 21:37:07 +0800 (CST)
From: [email protected] (wejie)
To: undisclosed-recipients:;
hehe
|
3 ) What are the fields in Table View
[root@localhost ~]# mysqlshow -u root -p test wj // 显示数据库 test 中的表 wj 的信息
Enter password:
Database: test Table: wj
+-------+---------+-------------------+------+-----+---------+-------+---------------------------------+---------+
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+-------+---------+-------------------+------+-----+---------+-------+---------------------------------+---------+
| id | int(11) | | NO | | | | select,insert,update,references | |
| name | text | latin1_swedish_ci | NO | | | | select,insert,update,references | |
+-------+---------+-------------------+------+-----+---------+-------+---------------------------------+---------+
|
Made a study of the Linux platform, now came up with a prototype, you can use and reference
Link: https: //pan.baidu.com/s/1GOLVU2CbpBNGtunztVpaCQ Password: n7bk