Hi all - I've got a regular problem that i've been fixing by hand for a long time but i'm hoping i can get some advice about the right way to solve it. I replace the default redhat/centos sendmail configuration files with my own set. I have always just done this by hand. One thing I do is completely whack submit.cf. when i update the system, RPM recreates this file. I've manually fixed things in the meantime, so I'm not sure of this, but I kinda think that it updates sendmail.cf too (specifically, I make a symlink sendmail.cf to my own cf file; i haven't experimented to see what happens when i install directly. I know at a very basic level how to create an RPM. But I expect that if I create an RPM containing sendmail.cf, I will get a conflict with the existing sendmail.cf from the sendmail rpm; and I don't know how to override it. I also don't know how to make it so that the submit.cf file just doesn't exist; I am pretty sure that if that file exists, it will get called by default when people call sendmail from the command line. Suggestions? (not to include, "give in to running sendmail as a daemon in submission mode, etc") thanks danno -- Dan Pritts, System Administrator Internet2 office: +1-734-352-4953 | mobile: +1-734-834-7224
On Thursday 16 November 2006 08:26, Dan Pritts wrote:> Hi all - > > I've got a regular problem that i've been fixing by hand for a long time > but i'm hoping i can get some advice about the right way to solve it. > > I replace the default redhat/centos sendmail configuration files with > my own set. I have always just done this by hand. > > One thing I do is completely whack submit.cf. > > when i update the system, RPM recreates this file. > > I've manually fixed things in the meantime, so I'm not sure of this, > but I kinda think that it updates sendmail.cf too (specifically, I make > a symlink sendmail.cf to my own cf file; i haven't experimented to see > what happens when i install directly. > > I know at a very basic level how to create an RPM. But I expect that > if I create an RPM containing sendmail.cf, I will get a conflict with > the existing sendmail.cf from the sendmail rpm; and I don't know how to > override it. I also don't know how to make it so that the submit.cf > file just doesn't exist; I am pretty sure that if that file exists, it > will get called by default when people call sendmail from the command line. > > Suggestions? (not to include, "give in to running sendmail as a daemon > in submission mode, etc")Usually the RPM won't replace these files (and it doesn't in all my installs). I think the problem is that you are using symlinks. Just replace the files. Make sure to replace or empty sendmail.mc as well, as restarting sendmail will rebuild sendmail.cf from sendmail.mc. The submit.mc and submit.cf files are used for users submitting mail through the sendmail binary. If you really need it changed, treat it similarly to the sendmail.mc and sendmail.cf files above. -- - Kevan Benson - A-1 Networks
On Thu, 16 Nov 2006, Dan Pritts wrote:> I've got a regular problem that i've been fixing by hand for > a long time but i'm hoping i can get some advice about the > right way to solve it.Fairly near the top of http://www.owlriver.com/tips/ I have a couple of articles on using sendmail.mc and doing common sendmail tasks 'correctly.' Come up with an interesting use case I have not documented, and I'll add it. As I think of it, adding 'milter-greylist' is not docoed there, nor using the sensible 'spam in hand' RBL's ... I'll add those soon.> I replace the default redhat/centos sendmail configuration > files with my own set. I have always just done this by > hand.yikes ... that means you get to keep all the broken pieces ;)> One thing I do is completely whack submit.cf.> when i update the system, RPM recreates this file.well, probably the sendmail restart when 'make' notices the timestamps> I know at a very basic level how to create an RPM. But I > expect that if I create an RPM containing sendmail.cf, I > will get a conflict with the existing sendmail.cf from the > sendmail rpm; and I don't know how to override it. I also > don't know how to make it so that the submit.cf file just > doesn't exist; I am pretty sure that if that file exists, it > will get called by default when people call sendmail from > the command line.sendmail.cf is too late. sendmail.mc changes to propigate in holds a useful future; if you are build and determined to have a manually written sendmail.cf, I would take the sendmail base package, and remove all entries which are in /etc/mail/, rename it a bit, and rpmbuild -ba the chopped up sendmail packaging; then I build a second package -- possible named 'sendmail-conf-local' with just hte hand tweaked contents of /etc/mail/ --- Jeepers, I feel dirty just describing it. ;) The RPM website has a copy of the GuruLabs rpm building course materials -- search for 'gurulabs' at: http://www.rpm.org/search/ That site is set up to provide a distribution neutral storehouse for reliable RPM informantion; Some complain it does not change content enough ... but that is not its mission from the open editorial process it follows and has followed for years. -- end ======================================+ .-- -... ---.. ... -.- -.-- | Copyright (C) 2006 R P Herrold | Owl River Company herrold at owlriver.com | "The World is Open to Linux (tm)" My words are not deathless prose, | Open Source solutions ... but they are mine. | info at owlriver.com -- Columbus, OH gpg --keyserver pgp.mit.edu --recv-key 0x9B649644 gpg --list-keys 2> /dev/null | grep 9B649644