- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Sendmail : modify outgoing email address domain na...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-24-2009 01:37 AM
тАО07-24-2009 01:37 AM
Sendmail : modify outgoing email address domain name
Our exhange server address is changing now(from @abc.com to @xyz.com) and not all of our above scripts use aliases. They use hardcoded email address within them( a not so good practise !)
Is there anyway to setup rules in sendmail so that any email sent from a script/shell or any mail client/pogram to name@abc.com, is automatically changed to name@xyz.com by sendmail before sending the mail out ?
Platform : HP-UX 11.11 on various HP 9000 and Itanium servers.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-24-2009 01:50 AM
тАО07-24-2009 01:50 AM
Re: Sendmail : modify outgoing email address domain name
Look out for DS in /etc/sendmail.cf file and make an entry there of your domain i.e xyz.com
Regards
Sunny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-24-2009 01:52 AM
тАО07-24-2009 01:52 AM
Re: Sendmail : modify outgoing email address domain name
the configuration file is /etc/mail/sendmail.cf
Regards
Sunny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-24-2009 05:07 AM
тАО07-24-2009 05:07 AM
Re: Sendmail : modify outgoing email address domain name
-You need to edit /etc/mail/sendmail.cf file
-find the line starting with letters DM, most probably followed by nothing
-Change this line to
DMmydomain.com
also make sure you do not have any lines starting with
Dj$w.mydomain.com
if there is, try commenting it out.
Give it a try and see. sendmail is a big behemoth, which is very hard to configure without seeing the whole sendmail.cf file and making a couple of tests before being able to say, it will do what you want to.
Hope this helps
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-24-2009 05:13 AM
тАО07-24-2009 05:13 AM
Re: Sendmail : modify outgoing email address domain name
;^)
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-24-2009 05:36 AM
тАО07-24-2009 05:36 AM
Re: Sendmail : modify outgoing email address domain name
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-24-2009 06:15 AM
тАО07-24-2009 06:15 AM
Re: Sendmail : modify outgoing email address domain name
to whatever you want. And it may depend on
the version of sendmail binary and
sendmail.cf you are running. It's not easy
for some to setup.
This is the way I do it.
I use a virtusertable. If your sendmail.cf
file does not have something like this
entry, then you need to upgrade sendmail.
Mine is old I'm sure. But it still works.
##### @(#)virtusertable.m4 8.8 (Berkeley) 10/6/1998 #####
# Virtual user table (maps incoming users)
Kvirtuser dbm -o /etc/mail/virtusertable
I added the line in sendmail.cf:
C{Virt}
On this line I put the domains I want to
transpose.
C{Virt}domain1.com domain2.com
Then I changed line in sendmail.cf for $=w
to $=(Virt):
# handle virtual users
#R$+ < @ $=w . > $: < $(virtuser $1 @ $2 $@ $1 $: @ $) > $1 < @ $2 . >
R$+ < @ $={Virt} . > $: < $(virtuser $1 @ $2 $@ $1 $: @ $) > $1 < @ $2 . >
I then have a virtusertable dbm file that
I can build with an alias makevirt:
makevirt='vi /etc/mail/virtusertable;makemap dbm /etc/mail/virtusertable
The virtusertable has entries like:
John.Doe@somedomain John.Doe@otherdomain
Jane.Doe@somedomain Jane.Doe@domain1.com
"otherdomain" can be routed to another
gateway with sendmail dbm file:
/etc/mail/mailertable
With entries like:
otherdomain smtp:relay.domain.com
domain1 smtp:relay1.domain.com
domain2 smtp:relay2.domain.com
I have an alias for this also to build the
dbm file:
makemailer='vi /etc/mail/mailertable;makemap dbm /etc/mail/mailertable < /etc/mail/mailertable'
And it is incorporated in sendmail.cf also:
##### @(#)mailertable.m4 8.10 (Berkeley) 10/6/1998 #####
# Mailer table (overriding domains)
Kmailertable dbm -o /etc/mail/mailertable
R< $+ > $* $: < $(mailertable $1 $) > $2 lookup
The full user addresses are either expanded
from the sendmail aliases file from unix ids
or are generated from applications as the
full domain email addresses. Works pretty
good for me in handling email routing
to either our Exchange gateway or up to
some other corp smart email relay or to
another user. There should be some docs on
the sendmail.com web page about doing some
of this. I have not looked at it in years
though. The way I do it above is just the
way I ended up doing it back in the 90's.
I'm sure things have changed since then.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 02:20 AM
тАО07-27-2009 02:20 AM
Re: Sendmail : modify outgoing email address domain name
Tried various changes, but couldn't accomplish my requirement.
Is the Virtusertable only for mapping incoming mail ?
Should I instead be using genericstable ?
I want that any outgoing mail sent by a shell script using sendmail to john@abc.com is changedby sendmail to john@xyz.com before sending the mail to the SMTP server.
Please assist.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 03:55 AM
тАО07-27-2009 03:55 AM