Hi list, I would like to know if there is a way to completely replace the base sendmail with a ports one. The goal is to have corresponding files on the traditional places (not in /usr/local) and to use the system sendmail startup script but not /usr/local/etc/rc.d/sendmail.sh. -- Regards, S.Grigoriev.
S.N.Grigoriev wrote:> I would like to know if there is a way to completely > replace the base sendmail with a ports one. The goal > is to have corresponding files on the traditional places > (not in /usr/local) and to use the system sendmail > startup script but not /usr/local/etc/rc.d/sendmail.sh.That's not the usual approach with sendmail, unlike several other software packages. Because of the existence of mailer.conf(5) you can achieve equivalent functionality without overwriting the base system sendmail. With the following contents: % cat /etc/mail/mailer.conf # $FreeBSD: src/etc/mail/mailer.conf,v 1.3.36.1 2009/08/03 08:13:06 kensmith Exp $ # # Execute the "real" sendmail program, named /usr/libexec/sendmail/sendmail # sendmail /usr/local/sbin/sendmail send-mail /usr/local/sbin/sendmail mailq /usr/local/sbin/sendmail newaliases /usr/local/sbin/sendmail hoststat /usr/local/sbin/sendmail purgestat /usr/local/sbin/sendmail all sendmail related commands are mapped onto the ports version of sendmail, installed under LOCALBASE=/usr/local as usual. These commands are in fact exactly the same wrapper scripts as used with the system sendmail. With this setup it is not necessary to use the init script provided by the sendmail port: simply adding sendmail_enable="YES" to /etc/rc.conf will now cause the ports version of sendmail to be started using /etc/rc.d/sendmail. In addition, the following entries in /etc/make.conf will allow rebuild sendmail configurations and db maps using the Makefile in /etc/mail: WITH_SENDMAIL_PORT= yes SENDMAIL_CF_DIR= /usr/local/share/sendmail/cf MAKEMAP= /usr/local/sbin/makemap Finally, adding WITHOUT_SENDMAIL=yes to /etc/src.conf will suppress building sendmail as part of the base system, while still building and installing the mailwrapper commands. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 259 bytes Desc: OpenPGP digital signature Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20100113/afc6cd68/signature.pgp
> I would like to know if there is a way to completely > replace the base sendmail with a ports one. The goal > is to have corresponding files on the traditional places > (not in /usr/local) and to use the system sendmail > startup script but not /usr/local/etc/rc.d/sendmail.sh.postfix? Very nice sendmail-replacement. -- regards Claus When lenity and cruelty play for a kingdom, the gentler gamester is the soonest winner. Shakespeare twitter.com/kometen
13.01.10, 14:29, "Miroslav Lachman" <000.fbsd@quip.cz>:> S.N.Grigoriev wrote: > > [...] > > > I thank you for your response. All you wrote is quite right. > > But it is a general rule not to use in the system two sets > > of slightly different programs with duplicating names. It is > > a direct way to have problems. > > > > For example, all third party scripts should be revised to check > > absolute pathes, program search results becomes depending > > of the PATH value, and so on. > > > > It is relatively easy to do such revisions on a small home system. > > But a production server with significant amount of third party software > > will require a lot of time to do that job. > > > > To my mind it will be better to have an options in the port Makefile > > allowing to replace the sendmail files in place. > > I fully understand your doubts, but if you are talking about PATH and > the stuff, sendmail from PATH (/usr/sbin/sendmail) is not a real > sendmail, it is symlink to wrapper using settings from > /etc/mail/mailer.conf. > No application can be confused. > > Miroslav Lachman > >Miroslav, absolute paths may be used not ony to start sendmail program but, for example, to automatically build .mc files from .m4 files in /usr/share/sendmail/cf directory. For port sendmail it becomes /usr/local/share/sendmail/cf -- Regards, S.Grigoriev.
S.N.Grigoriev wrote:> > 13.01.10, 14:29, "Miroslav Lachman" <000.fbsd@quip.cz>: > >> S.N.Grigoriev wrote: >> >> [...] >> >> > I thank you for your response. All you wrote is quite right. >> > But it is a general rule not to use in the system two sets >> > of slightly different programs with duplicating names. It is >> > a direct way to have problems. >> > >> > For example, all third party scripts should be revised to check >> > absolute pathes, program search results becomes depending >> > of the PATH value, and so on. >> > >> > It is relatively easy to do such revisions on a small home system. >> > But a production server with significant amount of third party software >> > will require a lot of time to do that job. >> > >> > To my mind it will be better to have an options in the port Makefile >> > allowing to replace the sendmail files in place. >> >> I fully understand your doubts, but if you are talking about PATH and >> the stuff, sendmail from PATH (/usr/sbin/sendmail) is not a real >> sendmail, it is symlink to wrapper using settings from >> /etc/mail/mailer.conf. >> No application can be confused. >> >> Miroslav Lachman >> >> > > Miroslav, > > absolute paths may be used not ony to start sendmail program but, > for example, to automatically build .mc files from .m4 files in > /usr/share/sendmail/cf directory. For port sendmail it becomes > /usr/local/share/sendmail/cfUnless you set a couple of variables in /etc/make.conf as I described. Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 259 bytes Desc: OpenPGP digital signature Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20100113/3ef5961c/signature.pgp
13.01.10, 14:59, "Matthew Seaman" <m.seaman@infracaninophile.co.uk>:> > absolute paths may be used not ony to start sendmail program but, > > for example, to automatically build .mc files from .m4 files in > > /usr/share/sendmail/cf directory. For port sendmail it becomes > > /usr/local/share/sendmail/cf > > Unless you set a couple of variables in /etc/make.conf as I described. > > Matthew >Matthew, variables int /etc/make.conf dealt with the make program only. What about a script which prepares the body of .mc file? It must know the exact path to the cf directory. But, OK. I asked if there is a way to automatically replace base sendmail with ports/mail/sendmail. As I can see the answer is: no, there is not. It should be done manually. Thanks, Serguey.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 13.01.2010 11:52, S.N.Grigoriev wrote:> Hi list, > > I would like to know if there is a way to completely > replace the base sendmail with a ports one. The goal > is to have corresponding files on the traditional places > (not in /usr/local) and to use the system sendmail > startup script but not /usr/local/etc/rc.d/sendmail.sh. >Every once in a while something along these lines pops up. The regular answer seems to be something along the "make.conf" or "src.conf" files, which will stop something from being compiled. Maybe we need a third conf file along the lines of base_remove.conf were we list the disabled stuff in src.conf, and the installworld make A) removes the installed version, and B) then removes/sets false the corresponding line in remove.conf (so versions installed from ports aren't touched). This would (potentially) solve the issue, but I'll be the first to admit it has about the same charm as driving a nail with a wrecking ball, but I'm sure some of the brighter minds can do something about it. //Svein - -- - --------+-------------------+------------------------------- /"\ |Svein Skogen | svein@d80.iso100.no \ / |Solberg ?stli 9 | PGP Key: 0xE5E76831 X |2020 Skedsmokorset | svein@jernhuset.no / \ |Norway | PGP Key: 0xCE96CE13 | | svein@stillbilde.net ascii | | PGP Key: 0x58CD33B6 ribbon |System Admin | svein-listmail@stillbilde.net Campaign|stillbilde.net | PGP Key: 0x22D494A4 +-------------------+------------------------------- |msn messenger: | Mobile Phone: +47 907 03 575 |svein@jernhuset.no | RIPE handle: SS16503-RIPE - --------+-------------------+------------------------------- If you really are in a hurry, mail me at svein-mobile@stillbilde.net This mailbox goes directly to my cellphone and is checked even when I'm not in front of my computer. - ------------------------------------------------------------ Picture Gallery: https://gallery.stillbilde.net/v/svein/ - ------------------------------------------------------------ -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAktcjXIACgkQODUnwSLUlKRT1ACfVYqGzYTkqinPBEvn/5AJA3Tg n+wAn2vB8seXpV65l8TB1lvv7H6j7mOx =KQ+9 -----END PGP SIGNATURE-----