Using Smart Host: Possible to use bounce management?

Use this forum for questions regarding installation, upgrading and configuration of OpenEMM

Moderator: moderator

Effenberg0x0
Posts: 2
Joined: Thu Feb 12, 2009 2:48 am

Using Smart Host: Possible to use bounce management?

Post by Effenberg0x0 »

I am running OpenEMM on local a Ubuntu Server, connected to a normal DSL line (dynamic IP, ISPs hostname), which relays all mails to our corporate SMTP server (smart-host) with AUTH. Sending e-mails is working fine.

However, I am under the impression that, in such a setup it is impossible to use the bounce management, right? I mean, the statistics page shows me all mails sent, but 0% bounce. However, checking the account that was used to auth on the external server inbox, I have lots of bounces.
mkalen
Posts: 33
Joined: Tue Jan 20, 2009 7:51 pm

Re: Using Smart Host: Possible to use bounce management?

Post by mkalen »

Effenberg0x0 wrote:However, I am under the impression that, in such a setup it is impossible to use the bounce management, right?
I think it should be possible: the key is that bounces needs to go back to OpenEMM.

I was thinking about this in my setup and came to the following (yet untested) conclusions:
  • If using a sender "something@domain.com" and domain.com is your corporate domain, you must set up an alias for your corporate SMTP-server redirecting mails to "something" to reach OpenEMM SMTP-server as a final destination
  • If you are using a mailfilter like "ext_1@re-direction.domain.com" in OpenEMM, you should set "ext_1" as final destination in your corporate mail server in order for the mail to bounce from sender -> corporate SMTP-server -> OpenEMM mail-filter -> final recipient
  • Since you have a dynamic IP, you can use DynDNS or a similar service and setup automatic DynDNS-updates in your router to get a "fake fixed" hostname that moves with your IP ("effenberg.homeip.net" for example). This requires a router/DSL-modem with DynDNS or similar capabilities (which is very common). Reverse DNS will of course not work since your ISP controls the reverse zone. (This should not be important in spam-flagging/SPF-controls etc. since the end-recipient's SMTP-server only sees traces from your smarthost/corporate mailserver's IP.)
I hope some of the Agnitas staff or other users can verify if this seems reasonable!
Momo
Posts: 7
Joined: Fri Jan 16, 2009 11:32 am

Post by Momo »

Hello,

I have the same problem.

Code: Select all

If using a sender "something@domain.com" and domain.com is your corporate domain, you must set up an alias for your corporate SMTP-server redirecting mails to "something" to reach OpenEMM SMTP-server as a final destination 
I tried that but it doesnt work.

Could you confirm me if your tests works and tell me how do you do that ?

Thanks for your help :)
mkalen
Posts: 33
Joined: Tue Jan 20, 2009 7:51 pm

Re: Use an alias

Post by mkalen »

Momo wrote:

Code: Select all

If using a sender "something@domain.com" and domain.com is your corporate domain, you must set up an alias for your corporate SMTP-server redirecting mails to "something" to reach OpenEMM SMTP-server as a final destination 
I tried that but it doesnt work.
It would be very difficult to provide a generic solution for all OpenEMM installations and different brands of corporate mail servers. You need to give a bit more information about your setup.

E.g. if your OpenEMM SMTP is on a server with dynamic IP, you will need to start with DynDNS or similar solution to get an address that follows your IP and that you can register with the corporate SMTP server.

For a Unix/Linux-like SMTP-server the standard /etc/aliases location will let you define forwards.

Example /etc/aliases-line for SMTP-server on yourdomain.com when the sender of the newsletter is "marketing@yourdomain.com" and your OpenEMM SMTP-server is located at "finaldestination.homeip.net" with a mail filter called "ext_1":

Code: Select all

marketing: ext_1@finaldestination.homeip.net
You can test the forward mechanism by sending a mail to "marketing@yourdomain.com" and watching the traffic to your OpenEMM server.

Maybe you already tried all of this?
Momo
Posts: 7
Joined: Fri Jan 16, 2009 11:32 am

Post by Momo »

Thanks for your answer,

I try to explain my conf:

I have one DMZ with many server and they have an public IP.

I have one mail server mail.domain.com with public IP:
The DNS are :
smtp.domain.com
pop.domain.com
it have type record A and MX.

This server is an debian and it turn with postfix and my users are manage with database Mysql. (Postfix-Mysql)

I have one OpenEMM server eshot.mydomain with public IP.
The DNS is:
eshot.domain.com
it have type record A
but not MX (I think it's not necessary, could you confirm me ?).

This server is an debian and it turn just for OpenEMM.

I created the file "/home/openemm/conf/smart-relay":
user:pass@smtp.domain.com

I launched the script "/home/openemm/bin/sendmail-disable.sh" before start openemm.

I hope this conf will help you to understand my problem and maybe resolve or explain what I don't understand.

Thanks,
mkalen
Posts: 33
Joined: Tue Jan 20, 2009 7:51 pm

Tested successfully

Post by mkalen »

I just got my setup to work! Although it's a bit different from yours, you should be able to follow most of the steps.
My environment:
  • OpenEMM on Windows with dynamic IP (no MX-record)
  • DynDNS-registration of dynamic IP, let's call it me-at.homeip.net
  • SMTP-server (smart realy) on Linux, public IP (A + MX records), let's call the domain public.com and the SMTP-server mail.public.com
I guess you can compare my example "me-at.homeip.net" with your "eshot.domain.com", i.e. no MX-record but the wish to do OpenEMM bounce processing there.

I want to test sending a mailing with sender "Customer Service" of the domain public.com. People should be able to reply to the mailing, but non-delivery reports should be handled by OpenEMM.

The example address of Customer Service is "customerservice@public.com".

I have configured the following: My mailing is set as follows:
  • Sender full name: Customer Service
  • Sender email: customerservice-bounce@public.com (this means non-delivery-reports, NDRs, will get returned to "customerservice-bounce")
  • Reply-to full name: Customer Service
  • Reply-to email: customerservice@public.com (this means human replies will get returned to ("customerservice")
Optionally, you can configure the bounce filter ext_1 in OpenEMM with forward to "customerservice@public.com" - this means that even if a human copies the sender addres and answers to "customerservice-bounce@public.com" it will reach "customerservice@public.com" (since OpenEMM bounce management recognizes that such answers are not NDRs).

I use Debian Exim4 as SMTP-server on the smart relay and while testing with "Dagmar Debug" (nouser@nodomain) I had to add a new pattern for hard bounces in OpenEMM (in bav.rule under [hard] add the line "^ Unrouteable address"). I will open a SourceForge report about this.

If you send a test mailing, the NDR for Dagmar Debug will show up as a hard bounce in the OpenEMM statistics.

The following routes must be open in your firewall:
  • (world) -tcp/25=SMTP-> mail.public.com (in your setup: smtp.domain.com)
  • mail.public.com (smtp.domain.com)) -tcp/25=SMTP-> me-at.homeip.net (in your setup: eshot.domain.com)
Good luck!
Momo
Posts: 7
Joined: Fri Jan 16, 2009 11:32 am

Post by Momo »

Hi again,

Before to continue with my problems, I would like said "Thank you very much for your help "

I think, I have a few confusions.

OpenEMM redirection domain: me-at.homeip.net
If I understand, I need make file but where and what is his name ?

Code: Select all

Alias on mail.public.com, in /etc/aliases "customerservice-bounce: ext_1@me-at.homeip.net" (confirm with "newaliases)
I created in aliase "customerservice-bounce: ext_1@eshot.domain.com" but it doesn't work

Code: Select all

Bounce filter in OpenEMM named "ext_1@me-at.homeip.net
Where I configure that, in /home/openemm/conf/bav/bav.conf-local whith this line :

Code: Select all

customerservice-bounce@domain.com       alias:ext_1@eshot.domain.com
Bye
mkalen
Posts: 33
Joined: Tue Jan 20, 2009 7:51 pm

Configuration

Post by mkalen »

Hi,
Momo wrote:OpenEMM redirection domain: me-at.homeip.net
If I understand, I need make file but where and what is his name ?
On Windows there is a batch file "config.bat" for setting configuration parameters. It's good that you asked though since I incorrectly wrote "redirection domain". It should read "mailloop domain".

Read the documentation/installation instructions for the Linux-version of OpenEMM. It should say there.

As a last resort, use SQL:

Code: Select all

UPDATE company_tbl SET mailloop_domain = 'eshot.domain.com' WHERE company_id = 1;
(not recommended since it is not officially supported and Agnitas might change the DB schema between releases)
Momo wrote:

Code: Select all

Alias on mail.public.com, in /etc/aliases "customerservice-bounce: ext_1@me-at.homeip.net" (confirm with "newaliases)
I created in aliase "customerservice-bounce: ext_1@eshot.domain.com" but it doesn't work
Try this again and again by sending mails to customerservice-bounce@domain.com until you get it to work, even before you throw in OpenEMM and bounce management in the equation.

This is a pure MTA-only setting and has nothing to do with OpenEMM.

Usually the file is /etc/aliases and you need to run "newaliases" for changes to take effect. Read more in the postfix documentation.

Please note that the quotes from my post should NOT be included in the file. Might this be your problem? Example:

Code: Select all

customerservice-bounce: ext_1@eshot.domain.com
Momo wrote:

Code: Select all

Bounce filter in OpenEMM named "ext_1@me-at.homeip.net
Where I configure that, in /home/openemm/conf/bav/bav.conf-local whith this line :

Code: Select all

customerservice-bounce@domain.com       alias:ext_1@eshot.domain.com
I did not try the bav.conf-local. It might also work. I just used the OpenEMM web GUI and clicked on Settings / Bounce-Filters / New bounce-filter.

Note that when you are testing, for every filter you delete and re-add you will get a new recipient address for the filter (ext_2, ext_3 etc). Make sure you update the SMTP aliases accordingly when you are happy with your filter!
Momo
Posts: 7
Joined: Fri Jan 16, 2009 11:32 am

Post by Momo »

Good Evening,

I thought maybe the problem comes from here:

In your conf, you have 2 distinct domain (me-at.homeip.net and public.com)
In my conf, I have 1 domain (domain.com) and 1 subdomain ( eshot.domain.com)

When I create a bounce : customerservice-bounce@domain.com alias ext_1@eshot.domain.com
I have one error in my log :

Code: Select all

Feb 20 21:07:17 mail postfix/virtual[24720]: BD4CEB33A4: to=<ext_1@eshot.domain.com>, orig_to=<customerservice-bounce@domain.com>, relay=virtual, delay=0.05, delays=0.01/0.02/0/0.01, dsn=5.1.1, status=bounced (unknown user: "ext_1@eshot.domain.com")
I think the problem come from the subdomain eshot.domain.com. Postfix try search this user in her recipient.

What do you think ?


By the way, When I use sendmail and I launch the sendmail.enable.sh, My mailling works and bounce too (direct and simple bounce).
So I think maybe I can use this configuation but I'm worried about the security. about port 25 and maybe my server could will be a spam-relay

Do you know if the security is good on OpenEMM and what do you think again :) .

Have a nice weekend

Bye
mkalen
Posts: 33
Joined: Tue Jan 20, 2009 7:51 pm

Postfix "steals" your subdomain

Post by mkalen »

Momo wrote:I thought maybe the problem comes from here:

In your conf, you have 2 distinct domain (me-at.homeip.net and public.com)
In my conf, I have 1 domain (domain.com) and 1 subdomain ( eshot.domain.com)
No, I don't think that is a problem. I think your problem is that postfix "steals" delivery of your subdomain. See below:
Momo wrote:When I create a bounce : customerservice-bounce@domain.com alias ext_1@eshot.domain.com
I have one error in my log :

Code: Select all

Feb 20 21:07:17 mail postfix/virtual[24720]: BD4CEB33A4: to=<ext_1@eshot.domain.com>, orig_to=<customerservice-bounce@domain.com>, relay=virtual, delay=0.05, delays=0.01/0.02/0/0.01, dsn=5.1.1, status=bounced (unknown user: "ext_1@eshot.domain.com")
As you see in the log, postfix tries local delivery of ext_1@eshot.domain.com. You do not want this. You want the delivery to be sent to the SMTP-server of the host "eshot.domain.com".

Maybe postfix would behave differently if you had a DNS MX-record for eshot.domain.com, but there seems to be a way around the problem anyway.

Check out the "parent_domain_matches_subdomains" parameter for postfix. It seems for your setup, you should set this to blank (parent_domain_matches_subdomains=) in main.cf.
Momo
Posts: 7
Joined: Fri Jan 16, 2009 11:32 am

Post by Momo »

Hi mkalen,

I tried many thing but it's still not working.
So I will use sendmail directly and I hope the security will be good.

Thank you very much for your help

bye
rendered
Posts: 4
Joined: Fri Apr 08, 2011 1:56 pm

Re: Using Smart Host: Possible to use bounce management?

Post by rendered »

Is this still possible?

I've followed the instructions above but I can't seem to get it working also I'm a little confused. This Is my current set up:

[*]OpenEMM on Ubuntu Server 10.10 with dynamic IP (no MX-record)
[*]DynDNS-registration of dynamic IP, openemm.dyndns.org
[*]SMTP-server (smart-relay) using ISP mail server - mail.test.com

How would I go about configuring bounce management for this environment?
Terabapuno1
Posts: 1
Joined: Tue Apr 19, 2016 6:49 am

Re: Using Smart Host: Possible to use bounce management?

Post by Terabapuno1 »

for every filter you delete and re-add you will get a new recipient address for the filter (ext_2, ext_3 etc). Make sure you update the SMTP aliases accordingly when you are happy with your filter!????
== Solitaire ==
Post Reply