LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   sendmail: trusted-users or aliases? (https://www.linuxquestions.org/questions/linux-server-73/sendmail-trusted-users-or-aliases-894129/)

kristo5747 07-27-2011 01:18 PM

sendmail: trusted-users or aliases?
 
For a project that I have been assigned to, I need to send emails to a business partner (business_partner.com) from one production server. However, my emails neither reach their destination nor bounce back to me.

Working with our business partner's IT support, the following error was discovered in their maillogs:
Quote:

chqsmt05 postfix/smtpd[1605]: NOQUEUE: reject: MAIL from unknown
[hidden_ip_address]: 450 4.1.8 <ddwmadm@pxclpd30.hidden_domain_name.com>: Sender address rejected: Domain not found;

from=<ddwmadm@pxclpd30.hidden_domain_name.com> proto=ESMTP helo=<pmempe31.prd.ext.hidden_domain_name.com>
Further analysis by my IT support shows that emails are successfully sent out ("Message accepted for delivery"):

Quote:

[root@hidden_host_name log]# grep -i business_partner maillog*
maillog.1:May 13 17:41:18 hidden_host_name sendmail[23823]: p4DHfIet023823: to=me@hidden_domain_name.com,customer@business_partner.com, ctladdr=user_name (8116/6124), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120260, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (p4DHfI53023824 Message accepted for delivery)
The app I coded is not using a public internet email address (e.g. me@hidden_domain_name.com) to send these notifications. Instead, it uses an intranet email address (the server's where my code resides: user_name@servername.hidden_domain_name.com).

My IT support guys believe it is the cause of the problem. We created an alias but it made no change. Would adding my public internet email address to "trusted-users" file (we use sendmail) help?

How can I solve this?

Al.

TB0ne 07-27-2011 02:55 PM

Quote:

Originally Posted by kristo5747 (Post 4426898)
For a project that I have been assigned to, I need to send emails to a business partner (business_partner.com) from one production server. However, my emails neither reach their destination nor bounce back to me.

Working with our business partner's IT support, the following error was discovered in their maillogs:
Further analysis by my IT support shows that emails are successfully sent out ("Message accepted for delivery"):

The app I coded is not using a public internet email address (e.g. me@hidden_domain_name.com) to send these notifications. Instead, it uses an intranet email address (the server's where my code resides: user_name@servername.hidden_domain_name.com).

My IT support guys believe it is the cause of the problem. We created an alias but it made no change. Would adding my public internet email address to "trusted-users" file (we use sendmail) help?

No, it won't help, and MAN does this sound familiar. :)

Faced the exact same issue a few years back...one of our internal mail relays (the one that shoveled things along to the Internet), had a rule change. It quit accepting server.domain.com, no matter WHAT. It would only take domain.com...and only if that was on the list of allowed domains. What you're looking for is a domain rewrite rule/masquerade.

Since your subject line says sendmail, I'll assume you're using it. If you generate your sendmail.cf file via the M4 pre-processor, shove these things in:
Code:

MASQUERADE_AS(domain.com)dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
MASQUERADE_DOMAIN(domain.com)dnl

Or, if you're naughty, edit the .mc file directly:
Code:

C{M}'server.domain.com'
# who I masquerade as (null for no masquerading) (see also $=M)
DMdomain.com

Bounce the sendmail service later. Nothing you add on your side will make their system accept it...seems that your business partner has domain-filtering in place. So, either correct the domain using the above, or get them to add a rule on their mail server to allow the mail through. It's getting dropped from further progress from THEIR side.

kristo5747 07-28-2011 11:41 AM

Quote:

Originally Posted by TB0ne (Post 4426994)
No, it won't help, and MAN does this sound familiar. :)....

I was gonna have my sysadmin change our sendmail config like so:

1) sendmail.mc

Quote:

define(`SMART_HOST',`host_name.production_email_server.com')
2) sendmail.cf
Quote:

DShost_name.production_email_server.com
Are saying that won't take care of my problem??

TB0ne 07-28-2011 03:55 PM

Quote:

Originally Posted by kristo5747 (Post 4427805)
I was gonna have my sysadmin change our sendmail config like so:

1) sendmail.mc
2) sendmail.cf

Are saying that won't take care of my problem??

Don't know, since I don't know about the rest of your infrastructure, how it's configured, or what the remote email system is expecting/wanting to see to allow incoming mail. If the upstream smarthost has a different sending domain than your server now, and that domain is accepted by the remote system, then yes, it'll work.

A smarthost is just another mail server that will simply handle mail. Defining one on a box will only make ALL the mail go to that mail server. From the messages you posted, the DOMAIN you're passing along is what's getting rejected by the other mail server. The remote server has to either allow the domain, or you have to modify the domain to match what they want.

To put it another way, think of the remote mail server as a building. Your mail needs to go to an office IN that building, but you don't have a key (valid domain). Right now you're going to the front door (the messages are coming from your server)...if you define a smart host they'll just go to the back door. And you STILL won't have a key.


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