1

I have a Postfix server with the following main.cf file (I'll show just the relevant info):

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
smtp_sender_dependent_authentication = yes
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay

Right now everytime I want to relay the messages from one domain through my relay server I need to add the data to both /etc/postfix/sasl_passwd and /etc/postfix/sender_relayfiles:

/etc/postfix/sasl_passwd

@example.com myuser:mypass1234

/etc/postfix/sender_relay

@example.com [relay.example.com]:587

And this seems very redundant to me.


My Question

I would like to know if there is a way to use only the /etc/postfix/sasl_passwd file, and define a global relayhost = [cluster.securitybox.cl]:587 and tell Postfix that if the domain is listed in the /etc/postfix/sasl_passwd file use that global relay, and don't use any relay if it isn't. Or any other option where I dont't have to write data into separate files.

It seems to be possible according to the Postfix Documentation

If you are creative, then you can try to combine the two tables into one single MySQL database, and configure different Postfix queries to extract the appropriate information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.