Browse Source

Update sSMTP README

master
Pekka Helenius 4 years ago
parent
commit
15e2bc2e70
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      ssmtp_conf-sample/README.md

+ 6
- 4
ssmtp_conf-sample/README.md View File

@ -4,7 +4,7 @@ Once you have installed sSMTP on your Linux system, make sure the following appl
----------
**1)** Create symbolic link from `/usr/bin/ssmtp` to `/usr/bin/sendmail` exists:
**1)** Check that symbolic link from `/usr/bin/ssmtp` to `/usr/bin/sendmail` exists:
```
ln -s /usr/bin/ssmtp /usr/bin/sendmail
@ -64,15 +64,16 @@ Configure your message defined in [wanchecker.sh](wanchecker.sh) file.
| Variable | Value | Type |
|------------------|-----------------------------------------------------------------------------|------------|
| EMAIL_SENDER | Sender's address | String |
| EMAIL_RECIPIENTS | Email recipients. Multiple allowed | Bash array |
| SUBJECT_EMAIL | Email title | String |
| MESSAGE_EMAIL | Email message contents | String |
| MESSAGE_STDOUT | Internal Linux system message about sent email message | String |
| WANIP_DIR | Log file directory path. User `mail` must have write access to this folder. | String |
| WANIP_LOG | Log file name | String |
**NOTE:** At minimum, you should configure proper email addresses in variables `EMAIL_SENDER` and `EMAIL_RECIPIENTS`. `EMAIL_SENDER` takes same value as defined in `/etc/ssmtp/ssmtp.conf` ([sample](ssmtp.conf)) and `/etc/ssmtp/revaliases` ([sample](revaliases)) files.
## Mail sender and recipients
These are found in `/etc/ssmtp/wanchecker.conf` which is a bash `source` file.
The conf file has three variables: `ENABLE_FALLBACK_DNS`, `EMAIL_SENDER` and `EMAIL_RECIPIENTS` which **must be** configured. `EMAIL_SENDER` takes same value as defined in `/etc/ssmtp/ssmtp.conf` ([sample](ssmtp.conf)) and `/etc/ssmtp/revaliases` ([sample](revaliases)) files.
## Folder & file permissions
@ -92,6 +93,7 @@ Contents of `/etc/ssmtp/` folder should contain the following files & permission
-rw-r----- 640 root:mail /etc/ssmtp/revaliases
-rw-r----- 640 root:mail /etc/ssmtp/ssmtp.conf
-rwxr-x--- 750 root:mail /etc/ssmtp/wanchecker.sh
-rwxr-x--- 640 root:mail /etc/ssmtp/wanchecker.conf
```
**NOTE:** As `/etc/ssmtp/ssmtp.conf` contains a _clear-text email password_, the file must be protected from any eavesdropping with correct permission policy! The file must not be readable to any other than `mail` user, and `mail` user must not be available for normal usage. Still, any `sudo` group member can access the file, so make sure `sudo` group does not contain hostile or unwanted members, and configure your `/etc/sudoers` file properly.

Loading…
Cancel
Save