Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jsk_robot_startup] Update Readme; configuring a smtp server #1581

Merged
merged 4 commits into from
Sep 9, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion jsk_robot_common/jsk_robot_startup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ see [lifelog/README.md](lifelog/README.md)
This node sends email based on received rostopic (jsk_robot_startup/Email).
Default values can be set by using `~email_info`
There is [a client library](./euslisp/email-topic-client.l) and [sample program](./euslisp/sample-email-topic-client.l).
If you want to see a demo. Please configure a smtp server and setup your email_info yaml at /var/lib/robot/email_info.yaml and run.
If you want to see a demo. Please [configure a smtp server](https://github.com/tkmtnt7000/jsk_robot/blob/PR-update-switchbot-device-name/jsk_robot_common/jsk_robot_startup/README.md#configuring-a-smtp-server-with-gmail) and setup your email_info yaml at /var/lib/robot/email_info.yaml and run.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update github link to https://github.com/jsk-ros-pkg/jsk_robot becuase https://github.com/tkmtnt7000/jsk_robot does not work if you delete branch.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. I fixed link in 63cead7


```bash
roslaunch jsk_robot_startup sample_email_topic.launch receiver_address:=<a mail address to send a mail to>
Expand Down Expand Up @@ -293,3 +293,35 @@ To check how many devices are bound to rfcomm, use rfcomm command.
```
rfcomm
```

## Tips
### Configuring a smtp server with Gmail
1. Setting postfix

Add following codes to `/etc/postfix/main.cf`
```
relayhost = smtp.gmail.com:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/gmail_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_mechanism_filter = plain
smtp_use_tls = yes
```
2. Create and register a password file

Create `/etc/postfix/gmail_passwd`
```
# /etc/postfix/gmail_passwd
smtp.gmail.com:587 <example>@gmail.com:<login password or application password>
```
Register `/etc/postfix/gmail_passwd`
```bash
$ sudo postmap /etc/postfix/gmail_passwd
```
If you find `/etc/postfix/gmail_passwd.db`, it works well.

3. Reload postfix
```bash
$ sudo postfix reload
```