OTRS + SMTP (Return Path)

Moderator: crythias

Post Reply
maureliosilverio
Znuny newbie
Posts: 17
Joined: 25 Aug 2011, 19:22
Znuny Version: 3
Real Name: Marcos Aurélio Silvério
Company: Suntech

OTRS + SMTP (Return Path)

Post by maureliosilverio »

Hi!

I've a google apps for my domain and I need configure OTRS to send e-mails to our customers. We have a mail group called support@mydomain.com. Inside this group, there are a few attendants e-mails. NOTE: support@mydomain.com isn't an account, it is a group. We have created an "otrs SMTP login account" -> otrs.smtp@mydomain.com, for OTRS SMTP authentication. So, OTRS will use this account for autentication and mail sent. But, we need to configure a Return-Path to support@mydomain.com.

The question is: Where I can configure a Return-Path on Core::Sendmail OTRS configuration? I have tried to put support@mydomain.com in SendmailNotificationEnvelopeFrom, but isn't works properly. The mail is sent, but with the return-path header equal to otrs.smtp@mydomain.com

Here is the Mail header:

Code: Select all

Delivered-To: recipient@gmail.com
Received: by 10.204.122.19 with SMTP id j19cs158233bkr;
        Tue, 18 Oct 2011 05:55:48 -0700 (PDT)
Received: by 10.236.177.2 with SMTP id c2mr2869489yhm.102.1318942547390;
        Tue, 18 Oct 2011 05:55:47 -0700 (PDT)
Return-Path: <otrs.smtp@mydomain.com>
Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180])
        by mx.google.com with ESMTPS id i3si1590557yhk.144.2011.10.18.05.55.46
        (version=TLSv1/SSLv3 cipher=OTHER);
        Tue, 18 Oct 2011 05:55:47 -0700 (PDT)
Received-SPF: neutral (google.com: 209.85.213.180 is neither permitted nor denied by best guess record for domain of otrs.smtp@mydomain.com) client-ip=209.85.213.180;
Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.213.180 is neither permitted nor denied by best guess record for domain of otrs.smtp@mydomain.com) smtp.mail=otrs.smtp@mydomain.com
Received: by mail-yx0-f180.google.com with SMTP id 34so751428yxm.39
        for <recipient@gmail.com>; Tue, 18 Oct 2011 05:55:46 -0700 (PDT)
Received: by 10.236.46.129 with SMTP id r1mr2869651yhb.92.1318942546872;
        Tue, 18 Oct 2011 05:55:46 -0700 (PDT)
Return-Path: <otrs.smtp@mydomain.com>
Received: from yourhost.example.com ([186.215.116.140])
        by mx.google.com with ESMTPS id d5sm2909591yhl.19.2011.10.18.05.55.44
        (version=SSLv3 cipher=OTHER);
        Tue, 18 Oct 2011 05:55:46 -0700 (PDT)
MIME-Version: 1.0
X-Mailer: MIME-tools 5.428 (Entity 5.428)
Subject: Test 4
Message-ID: <1318942340.17530.2000420367@yourhost.example.com>
Date: Tue, 18 Oct 2011 10:52:20 -0200
From: otrs.smtp@mydomain.com
Content-Type: multipart/alternative; boundary="----------=_1318942340-23529-1"

This is a multi-part message in MIME format...

------------=_1318942340-23529-1
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Test 4=

------------=_1318942340-23529-1
Content-Type: text/html; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body style="font-family:Geneva,Helvetica,Arial,sans-serif; font-size: 12px;">Test 4</body></html>
------------=_1318942340-23529-1--

Here is the OTRS SMTP configuration:

Code: Select all

SendmailModule					SMTPS
SendmailModule::CMD			/usr/sbin/sendmail -i -f
SendmailModule::Host			smtp.gmail.com
SendmailModule::Port			465
SendmailModule::AuthUser			otrs.smtp@mydomain.com
SendmailModule::AuthPassword		<secret>
SendmailNotificationEnvelopeFrom	support@mydomain.com
OTRS 3.0.8 and ITSM 3.0.4 on Ubuntu Server 10.0.4.3 (running on Citrix XenServer)
WebChamp
Znuny newbie
Posts: 17
Joined: 24 Nov 2011, 16:09
Znuny Version: 3.0.10
Real Name: Richard Pieterse

Re: OTRS + SMTP (Return Path)

Post by WebChamp »

I am looking for a similar thing.

On PHP it was as easy as passing an extra parameter to the mail() function.
I am crawling through the perl code and will let you know when I have the answer.

It might be as simple as setting an configuration itemin OTRS, but could also involve adding an extra mail header somewhere.

Regards,
Richard
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: OTRS + SMTP (Return Path)

Post by jojo »

SendmailNotificationEnvelopeFrom is the correct value for Notfications. Onnormal Mails the From: is used. It seems that Google rewrites these headers
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
WebChamp
Znuny newbie
Posts: 17
Joined: 24 Nov 2011, 16:09
Znuny Version: 3.0.10
Real Name: Richard Pieterse

Re: OTRS + SMTP (Return Path)

Post by WebChamp »

Thanks Jojo.

In my case, each reply needs to have it's own sender in the Sender and the Return-path headers.
For instance:
When we reply from our support box, it must be support@ and when we reply from our administration box, it must be administration@

The SendmailNotificationEnvelopeFrom option can only contain one value...correct?
It solves half the issue and I will start testing it. I skipped the testing because of the above requirements.
WebChamp
Znuny newbie
Posts: 17
Joined: 24 Nov 2011, 16:09
Znuny Version: 3.0.10
Real Name: Richard Pieterse

Re: OTRS + SMTP (Return Path)

Post by WebChamp »

-Fixed-

Our sendmail was actually Exim acting as "sendmail"
The default setting is:

Code: Select all

/usr/sbin/sendmail -i -f 
This should normally use the -f option to fill the Return-Path.
With Exim, this requires some extra settings in the exim.conf file for the trusted-users

Add the user running OTRS on the server as trusted to be able to send a self-defined Return-path and prevent Exim from adding his own values
for Return-Path and Sender in the mail headers.

Hope this helps you too.
-- Richard
Post Reply