LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 07-31-2005, 01:30 AM   #1
46&2
Member
 
Registered: Mar 2004
Location: Idaho, USA
Distribution: Gentoo
Posts: 67

Rep: Reputation: 15
(Probably) Simple sendmail question


Forgive me if this has been asked a billion times before, but I did RTFM and search the forums but wasn't able to find anything relavant.

I've followed Shilo's guide (fantastic) and have set up a mail and web server. They are both working perfectly, but I have one question about sendmail.

As it currently stands when I send an email to someone, the from address shows up as "chris@slackware.domain.com" where "slackware" is my hostname and "domain" is my actual domain. I'd like to fix it so that it shows up as just "chris@domain.com". Could anyone point me in the right direction?
 
Old 07-31-2005, 09:50 AM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
You'll see something like this in your sendmail.cf file:

Code:
# my official domain name
# ... define this only if sendmail cannot automatically determine your domain
#Dj$w.Foo.COM
That's what you want to change or edit as sendmail is determining your fully qualified domain most likely itself, using the host.domain.com instead of just domain.com
 
Old 07-31-2005, 10:32 AM   #3
Pete M
Member
 
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657

Rep: Reputation: 31
46&2

Another way is to add domain.com to /etc/mail/local-host-names

Sendmail looks here to determine the domains it's responsible for

Just add it as is
Code:
domain.com
Pete
 
Old 07-31-2005, 02:36 PM   #4
46&2
Member
 
Registered: Mar 2004
Location: Idaho, USA
Distribution: Gentoo
Posts: 67

Original Poster
Rep: Reputation: 15
Thank you both for the suggestions. Unfortunately, neither of them worked. trickykid, here is my slackware-sendmail.mc that I used for my sendmail.mc. Is the option you mentioned not in the slackware-sendmail.mc? I have a feeling it's something I'm going to have to enter manually. Anyway, here it is.

Edit: Is it the option I've marked in red?

Code:
dnl# This is the default sendmail .mc file for Slackware.  To generate
dnl# the sendmail.cf file from this (perhaps after making some changes),
dnl# use the m4 files in /usr/share/sendmail/cf like this:
dnl#
dnl# cp sendmail-slackware.mc /usr/share/sendmail/cf/config.mc
dnl# cd /usr/share/sendmail/cf
dnl# sh Build config.cf
dnl#
dnl# You may then install the resulting .cf file:
dnl# cp config.cf /etc/mail/sendmail.cf
dnl#
include(`../m4/cf.m4')
VERSIONID(`default setup for Slackware Linux')dnl
OSTYPE(`linux')dnl
dnl# These settings help protect against people verifying email addresses
dnl# at your site in order to send you email that you probably don't want:
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun,goaway')dnl
dnl# Uncomment the line below to send outgoing mail through an external server:
define(`SMART_HOST',`mail.isp.com')
dnl# No timeout for ident:
define(`confTO_IDENT', `0')dnl
dnl# Enable the line below to use smrsh to restrict what sendmail can run:
dnl FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
dnl# See the README in /usr/share/sendmail/cf for a ton of information on
dnl# how these options work:
FEATURE(`use_cw_file')dnl
FEATURE(`use_ct_file')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(`local_procmail',`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`redirect')dnl
dnl# Turn this feature on if you don't always have DNS, or enjoy junk mail:
dnl FEATURE(`accept_unresolvable_domains')dnl
EXPOSED_USER(`root')dnl
dnl# Also accept mail for localhost.localdomain:
LOCAL_DOMAIN(`localhost.localdomain')dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl

Last edited by 46&2; 07-31-2005 at 02:39 PM.
 
Old 07-31-2005, 04:31 PM   #5
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 49
I use the Pete M method. Lazy me, I reboot (though "/etc/rc.d/rc.sendmail restart" should do the same) and it works. Did you remember to restart sendmail?
 
Old 07-31-2005, 04:44 PM   #6
46&2
Member
 
Registered: Mar 2004
Location: Idaho, USA
Distribution: Gentoo
Posts: 67

Original Poster
Rep: Reputation: 15
Well if it isn't the man himself .. as long as you're in on the thread, thank you so much for the guide. In any case, yes I did restart sendmail with the all powerful:
Code:
/etc/rc.d/rc.sendmail restart
with my /etc/mail/local-host-names looking something like this:
Code:
# names of hosts for which we receive mail
domain.com
Like you, I didn't think a reboot would be necessary. Any other ideas?
 
Old 07-31-2005, 05:14 PM   #7
Pete M
Member
 
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657

Rep: Reputation: 31
46&2

What does your /etc/hosts file look like ?

Pete



Last edited by Pete M; 07-31-2005 at 05:18 PM.
 
Old 07-31-2005, 05:25 PM   #8
46&2
Member
 
Registered: Mar 2004
Location: Idaho, USA
Distribution: Gentoo
Posts: 67

Original Poster
Rep: Reputation: 15
The line in red looks rather interesting. What should I change that to?

Code:
                                                                                                                                                                                                                                     
#
# hosts		This file describes a number of hostname-to-address
#		mappings for the TCP/IP subsystem.  It is mostly
#		used at boot time, when no name servers are running.
#		On small systems, this file can be used instead of a
#		"named" name server.  Just add the names, addresses
#		and any aliases to this file...
#
# By the way, Arnt Gulbrandsen <agulbra@nvg.unit.no> says that 127.0.0.1
# should NEVER be named with the name of the machine.  It causes problems
# for some (stupid) programs, irc and reputedly talk. :^)
#

# For loopbacking.
127.0.0.1		localhost
127.0.0.1		slackware.domain.com slackware

# End of hosts.
 
Old 07-31-2005, 05:36 PM   #9
Pete M
Member
 
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657

Rep: Reputation: 31
46&2

Try this way

Code:
127.0.0.1	slackware.domain.com   slackware   localhost

Just this one line, put # in front of 127.0.0.1 localhost just to see if it helps

Unfortunately for this to take effect you will have to reboot

Pete
 
Old 07-31-2005, 05:41 PM   #10
46&2
Member
 
Registered: Mar 2004
Location: Idaho, USA
Distribution: Gentoo
Posts: 67

Original Poster
Rep: Reputation: 15
So you're saying I should make /etc/hosts look something like this:

Code:
# For loopbacking.
#127.0.0.1		localhost
127.0.0.1		slackware.domain.com slackware
and then reboot?
 
Old 07-31-2005, 05:55 PM   #11
Pete M
Member
 
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657

Rep: Reputation: 31
No

Like this

Code:
#127.0.0.1	localhost
127.0.0.1   slackware.domain.com   slackware   localhost
All the "#" does is it gets that line ignored, if it works ok you can then later delete that line

Pete
 
Old 07-31-2005, 07:56 PM   #12
46&2
Member
 
Registered: Mar 2004
Location: Idaho, USA
Distribution: Gentoo
Posts: 67

Original Poster
Rep: Reputation: 15
OK. I changed the /etc/hosts file to look like how you said, and left the "domain.com" entry in the "local-host-names" file. I just tried sending something to my Gmail account and it still shows up as "chris@slackware.domain.com". Something you might be interested to know is that when I install SquirrelMail and tweak the config file, all mail send through SquirrelMail shows up as from @domain.com rather than the fully qualified domain name. Is this something having to do with Pine?

Something else: http://www.sendmail.org/faq/section3.html#3.3

Is that what I should look at doing?
 
Old 07-31-2005, 08:40 PM   #13
46&2
Member
 
Registered: Mar 2004
Location: Idaho, USA
Distribution: Gentoo
Posts: 67

Original Poster
Rep: Reputation: 15
OK. I think I got it to work.

I left the "domain.com" entry in the local-host-names file. From there, I went to the virtusertable in /etc/mail/ and followed the instructions found here: http://www.sendmail.org/virtual-hosting.html

So from what I understood, that was going to route messages sent to chris@domain.com to chris@slackware.domain.com. With that working, I went to the sendmail-slackware.mc file and entered:
Code:
MASQUERADE_AS(domain.com)
It's a rough solution, but it works! Thanks to all of you for the help.
 
Old 08-01-2005, 01:20 AM   #14
Pete M
Member
 
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657

Rep: Reputation: 31
46&2

Code:
It's a rough solution, but it works!
I don't think so from the links you posted it looks like the correct solution, Pine seems to have been the culprit all along

Glad you got it working

Pete
 
  


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
Ubuntu Fluxbox simple question, simple answer? generallimptoes Linux - Software 3 09-26-2005 02:03 PM
simple sendmail question Avatar Linux - Software 1 07-13-2004 08:20 AM
Installing Programs - A simple question from my simple mind jmp875 Linux - Newbie 6 02-18-2004 09:03 PM
A simple Sendmail configuration question J_Szucs Linux - Newbie 2 11-12-2002 03:33 PM
simple question seeking simple answer enzo250gto Linux - Newbie 1 10-27-2001 04:08 AM


All times are GMT -5. The time now is 07:27 AM.

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