The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > UNIX and Linux Applications
.
google unix.com



UNIX and Linux Applications Discuss UNIX and Linux software applications. This includes SQL, Databases, Middleware, MOM, SOA, EDA, CEP, BI, BPM and similar topics.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
postfix sender address rewriting funksen UNIX for Advanced & Expert Users 0 09-07-2009 09:51 AM
Help rewriting my KSH-script... linsto Shell Programming and Scripting 2 08-19-2008 04:32 PM
Rewriting a word from location marringi UNIX for Dummies Questions & Answers 1 04-30-2008 01:27 PM
sendmail "root... User address required." error csgonan SUN Solaris 10 04-03-2008 09:57 AM
sendmail recipient issue supadid UNIX for Dummies Questions & Answers 1 03-19-2007 10:53 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-19-2009
icefalcon icefalcon is offline
Registered User
  
 

Join Date: Oct 2009
Posts: 3
Unhappy sendmail recipient address rewriting with local_relay or mail_hub

I'm trying to make this work with a variety of different sendmail versions (all 8.8 or better) and different OS's.

I have to configure all my unix workstations to deliver all email through a relay 'smtp.mydomain.com'. This includes unqualified names as well as qualified names and remote addresses.

The host 'smtp.mydomain.com' does not accept mail addressed to @smtp.mydomain.com and it isn't in my control to change that.

I've played around with MAIL_HUB, SMART_HOST, LOCAL_RELAY, always_add_domain, allmasquerade, masquerade_entire_domain, masquerade_envelop and pretty much every feature or setting related to address rewriting.

FROM addresses are correctly re-written with @mycomain.com, however I need unqualified recipient addresses to be rewritten with @mydomain.com and NOT @smtp.mydomain.com, which is what seems to be happening.

I tried passing the optional argument of 'mydomain.com' to the always_add_domain feature however sendmail is still tryign to deliver the maili to "user@smtp.mydomain.com" which gets rejected.

Although I need this to work on AIX, Solaris (8,9 & 10) and RHEL (3,4,5) I'm currently working with RHEL5.2 and Sendmail 8.13.8. I'm using m4 for configuration and created a stripped down sendmail.mc file:
(This is the hacked to pieces version which probably contains plenty of errors at this point)

------------------
divert(-1)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`RHEL5 2009/10/19')dnl
OSTYPE(`linux')dnl
define(`SMART_HOST', `smtp.mydomain.com')dnl
define(`MAIL_HUB', `smtp.mydomain.com')dnl
define(`LOCAL_RELAY', `smtp.mydomain.com')dnl
MASQUERADE_AS(`mydomain.com.')dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
FEATURE(allmasquerade)dnl
MASQUERADE_DOMAIN(localhost)dnl
MASQUERADE_DOMAIN(localhost.localdomain)dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain, `mydomain.com')dnl
EXPOSED_USER(`root')dnl
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
FEATURE(`accept_unresolvable_domains')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
MAILER(smtp)dnl
  #2 (permalink)  
Old 4 Weeks Ago
thepriest thepriest is offline
Registered User
  
 

Join Date: Oct 2009
Posts: 1
sendmail stickyhost

had a similar problem just now, hope this helps

FEATURE(`stickyhost')
Sendmail cf/README - Features

used with mail_hub, the message keeps its enveloped address, ie. not changed to @mail_hub
Reply

Bookmarks

Tags
sendmail

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:46 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0