LinuxQuestions.org
Visit Jeremy's Blog.
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 07-30-2009, 12:06 PM   #1
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Rep: Reputation: 31
So I compiled sendmail from source..


I'm using an O'Reilly book as a guide which is making things easier. However, I get to the install section and they seem to want me to write my own startup script.

That seems a bit nutty to me. Is this normal procedure for installing programs that you want to start with the system? There isn't a directory somewhere where an existing script is stashed that I can edit?
 
Old 07-30-2009, 02:09 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 22,332

Rep: Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026
Quote:
Originally Posted by davidstvz View Post
I'm using an O'Reilly book as a guide which is making things easier. However, I get to the install section and they seem to want me to write my own startup script.

That seems a bit nutty to me. Is this normal procedure for installing programs that you want to start with the system? There isn't a directory somewhere where an existing script is stashed that I can edit?
No, if you're compiling from source, that can happen. However, if you downloaded and installed the package for your particular distro, the startup and shutdown scripts would be included, along with some other things that you may have to do by hand, too....
 
Old 07-30-2009, 03:04 PM   #3
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 31
hmm, maybe I'll find a package and dig the scripts out of that, or run it and replace the binary. thanks for the suggestion (I need certain features that aren't compiled by default).
 
Old 07-30-2009, 07:00 PM   #4
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 31
Ok, start scripts aren't nearly as complicated as they look at first glance. I found one and modified it a bit.

However, I probably did something else wrong somewhere. The daemons run, but if I send mail to the server if vanishes, and whenever I try to send mail out from the server it gets stuck in the clientqueue and if you read the header it says Permission denied. I also note that if I send from root the queue file ends up with the smmsp owner name, but a normal user sending results in that normal user owning the queue file for the message.

I probably did something wrong with regard to running the daemon's with the right privileges.

Code:
V8
T1248994130
K1248994130
N1
P30028
MDeferred: 421 4.3.0 collect: Cannot write ./dfn6UMmotE029769 (bfcommit, uid=0, gid=65533): Permission denied
Fs
$_testuser@localhost
${daemon_flags}c u
Stestuser
Atestuser@other.server.com
MDeferred: 421 4.3.0 collect: Cannot write ./dfn6UMmotE029769 (bfcommit, uid=0, gid=65533): Permission denied
C:testuser
rRFC822; testuser#other.server.com
RPFD:testuser
H?P?Return-Path: <<81>g>
H??Received: (from testuser@localhost)
        by other.server.com (8.14.3/8.14.3/Submit) id n6UMmoTP029767
        for testuser; Thu, 30 Jul 2009 17:48:50 -0500
H?D?Date: Thu, 30 Jul 2009 17:48:50 -0500
H?F?From: davidstvz <testuser>
H?x?Full-Name: davidstvz
H?M?Message-Id: <200907302248.n6UMmoTP029767@other.server.com>
.
 
Old 07-30-2009, 09:50 PM   #5
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
Any time you post a question you should post your distro, arch, and version. Answers can vary wildly depending on those things.

Assuming a rpm package based system and you insist on building from source, you will want to grab the source rpm for the package that matches your specific distro, arch, and version. Contained within that src.rpm you will find a spec file and patches(when needed). The spec file will show you a lot of tricks and patches on how to get that package to run properly on your specific distro, arch, and version.
 
Old 07-31-2009, 11:42 AM   #6
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 31
This isn't a package, it's sendmail compiled from source. The distro is Debian (Lenny) x86_64

If I can't get it working, maybe I'll try a package and then replace the binary with the one I compiled (since I need particular features).
 
Old 07-31-2009, 04:21 PM   #7
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
While Debian is not rpm based it is package based(.deb). While the mechanics do change (usings debs vs rpms) the same basics principles should apply. The src deb should contain the same types of information as I described for the rpm setup.

I am aware that you are not trying to use a package. The people who have built the packages have already done the basic ground work for you. You can look at their notes (spec file in rpm speak) and learn what tweaks they have had to use to make the package functional on that particular distro, arch, and version. All this information will be directly applicable to your situation as you are building the same software (just with different options enabled). Now there MAY be issues that arise due to you using those different options. Sometime package builder do not use specific options on specific systems for good reason (too problematic), sometimes they do not use those options becuase relatively few people require them, and sometimes it just never occurs to them (until they get requests).
 
Old 07-31-2009, 05:48 PM   #8
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 31
Well, this is a slight improvement. The debian package installs a sendmail that actually puts incoming mail somewhere ( /var/spool/queue ). Both outgoing and incoming mail end up there, but don't end up in a mailbox. I suppose that shouldn't be impossible to fix.

Previously, incoming mail vanished as far as I know, and outgoing mail ended up in clientmqueue which is the place the mail is supposed to go when there is a problem delivering it.

Suggestions on getting the mail out of /var/spool/mqueue and into the Internet or into a local mailbox are welcome Meanwhile, I will continue digging (for a little while longer anyway... it is Friday).
 
Old 07-31-2009, 06:06 PM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
You could try using the "mc" file browser. It can browse rpm files. It probably can do the same with deb files as well.
The files will show up as if they are in a directory. Simply copy the file from the pane with the deb file contents to the other pane. You could extract some of the other files to study the configuration setup your distro would use. Also look at the ownership and permissions of the files in the package.

Also look in /etc/sysconfig/sendmail. Your script may be reading some values from this config file that are passed on as options of the sendmail daemon when it starts up.

Last edited by jschiwal; 07-31-2009 at 06:48 PM.
 
Old 07-31-2009, 06:35 PM   #10
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 31
ok, I have it mostly working by setting the clientmqueue directory so that anyone can write to it. obviously, that is not a permanent solution. I need to figure out why the sendmail instance isn't running as user smmsp..... OH... because this version of sendmail is compiled with the user changed to smmta

Well... I think that's it. I can either sub my binary to go bck to smmsp (if the existing binary isn't proper) or change the group owner for each of the files owned by smmsp to smmta

Then I need to name my machine properly so outgoing mail works. Anyway, I can *probably* finish this up myself ... on Monday Have a good weekend guys.

EDIT

Ok, I'm not 100%. Mail comes in, and it goes out to local boxes, but not out to addresses on the Internet. That's probably a configuration issue at least.

Last edited by davidstvz; 07-31-2009 at 06:40 PM.
 
Old 08-12-2009, 01:11 PM   #11
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 31
Well, I was busy all last week and didn't get to work on this. I'm finally returning and I have got the permissions right on my queues, but my outgoing mail is just ending up in the /var/spool/mqueue directory and just sitting there (if I use a program like alpine to try and send mail).

I'm guessing that I need to start an additional version of the sendmail daemon to handle outgoing mail.

On the new server I have this:

Code:
root     25535  0.0  0.0  27768  1728 ?        Ss   11:44   0:00 sendmail: accepting connections
smmsp    25539  0.0  0.0  25704  1368 ?        Ss   11:44   0:00 sendmail: Queue runner@00:01:00 for /var/spool/clientmqueue
But on the old server I have this:

Code:
root       801  0.0  0.0  2132 1612  ??  Ss    3:57PM   0:09.66 sendmail: accepting connections (sendmail)
smmsp      803  0.0  0.0  2388 1776  ??  I     3:57PM   0:04.06 sendmail: running queue: /var/spool/mqueue (sendmail)
root       804  0.0  0.0  2128 1584  ??  Ss    3:57PM   0:03.89 sendmail: accepting connections (sendmail)
smmsp      807  0.0  0.0  2076 1500  ??  Is    3:57PM   0:00.09 sendmail: Queue runner@00:10:00 for /var/spool/clientmqueue (sendmail)
So I'm missing two instances including one as root and one as smmsp labeled as "running queue". I can probably figure this out eventually. If so I will post the result here for future reference. Meanwhile if anyone else has an idea I'm all ears.

It looks like I need two instances of sendmail for in going and outgoing mail, and two more to process mail that gets stuck in the queue directories for whatever reason (which would process the queues once every 30 minutes or so).
 
  


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
how to know whether a software from source is compiled or not Tahir Saleh Linux - Newbie 9 03-01-2008 02:05 PM
Compiled Apache2 from source... emptystrings Linux - Software 1 11-17-2004 03:44 PM
With what options is Sendmail compiled in Slack 10? gargamel Slackware 2 07-21-2004 05:38 PM
Sendmail compiled with SASL gmartin Slackware 0 11-24-2003 09:41 PM
delete compiled source killi Slackware 8 05-15-2003 10:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:58 AM.

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