2

My server has multiple network interfaces (each with its own IP).
Due to the hosting provider's security policy, outgoing connections to SMTP (port 587) are only allowed from a specific IP address — not from the default one.

So I need to configure Drupal to send emails via SMTP using a non-default local IP.

I'm fine with using external modules such as:

However, I can’t find any option to set the local bind address (the source IP for the connection).

In other systems this can be done with something like:

'socket'=>[
      'bindto' => '1.2.3.4:0'
    ] 

or

localAddress: '1.2.3.4'

or

'source_ip' => '1.2.3.4',

Has anyone encountered this before or found a way to set the source IP for outgoing SMTP connections in Drupal (or in Symfony Mailer settings)?

New contributor
DimaS is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

1 Answer 1

2

I added a new option to drupal/smtp module. See https://www.drupal.org/project/smtp/issues/3553774

New contributor
DimaS is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.