Multiple SMTP outboud email configuration

Hello,

We are using Fetchmail to create a ticket via email and it has two accounts.
For example, support1@example.com → queue: support1, support2@example → queue: support2

For outbound email, we set up SMTP on Sendmail.

define(SMART_HOST',[smtp.office365.com]‘)dnl
define(RELAY_MAILER_ARGS', TCP $h 587’)dnl
define(ESMTP_MAILER_ARGS', TCP $h 587’)dnl
define(confAUTH_OPTIONS', A p’)dnl
TRUST_AUTH_MECH(EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl define(confAUTH_MECHANISMS’, EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl FEATURE(authinfo’,`hash -o /etc/mail/authinfo/office365-auth.db’)dnl

It works ok to send an email via smtp, but I am not sure how I can use two SMTP accounts to send email based on the queues. If anyone configured this, please help me.

Thank you

You shouldn’t need to. RT needs just one account to send mail, and then will take care of the from and reply-to headers for you. Are you having problems with your current setup?

I see you’re using office365 as your email relay, there sometimes are RT config settings that need set or even email server settings that need set to get the email to pass through correctly, but you should never need multiple smtp client accounts to get all outbound RT emails sending correctly.

If I need to route outbound mails with the respective email queue email address, How can I accomplish it.

I Use support@domain1.com, support@domanin2.com and support@domain3.com - All are three different mail accounts. I need outbound mails to go through respective queue emails and not through the global email configuration. Can some one help how to accomplish this.

If you’re using Postfix for outgoing email you can checkout transport maps to set different outgoing options like different SMTP relays based on the address

You can set email addresses per queue (look for Reply Address and Comment Address in the primary admin page for the queue).

In this case outbound mails will not go through the Mail account as no auth details are set.