LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-07-2015, 12:11 PM   #1
Rincewind2
LQ Newbie
 
Registered: Dec 2007
Posts: 12

Rep: Reputation: 0
Need local postfix to send NDR if local user address is not found


I am setting up an Ubuntu 14.04 mail relay network using postfix 2.11. It is set up to allow the following configuration:
Code:
javamail_client -> localhost postfix -> relay postfix -> internet
Please note lack of any inbound mail in this setup. It is intentional.

In general, this is working well for most emails. The javamail client is perceived by the localhost postfix to be another email server. The localhost postfix is configured as a "local relay" server, meaning it is locked down to only accept mail originating on the localhost, and then forwards it to the more knowledgeable relay postfix server which attempts to deliver it to the internet. The relay server only accepts mail from the local network machines. This allows mail from <anyuser@anydomain> to be delivered to <anyuser@anydomain>. It is what I want to occur.

As I stated this works great as long as the email addresses involved conform to internet standards. However, because the developers do little to no address validation in the originating app, occasionally, there will be a destination email that postfix will interpret as a local user. When this happens, postfix dutifully issues the following error to the javamail program:
Code:
550 5.1.1 <username>: Recipient address rejected: User unknown in local recipient table
Unfortunately, the javamail program generally ignores the error. It doesn't notify the end user in any way, in most cases.

Since the developers are unlikely to fix the code soon - the ticket has been around for years - I would like to have the "localhost postfix" generate an NDR instead of generating the 550, or perhaps as well as generate the error, in the hopes that the end users will correct their problems on their own. Does anyone have any suggestion on how to accomplish this task?

One thing I've tried that somewhat accomplishes my goal is to change the value of /etc/mailname to an invalid server name. This seems to allow the localhost postfix to accept the email and forward it to the relay server, which then fails at sending it and generates the NDR. However, I'm not sure what effect that will have on other services on the localhost that are sending mail to actual local users.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to make postfix send email to another postfix in local network (LAN)? h4k33m Linux - Server 9 06-04-2015 04:33 PM
[SOLVED] Setup Postfix to Send Local Mail to Internet Email Address sumit1203 Linux - Newbie 1 09-02-2012 01:55 AM
Postfix - send mail from one local computer to another local computer Runge_Kutta Linux - Software 3 01-09-2010 07:08 AM
Send local ip address to a network host freeindy Linux - Networking 2 02-26-2008 03:19 AM
Postfix: Do not allow local users to send mail Termina Linux - Server 1 03-22-2007 05:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration