linux
This commit is contained in:
parent
3ee7bc74b4
commit
421cad3e3c
@ -8,4 +8,6 @@
|
|||||||
|
|
||||||
[Bash Scripting](linux-bash-scripting.md)
|
[Bash Scripting](linux-bash-scripting.md)
|
||||||
|
|
||||||
|
[Sendmail](linux-sendmail.md)
|
||||||
|
|
||||||
[VIM](linux-vim.md)
|
[VIM](linux-vim.md)
|
||||||
41
linux/linux-sendmail.md
Executable file
41
linux/linux-sendmail.md
Executable file
@ -0,0 +1,41 @@
|
|||||||
|
---
|
||||||
|
gitea: none
|
||||||
|
include_toc: true
|
||||||
|
---
|
||||||
|
# Sendmail
|
||||||
|
|
||||||
|
```
|
||||||
|
apt install sendmail
|
||||||
|
```
|
||||||
|
|
||||||
|
## config
|
||||||
|
|
||||||
|
- change first line of `/etc/hosts` to:\
|
||||||
|
`127.0.0.1 localhost.localdomain localhost backup`\
|
||||||
|
("backup" is the hostname. Get it with: $ hostname
|
||||||
|
- config\ `sudo sendmailconfig # answer "Y" to everything`
|
||||||
|
|
||||||
|
## custom "from: " address
|
||||||
|
|
||||||
|
in order to have a custom "from: " email address (instead of `user@localhost.localdomain`) do the following:
|
||||||
|
|
||||||
|
- create file `/etc/mail/genericstable`
|
||||||
|
- add following content:
|
||||||
|
```
|
||||||
|
user notifications@docuteam.ch
|
||||||
|
root notifications@docuteam.ch
|
||||||
|
```
|
||||||
|
- create `genericstable.db`\
|
||||||
|
`makemap hash /etc/mail/genericstable < /etc/mail/genericstable`
|
||||||
|
- modify `/etc/mail/sendmail.mc`\
|
||||||
|
add following lines right before `MAILER_DEFINITIONS`:\
|
||||||
|
```
|
||||||
|
FEATURE(`genericstable')dnl`
|
||||||
|
GENERICS_DOMAIN(`localhost.localdomain')dnl
|
||||||
|
````
|
||||||
|
- macro erstellen\
|
||||||
|
`m4 sendmail.mc > sendmail.cf`
|
||||||
|
- restart sendmail service\
|
||||||
|
`systemctl restart sendmail.service`
|
||||||
|
- test mail\
|
||||||
|
`echo "Subject: sendmail test 1" | sendmail -v r.rutishauser@docuteam.ch`
|
||||||
Loading…
Reference in New Issue
Block a user