LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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-10-2003, 04:27 AM   #1
m0rl0ck
Member
 
Registered: Nov 2002
Distribution: A totally 133t distro :)
Posts: 358

Rep: Reputation: 31
Sendmail outgoing "From:" header rewrite


Im having some trouble getting sendmail to rewrite a from header.
I normally run as root (yes I know, Ive been doing this since '97 and the sky hasnt fallen yet) and somtimes zip off an email from the command line.
When the sender gets the message "root" appears in the from header and Id like to change this to a user instead.

Heres the pertinent section of my sendmail.mc:

define(`confDEF_USER_ID',``mail:mail'')dnl
OSTYPE(`linux')dnl
undefine(`UUCP_RELAY')dnl
undefine(`BITNET_RELAY')dnl
define(`confALIAS_WAIT', `30')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST',true)dnl
define(`confDONT_PROBE_INTERFACES',true)dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
dnl define delivery mode: interactive, background, or queued
dnl define(`confDELIVERY_MODE', `i')
dnl MASQUERADE_AS(`m0rl0ck.xxx.xx')dnl
dnl FEATURE(`limited_masquerade')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(mailertable)dnl
dnl virtusertable: redirect incoming mail to virtual domain to particular user or domain
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')dnl
dnl genericstable: rewrite sender address for outgoing mail
FEATURE(`genericstable', `hash -o /etc/mail/genericstable')dnl
FEATURE(always_add_domain)dnl
FEATURE(redirect)dnl
FEATURE(use_cw_file)dnl
FEATURE(local_procmail)dnl

Changed my hostname in the above, but its a FQDN. Heres my genericstable:

m0rl0ck m0rl0ck@myisp.com
root m0rl0ck@myisp.com

So Im trying to rewrite root@m0rl0ck.xxx.xx to m0rl0ck@myisp.com.
Im using sendmail 8.12.6 my firewall is actually m0rl0ck.xxx.xx and my mailserver is bunny.m0rl0ck.xxx.xx. Im using dynip and bunny is flisted as my mx record.
Anybody have an idea what Im doing wrong?
 
Old 08-11-2003, 03:24 PM   #2
m0rl0ck
Member
 
Registered: Nov 2002
Distribution: A totally 133t distro :)
Posts: 358

Original Poster
Rep: Reputation: 31
So to in part answer my own question, what I was lacking in my sendmail.mc file was the line:

GENERICS_DOMAIN(mailserver.mydomain.xxx.xx mydomain.xxx.xx mailserver)dnl

The domain name and email user are now being rewritten the way Id like.

Still havent found a way to rewrite the username that appears before the email address when I use command line mail. Instead of:
"root" <user@domainname.com>

Id like:

"someotheruser" <user@domainname.com>

anybody know how to rewrite the user that appears before the email addy?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
"Rewrite" Linux distribution J_angel2000 Linux - Newbie 7 09-16-2004 01:05 AM
How do I get "Kernel Header" files so I can install nVidia drivers Stevetgn Linux - Newbie 4 01-14-2004 06:57 PM
"ifnet structure (regarding configured interfaces)header file in linux9?" deepender Programming 0 12-07-2003 01:11 AM
Sendmail 'From' header rewrite J_Szucs Linux - Software 7 09-10-2003 11:45 PM
sendmail & Suse 8.0 & outgoing adress rewrite mule Linux - Software 2 09-01-2003 02:13 AM


All times are GMT -5. The time now is 11:35 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration