Hi! I have a task that may be looking a bit strange. Our application has to send an e-mail via various SaaS email providers like Gmail or office 365 with authentication.
Currently, I use smtp_sender_dependent_authentication in combination with smtp_sasl_auth_enable and smtp_sasl_password_maps. So in my case user create a message in our application, sets some mail-from address, and sends a message via postfix. Postfix chooses destination relay using mail-from header and corresponding mapping in smtp_sender_dependent_authentication. The problem is - user can specify not his own mail-from and e-mail will be sent with another user's relay and creds. I can change my application settings and add credentials in addition to the postfix address and set up auth at the postfix side. But in this case, I have to specify credentials in three places - application settings, auth database, and smtp_sasl_password_maps. Looks bad. Is it possible to say to postfix: "take creds from the application, and pass ones transparently to relay (for ex. Gmail) depending on smtp_sender_dependent_authentication?" Or maybe this task has another solution? -- WBR, Andrey Tovstik
