SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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
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
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?
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?
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.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.