Operating System - Linux
1748104 Members
4908 Online
108758 Solutions
New Discussion юеВ

SLES8 / UnitedLinux receiving e-mail

 
Michael Williams_6
Trusted Contributor

SLES8 / UnitedLinux receiving e-mail

Hello there!

We've recently moved away from a SCO system to SLES8 (hence these three posts of problems we've encountered!), one of the things I've not worked out yet is getting the server to receive e-mail in the term of username@servername.domainname.co.uk, all our SCO systems had sendmail configured and worked fine.

SLES8 appears to use postfix, but I can't find a way in Yast2 to get it to accept incomming mail, I see there's a way to do this for individual users, but with 20 Linux servers and a NIS domain of some 100 users, this will take a long time to configure for all.

Does anyone know a way to do this using Yast??
8 REPLIES 8
Michael Williams_6
Trusted Contributor

Re: SLES8 / UnitedLinux receiving e-mail

Right, I've done a lot of investigation, and it turns out mail was being delivered all this time!!!

However, I've stumbled onto something weird.

The problem is that mail isn't being sent to Linux boxes, it turns out that the $MAIL variable was set incorrectly in the SCO .kshrc we've been using, it was pointing to /usr/spool/mail/$LOGNAME, when on Linux it should point to /var/spool/mail/$LOGNAME.

Now the profile should configure this itself, so I removed this entry from my .kshrc and mail is still picked up in SCO as it is set there, however, on Linux, it's being set to /var/mail/$LOGNAME, despite the /etc/profile having the following line:

test -z "$MAIL" && MAIL=/var/spool/mail/$USER

$MAIL is being set before /etc/profile is run as if I just add the line MAIL=/var/spool/mail/$USER in /etc/profile then this works ok! I've done a find /etc -type f -print | xargs grep MAIL and can't find anything that might be setting this variable. This variable gets set for both ksh and bash, I'm at a loss!!

Any ideas where this variable is being set?
Fred Ruffet
Honored Contributor

Re: SLES8 / UnitedLinux receiving e-mail

Try to use the file /etc/login.defs
It seems to be used to set up some vars on RH, maybe the same on Suse...

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Michael Williams_6
Trusted Contributor

Re: SLES8 / UnitedLinux receiving e-mail

Sadly not, I looked there, I've also had a look at the init scripts to see if a variable is set here and I can't find it!!

Does login call any files with variables in them before it goes to /etc/profile?
Roberto Polli
Trusted Contributor

Re: SLES8 / UnitedLinux receiving e-mail

Did you look in SUSE manual about postfix configuration? It should be comprehensive.
Anyway you can checkpoint
/etc/profile script
$HOME/{.kshrc,.bashrc,.profile,.login}

with commands like
echo "sourcing .kshrc"
and so on.

Let Me Know, R.

Michael Williams_6
Trusted Contributor

Re: SLES8 / UnitedLinux receiving e-mail

For those who have an interest, it turns out that bash defaults the $MAIL variable when it is first run, it's in the man page somewhere, I must presume that ksh does the same.

I've modified the profile so it doesn't check the existence and just sets the MAIL variable, thanks for your help anyway guys!
Matt Palmer_2
Respected Contributor

Re: SLES8 / UnitedLinux receiving e-mail

hi, you could try installing webmin which has quite a user-friendly interface for configuring and administering PostFix.

HTH

Matt
Roberto Polli
Trusted Contributor

Re: SLES8 / UnitedLinux receiving e-mail

Nice hint Matt,
I learned postfix config using that webmin module!

Pax, R.
Vernon Brown_4
Trusted Contributor

Re: SLES8 / UnitedLinux receiving e-mail

Ok lets see; you have an SLES8 server acting as a gateway to the internet and you want it to receive mail and forward it to about 20 other mail servers in your local net ??

If that is your setup you just need to configure your mail access DB to relay to the other servers. I think you only need the last part of the domain in the access DB. I had SuSE 9 set up similar to that with a local net of only 2 boxes.

After you change your access text file, run make to update the access DB.

I tried to do it with YaST but gave up and went to the command line to complete the setup.

Good luck !!