# SMTP proxy and insert header

**URL:** <https://www.ruby-forum.com/t/smtp-proxy-and-insert-header/228496>\
**Category:** NGINX\
**Created:** [April 24, 2013, 5:37pm UTC](https://www.ruby-forum.com/t/smtp-proxy-and-insert-header/228496 "2013-04-24T17:37:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jader\_HSSilva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b4bc9f/32.png) [@Jader\_HSSilva](https://www.ruby-forum.com/u/Jader_HSSilva)\
**Post date:** [April 24, 2013, 5:37pm UTC](https://www.ruby-forum.com/t/smtp-proxy-and-insert-header/228496/1 "2013-04-24T17:37:57Z")

</div>

Hello.  
I’d like to configure nginx as a SMTP proxy and to insert a custom SMTP  
header (e.g. “X-My-Script: bla”) in the message before sending it to  
backend.

Is there any way to configure nginx to insert a custom header in an  
email  
message?

Jader H. Silva

---

<div class="post-metadata">

**Author:** ![Jader\_HSSilva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b4bc9f/32.png) [@Jader\_HSSilva](https://www.ruby-forum.com/u/Jader_HSSilva)\
**Post date:** [April 24, 2013, 6:42pm UTC](https://www.ruby-forum.com/t/smtp-proxy-and-insert-header/228496/2 "2013-04-24T18:42:48Z")

</div>

Hello!

On Wed, Apr 24, 2013 at 12:37:28PM -0300, Jader H. Silva wrote:

> Hello.  
> I’d like to configure nginx as a SMTP proxy and to insert a custom SMTP  
> header (e.g. “X-My-Script: bla”) in the message before sending it to  
> backend.
> 
> Is there any way to configure nginx to insert a custom header in an email  
> message?

No. Messages aren’t processed by nginx smtp proxy, it instead  
authenticates a user and passed the connection to a backend  
server.

–  
Maxim D.

> **[nginx: donation](http://nginx.org/en/donation.html)**
