Gentoo Archives: gentoo-user

From: Grant Taylor <gtaylor@×××××××××××××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] sendmail configuration
Date: Thu, 26 Nov 2020 04:47:09
Message-Id: ad866917-c36c-323e-62d4-92540e2382bb@spamtrap.tnetconsulting.net
In Reply to: [gentoo-user] sendmail configuration by thelma@sys-concept.com
1 On 11/25/20 6:47 PM, thelma@×××××××××××.com wrote:
2 > I've always used postifx but I want to try sendmail this time.
3
4 I've been using Sendmail for 20 years on multiple Linux and Unixes.
5
6 > And I have a hard time finding gentoo howto.
7
8 Thankfully, much of Sendmail is self contained and isn't much different
9 between distros / OSs. Including Gentoo.
10
11 The biggest difference is the location of files.
12
13 Some distros / OSs don't include the configuration (m4) files with the
14 binary files, thus you must install them as an additional package or
15 admin sendmail.cf by hand.
16
17 ProTip: DO NOT EDIT sendmail.cf by hand. Always Always Always edit the
18 sendmail.mc file and re-build the sendmail.cf file*.
19
20 *This is the line told to beginning Sendmail administrators. At some
21 point you will edit the sendmail.cf file by hand while testing and then
22 promote changes to the sendmail.mc file. -- Editing sendmail.cf is not
23 dissimilar to hex editing a binary compared to editing the source
24 (sendmail.mc) file and recompiling.
25
26 > I runonto some instruction in:
27 > http://www.quickfixlinux.com/linux/how-to-configure-sendmail-in-linux/
28
29 The comp.mail.sendmail newsgroup is your friend.
30
31 > But don't have much lack.
32 > Original config file after emerge looks like:
33 >
34 > cat /etc/mail/sendmail.mc
35 > divert(-1)
36 > divert(0)dnl
37 > include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
38 > VERSIONID(`$Id$')dnl
39 > OSTYPE(linux)dnl
40 > DOMAIN(generic)dnl
41 > FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
42 > FEATURE(`local_lmtp',`/usr/sbin/mail.local')dnl
43 > FEATURE(`local_procmail')dnl
44 > MAILER(local)dnl
45 > MAILER(smtp)dnl
46 > MAILER(procmail)dnl
47 >
48 > I've added a line no.7
49 > define(`SMART_HOST’,`mail.shaw.ca’)dnl
50 >
51 > but I get an error running:
52 > m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
53 > m4:/etc/mail/sendmail.mc:7: ERROR: end of file in string
54
55 Pay very special attention to the opening and closing quotes.
56
57 Sendmail makes extensive use of the macro four (m4) language to
58 ""compile the sendmail.mc file into the sendmail.cf file. m4 is quite
59 particular in what quotes it uses.
60
61 define(`SMART_HOST’,`mail.shaw.ca’)dnl
62 ^ ^
63
64 These quotes look wrong to me. I don't know if this is a symptom of
65 copy & pasting somewhere by someone or what.
66
67 I would expect the line to look like this:
68
69 define(`SMART_HOST',`mail.shaw.ca')dnl
70
71 m4 uses the left single quote (on the ~ key) to open and the straight
72 single quote (on the " key) to close.
73
74 > I forgot to mention that I need to input a password to connect to
75 > provider mail-server when sending a mail.
76 That is supported. You will need to set up a map and tell Sendmail how
77 to use it. It's not difficult. But it's been so long that I don't
78 remember exactly how to do it. It's another define(...) or feature(...)
79 line and adding entries to the file they reference.
80
81
82
83 --
84 Grant. . . .
85 unix || die

Replies

Subject Author
Re: [gentoo-user] sendmail configuration Grant Taylor <gtaylor@×××××××××××××××××××××.net>