Normally Email2SMS plugin accepts every email sent to the device - this is the default Postfix server configuration.
However, it is possible to limit access to specific email domains. Please follow the instructions below to setup Postfix configuration that allows to achieve it.
1) Connect with SSH to your device
2) Edit file main.cf
[NXS device]
nano /etc/postfix/main.cf
Change line:
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
to
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination, check_sender_access hash:/etc/postfix/access, reject
[NPE device]
nano /mnt/nand-user/postfix/etc/postfix/main.cf
Change line:
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
to:
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination, check_sender_access hash:/mnt/nand-user/postfix/etc/postfix/access, reject
3) Create file access
[NXS device]
nano /etc/postfix/access
with content:
yourdomain.com permit_auth_destination
[NPE device]
nano /mnt/nand-user/postfix/etc/postfix/access
with content:
yourdomain.com permit_auth_destination
4) Hash the file
[NXS device]
postmap /etc/postfix/access
[NPE device]
postmap /mnt/nand-user/postfix/etc/postfix/access
5) Reload Postfix configuration
postfix reload
Now only emails from yourdomain.com will be acceppted for the plugin, rest of them will be rejected by the server.