Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compiling Sendmail 8.12.5 4

Status
Not open for further replies.

fluid11

IS-IT--Management
Jan 22, 2002
1,627
US
Sendmail newbie here....

I'm trying to install Sendmail 8.12.5 from source on a Red Hat 7.3 machine. I previously had Sendmail 8.11.6 installed from RPMs but I uninstalled it.

When I run 'sh Build' I get a bunch of EOF errors. I copied the errors to a file for easy reading.

[root@rh1 sendmail-8.12.5]# sh Build 2> error.log

[root@rh1 sendmail-8.12.5]# cat error.log
/bin/sh: -c: line 1: unexpected EOF while looking for matching `''
/bin/sh: -c: line 2: syntax error: unexpected end of file
make[1]: *** [assert.o] Error 2
/bin/sh: -c: line 1: unexpected EOF while looking for matching `''
/bin/sh: -c: line 2: syntax error: unexpected end of file
make[1]: *** [debug.o] Error 2
/bin/sh: -c: line 1: unexpected EOF while looking for matching `''
/bin/sh: -c: line 2: syntax error: unexpected end of file
make[1]: *** [smdb.o] Error 2
/bin/sh: -c: line 1: unexpected EOF while looking for matching `''
/bin/sh: -c: line 2: syntax error: unexpected end of file
make[2]: *** [assert.o] Error 2
make[1]: *** [/usr/local/src/sendmail-8.12.5/obj.Linux.2.4.18-3.i686/libsm/libsm.a] Error 2
/bin/sh: -c: line 1: unexpected EOF while looking for matching `''
/bin/sh: -c: line 2: syntax error: unexpected end of file
make[2]: *** [assert.o] Error 2
make[1]: *** [/usr/local/src/sendmail-8.12.5/obj.Linux.2.4.18-3.i686/libsm/libsm.a] Error 2
/bin/sh: -c: line 1: unexpected EOF while looking for matching `''
/bin/sh: -c: line 2: syntax error: unexpected end of file
make[2]: *** [assert.o] Error 2
make[1]: *** [/usr/local/src/sendmail-8.12.5/obj.Linux.2.4.18-3.i686/libsm/libsm.a] Error 2
/bin/sh: -c: line 1: unexpected EOF while looking for matching `''
/bin/sh: -c: line 2: syntax error: unexpected end of file
make[2]: *** [assert.o] Error 2
make[1]: *** [/usr/local/src/sendmail-8.12.5/obj.Linux.2.4.18-3.i686/libsm/libsm.a] Error 2
/bin/sh: -c: line 1: unexpected EOF while looking for matching `''
/bin/sh: -c: line 2: syntax error: unexpected end of file
make[2]: *** [assert.o] Error 2
make[1]: *** [/usr/local/src/sendmail-8.12.5/obj.Linux.2.4.18-3.i686/libsm/libsm.a] Error 2
/bin/sh: -c: line 1: unexpected EOF while looking for matching `''
/bin/sh: -c: line 2: syntax error: unexpected end of file
make[2]: *** [assert.o] Error 2
make[1]: *** [/usr/local/src/sendmail-8.12.5/obj.Linux.2.4.18-3.i686/libsm/libsm.a] Error 2
/bin/sh: -c: line 1: unexpected EOF while looking for matching `''
/bin/sh: -c: line 2: syntax error: unexpected end of file
make[2]: *** [assert.o] Error 2
make[1]: *** [/usr/local/src/sendmail-8.12.5/obj.Linux.2.4.18-3.i686/libsm/libsm.a] Error 2
/bin/sh: -c: line 1: unexpected EOF while looking for matching `''
/bin/sh: -c: line 2: syntax error: unexpected end of file
make[2]: *** [assert.o] Error 2
make[1]: *** [/usr/local/src/sendmail-8.12.5/obj.Linux.2.4.18-3.i686/libsm/libsm.a] Error 2
/bin/sh: -c: line 1: unexpected EOF while looking for matching `''
/bin/sh: -c: line 2: syntax error: unexpected end of file
make[2]: *** [assert.o] Error 2
make[1]: *** [/usr/local/src/sendmail-8.12.5/obj.Linux.2.4.18-3.i686/libsm/libsm.a] Error 2
make: *** [all] Error 2


Any ideas?


Thanks,
Chris


------------------------------------------------------------------------------
If somebody helps you, please vote for them for "Tipmaster of the Week" by giving them a "purple star". This can be done by clicking the "Mark this post as a helpful/expert post" button.
 
Hi Chris, Take a look at one or two of those files with a text editor. If it looks funky or you see an EOF in the top left corner, the files got corrupted somehow. It usually happens using binary mode to tranffer an ASCII file or when downloading from Windows to linux. One more thing it could be is the way they were compressed into the tarball. If the text files look ok then I'm at a loss for words. :)
 
They aren't text files. I downloaded them straight from Sendmail's FTP server onto my Linux box. I tried both 8.12.5 and 8.12.4. I managed (somehow) to get past this point, but the Sendmail installation was all messed up afterwards.

|
|
V

It doesn't matter at this point anyway because I'm dumping Sendmail. This is by far the *WORST* program I've ever used in my life for any platform (Linux, Novell, Windows). I've never had so many issue's with a program before. The only reason I recently learned it is because I feel like I need to know everything in order to be a good IT consultant. RhythmAce, you are actually one of the people who prompted me to go and learn it after that one thread we spoke in in the Linux Server forum. I picked up the Linux Sendmail Administration book and read through the whole thing and took 25 pages of notes. It wasn't a waste of time or anything, because now I know that I hate it, plus, a lot of the information transfers over to Postfix.

I love the Sendmail documentation too (*sarcastic). You read the readme which tells you to read 12 other readme's which are all 20 pages long.

I'm sticking with Postfix. I like every single aspect of Postfix better than Sendmail. The best thing is that Postfix's documentation is written in a language from this planet that I understand. I'm reading the Postfix book right now and it all makes perfect sense. This is how a mail server should be.


ChrisP ------------------------------------------------------------------------------
If somebody helps you, please vote for them for "Tipmaster of the Week" by giving them a "purple star". This can be done by clicking the "Mark this post as a helpful/expert post" button.
 
I had faced similar probs while upgrading my sendmail 8.9.3 to 8.11.6. LAter i found out that my installation procedure was wrong. Lemme give u the procedure i followed. It works for later versions of sendmail as well. Hope the below procedure works for u as well. change the paths mentioned in the procedure to the paths relevant to ur OS..

Following are the prerequisites needed for deploying Sendmail 8.11.x and later versions

 Sendmail 8.11.x or later Source code
 C Compiler
 M4 Preprocessor

3.1 Installing Sendmail 8.11.x or later

1. Login to the Server with administrative (root) privileges.

2. Download the Sendmail 8.11.x or later Source code in zipped format from ftp.//Sendmail.org


3. The downloaded file will be in .tar.gz form. Extract the source code from this file by using following commands:

# gunzip sendmail-8.11.6.tar.gz
# tar –xvf sendmail-8.11.6.tar

4. This creates a directory by name “sendmail-8.11.6” in the present working directory. This is the source code of sendmail.

5. Change the current directory to sendmail source code directory

# cd sendmail-8.11.6

6. Change to the configuration files directory in the sendmail directory by using following command:

# Cd cf/cf/

7. This directory holds the files having extention .mc. These files contain the configurations for individual platforms. Locate the file named with your specific OS platform (Solaris 2.x in this case) and create its copy as config.mc file by using following command

# cp generic-solaris2.mc config.mc. ( Here u use the .mc file that matches ur OS)

The file generic-solaris2.mc is configuration file for Solaris 2.x platforms.

8. Now modify the contents of the config.mc file by using vi editor to look like this.

divert(0)dnl
VERSIONID(`$Id: generic-solaris2.mc,v 8.11 1999/02/07 \ 07:26:03 gshapiro Exp $')
OSTYPE(solaris2)dnl
DOMAIN(your-domain)dnl
MASQUERADE_AS(‘mention-masq-name-if-reqd’)
FEATURE(relay_hosts_only)
FEATURE(smrsh)
MAILER(local)dnl
MAILER(smtp)dnl

Add whatever features u want and save and close this file now. LAter, i added Cyrus SASL as well to my sendmail.

9. Build the configuration file by using following command in the present working directory:

# sh Build config.cf

This command will create a configuration file named config.cf in your working directory. This file will be used as the sendmail configuration file in the sendmail 8.11.6 version being installed.

10. Now, make an archive of the earlier sendmail version by using following commands (This is my way; u can follow ur own way to keep archive of ur old sendmail):

# cd /usr/lib/mail/
# tar –cvf sendmail893.tar
# cd /etc/mail/
# tar –cvf sendmail893-conf.tar
# cd /usr/sbin/
# tar –cvf sendmail893-commands.tar

Note: The above folder paths are relevent to solaris. locate the above files from paths relevent to ur OS.

Move the above archived tar files to a safe location from where they could be accessed easily. These will be used in case it is required to rollback to the earlier sendmail version (Sendmail 8.9.3 in this case).

11. Stop the sendmail programe now by using following command at the prompt:

# /etc/init.d/sendmail stop

Confirm that Sendmail program has been stopped by using following command:

# ps –ef | grep sendmail

The above command should not show any sendmail instance running.

Change to the Sendmail 8.11.6 source code directory again.

12. Install the config.cf in the cf/cf/ directory to the /etc/mail/ directory

# cd cf/cf/
# cp config.cf /etc/mail/sendmail.cf
# cd ../..

13. Confirm that you are in Sendmail source code directory (sendmail-8.11.6). Now change your working directory to sendmail directory in the source code:

# cd sendmail

14. Now build and install the new Sendmail 8.11.6 by using following command:

# sh Build install

This will build and install the Sendmail 8.11.6 in your system.

15. Now change your working directory to /etc/mail/

# cd /etc/mail/

16. Create two file by the names “local-host-names” and “relay-domains”

# touch relay-domains
# touch local-host-names

Open the relay-domains file and add the FQDN’s (Fully Qualified Domain Names) of the hosts which will be allowed to relay through your server. Save this file and exit from the editor.
Leave the file local-host-names as blank.

17. Open the file sendmail.cf and change the settings as rqd:

18. Start the Sendmail program by using following command:

# /etc/init.d/sendmail start

19. This will start the Sendmail newer version. Sendmail will now send the messages in the mail queue located in /var/spool/mqueue to the internet mail users.

Note: Please note that i was not using aliases database for sendmail that moment so i didnt bother about any aliases and users. I got those later on , and it went smoothly!

Hope this works for u as well.

All the best,




- Hemant
Networking and Systems Integration Group
Satyam Computer Services Ltd
 
Those are good instructions. You should definitely post those into a FAQ for others to read.

That is basically what I did. I've installed Sendmail a few times before this and had a working config on another machine before I attempted this. The reason I started over is because I wanted to compile the latest sendmail with support for Cyrus SASL.

Well anyway, I've already abandon Sendmail for greener pastures. I already have Postfix up and running perfectly (I'm not done configuring it yet though as I still have some reading to do). I have zero issues with it at this point. I can't think of a single reason why anybody would use Sendmail over Postfix. Postfix does everything Sendmail does, except it does it better.


Thanks anyway (I gave you a star for it),
ChrisP ------------------------------------------------------------------------------
If somebody helps you, please vote for them for "Tipmaster of the Week" by giving them a "purple star". This can be done by clicking the "Mark this post as a helpful/expert post" button.
 
Thanks!
Need a favour fm u Chris.
Since u hav worked on postfix, do u hav its reference material or installation details? I too would like to see it!

Regds,

- Hemant
Networking and Systems Integration Group
Satyam Computer Services Ltd
 
I'm reading through the only Postfix book that exists (at least that I'm aware of) --> The book seems pretty good so far.

The main Postfix configuration file, /etc/postfix/main.cf, has detailed, easy to read descriptions of almost every single parameter that you can set.

I'm not finished with my notes yet, but here's the instructions that I have written down...




Installing Postfix from source
- extract the tar archive to /usr/local/src…

tar zxvf postfix.tar.gz -C /usr/local/src

- create a new user and group called postfix without a homedir or shell…

useradd -M postfix -s /bin/false

- in Postfix, you have the option of using a separate group to own the maildrop message queue so that it is not world writeable. The maildrop message queue will only be writable to this special maildrop group. When the maildrop message queue is restricted, the Postfix sendmail program automatically notices and calls the postdrop program to insert new messages into the maildrop message queue.

/usr/sbin/groupadd maildrop

- time to compile…
cd /usr/local/src/postfix
make
- before you install the binaries, you have to rename any old Sendmail files if you had Sendmail running on the system previously. Backup /usr/sbin/sendmail, /usr/bin/mailq, and /usr/bin/newaliases. The reason for this is because Postfix uses the same commands. When you are finished, run the automated install script…

/bin/sh INSTALL.sh

- during the installation process, if you want to run the more secure protected maildrop message queue instead (like above), you must specify the group name that you created for write access to the maildrop message queue when the ‘setgid’ option line is presented. I created a group called maildrop above.
- the install options are written to /etc/postfix/install.cf for future reference
- in the future, you can always re-run the INSTALL.sh script to make changes




That is what I have so far. If your running something like Red Hat, you can always use the RPM package. Red Hat has a nice howto guide here --> and a FAQ here -->
There is also *good documentation on Postfix's website here --> When I say good, I mean it. Its not the garbage you see on Sendmail's site.


ChrisP ------------------------------------------------------------------------------
If somebody helps you, please vote for them for "Tipmaster of the Week" by giving them a "purple star". This can be done by clicking the "Mark this post as a helpful/expert post" button.
 
Butterfly, if you give Postfix a try, post back and let us know what you think.

Chris ------------------------------------------------------------------------------
If somebody helps you, please vote for them for "Tipmaster of the Week" by giving them a "purple star". This can be done by clicking the "Mark this post as a helpful/expert post" button.
 
Yes Chris,

I will certainly do that..

Regds,

- Hemant
Networking and Systems Integration Group
Satyam Computer Services Ltd
 
Chris,

Forgot to ask you whether postfix will run smoothly on Solaris?
I am a solaris guy basically.

Regds,

- Hemant
Networking and Systems Integration Group
Satyam Computer Services Ltd
 
I'm a Linux guy, but Postfix will run on any Unix-based OS. They have different OS specific packages here (including Solaris)--> or you can download the source here -->
ChrisP ------------------------------------------------------------------------------
If somebody helps you, please vote for them for "Tipmaster of the Week" by giving them a "purple star". This can be done by clicking the "Mark this post as a helpful/expert post" button.
 
CORRECTIONS in the installation instructions for the newest version of Postfix...

Instead of using a group called "maildrop", create a group called "postdrop". The install script is no longer called INSTALL.sh - just run "make install" to start the interactive script (after running "make"). You can probably just press enter throughout the script to use all of the defaults.

After the installation, you can just edit the $myorigin, $mydestination, and $mynetworks parameters in main.cf to get a very basic Postfix configuration up and running (they tell you this after you run the script). I would also "touch up" the /etc/postfix/aliases lookup table too.

Sorry for the mistakes in the first post. The newest version of Postfix has changed slightly (for the better).


ChrisP ------------------------------------------------------------------------------
If somebody helps you, please vote for them for "Tipmaster of the Week" by giving them a "purple star". This can be done by clicking the "Mark this post as a helpful/expert post" button.
 
Thanx again Chris,

I will be trying Postfix in this weekend..
Busy in some implementations in the office..

Regds,

- Hemant
Networking and Systems Integration Group
Satyam Computer Services Ltd
 
Hey Chris!

This POstfix is absolutely good tool, man!
Great!

Regds,

- Hemant
NSIG,
Satyam Computer Services Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top