On 11/25/20 6:47 PM, the...@sys-concept.com wrote:
I've always used postifx but I want to try sendmail this time.
I've been using Sendmail for 20 years on multiple Linux and Unixes.
And I have a hard time finding gentoo howto.
Thankfully, much of Sendmail is self contained and isn't much different
between distros / OSs. Including Gentoo.
The biggest difference is the location of files.
Some distros / OSs don't include the configuration (m4) files with the
binary files, thus you must install them as an additional package or
admin sendmail.cf by hand.
ProTip: DO NOT EDIT sendmail.cf by hand. Always Always Always edit the
sendmail.mc file and re-build the sendmail.cf file*.
*This is the line told to beginning Sendmail administrators. At some
point you will edit the sendmail.cf file by hand while testing and then
promote changes to the sendmail.mc file. -- Editing sendmail.cf is not
dissimilar to hex editing a binary compared to editing the source
(sendmail.mc) file and recompiling.
I runonto some instruction in:
http://www.quickfixlinux.com/linux/how-to-configure-sendmail-in-linux/
The comp.mail.sendmail newsgroup is your friend.
But don't have much lack.
Original config file after emerge looks like:
cat /etc/mail/sendmail.mc
divert(-1)
divert(0)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`$Id$')dnl
OSTYPE(linux)dnl
DOMAIN(generic)dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`local_lmtp',`/usr/sbin/mail.local')dnl
FEATURE(`local_procmail')dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
I've added a line no.7
define(`SMART_HOST’,`mail.shaw.ca’)dnl
but I get an error running:
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
m4:/etc/mail/sendmail.mc:7: ERROR: end of file in string
Pay very special attention to the opening and closing quotes.
Sendmail makes extensive use of the macro four (m4) language to
""compile the sendmail.mc file into the sendmail.cf file. m4 is quite
particular in what quotes it uses.
define(`SMART_HOST’,`mail.shaw.ca’)dnl
^ ^
These quotes look wrong to me. I don't know if this is a symptom of
copy & pasting somewhere by someone or what.
I would expect the line to look like this:
define(`SMART_HOST',`mail.shaw.ca')dnl
m4 uses the left single quote (on the ~ key) to open and the straight
single quote (on the " key) to close.
I forgot to mention that I need to input a password to connect to
provider mail-server when sending a mail.
That is supported. You will need to set up a map and tell Sendmail how
to use it. It's not difficult. But it's been so long that I don't
remember exactly how to do it. It's another define(...) or feature(...)
line and adding entries to the file they reference.
--
Grant. . . .
unix || die