1

Topic: Setting up sender dependent relay host - where to put username and PW?

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.6
- Linux/BSD distribution name and version: Ubuntu 14.04.5
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

In this document, it is explained how to set up Global relay host or Sender dependent relay host:
http://www.iredmail.org/docs/relayhost.html

I want to set up per-user sender dependent relay host, so that mails sent from newsletter@mydomain.tld (and only from this mailbox) are sent over another SMTP server (as my provider doesn't want newsletters to be sent over their server).


Now, it is explained on this page how to set it up via MySQL.
Where to put username and password for the relay, though?
Also in /etc/postfix/sasl_password as for the global relay host?
Is it possible to establish a encrypted connection to the SMTP relay if it supports it? If so, how?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Setting up sender dependent relay host - where to put username and PW?

Yes, add it in the file specified in "smtp_sasl_password_maps =" parameter. for example,

smtp_sasl_password_maps = hash:/etc/postfix/sasl_password

3

Re: Setting up sender dependent relay host - where to put username and PW?

BTW, you need one more parameter in main.cf:

smtp_sender_dependent_authentication = yes

I updated the doc to mention this setting.