iredmail-doc/en_US/howto/allow.user.to.send.email.wi...

40 lines
924 B
Markdown
Raw Normal View History

2015-08-19 08:11:02 -05:00
# Allow user to send email without smtp authentication
2014-09-22 21:47:49 -05:00
2015-08-19 08:11:02 -05:00
Create a plain text file: `/etc/postfix/accepted_unauth_senders`, list all
users' email addresses which are allowed to send email without smtp
authentication. We use user email address `user@example.com` for example:
2014-09-22 21:47:49 -05:00
```
2015-08-19 08:11:02 -05:00
user@example.com OK
2014-09-22 21:47:49 -05:00
```
It's ok to use IP address instead like below:
> For more allowed sender format, please check Postfix manual page: [access(5)](http://www.postfix.org/access.5.html).
```
192.168.1.1 OK
192.168.2 OK
172.16 OK
```
2015-08-19 08:11:02 -05:00
Create hash db file with `postmap` command:
2014-09-22 21:47:49 -05:00
```
# postmap hash:/etc/postfix/accepted_unauth_senders
2014-09-22 21:47:49 -05:00
```
2015-08-19 08:11:02 -05:00
Modify Postfix config file `/etc/postfix/main.cf` to use this text file:
2014-09-22 21:47:49 -05:00
```
smtpd_sender_restrictions =
check_sender_access hash:/etc/postfix/accepted_unauth_senders,
[...OTHER RESTRICTIONS HERE...]
```
Restart/reload postfix to make it work:
```
# /etc/init.d/postfix restart
```