From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id EE59A1382C5 for ; Thu, 26 Nov 2020 04:47:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C44E9E0900; Thu, 26 Nov 2020 04:47:04 +0000 (UTC) Received: from tncsrv06.tnetconsulting.net (tncsrv06.tnetconsulting.net [IPv6:2600:3c00:e000:1e9::8849]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 692D3E08CD for ; Thu, 26 Nov 2020 04:47:04 +0000 (UTC) Received: from Contact-TNet-Consulting-Abuse-for-assistance by tncsrv06.tnetconsulting.net (8.15.2/8.15.2/Debian-3) with ESMTPSA id 0AQ4kvlb009024 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Wed, 25 Nov 2020 22:47:03 -0600 Subject: Re: [gentoo-user] sendmail configuration To: gentoo-user@lists.gentoo.org References: <885b8c82-2b39-c5fc-4b0d-ec12ae5f61ce@sys-concept.com> From: Grant Taylor Organization: TNet Consulting Message-ID: Date: Wed, 25 Nov 2020 21:47:01 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 In-Reply-To: <885b8c82-2b39-c5fc-4b0d-ec12ae5f61ce@sys-concept.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Archives-Salt: e32de741-6cd3-4897-8010-8f86ea63504f X-Archives-Hash: 4ad448ac484f388a0d2edb658dadac08 On 11/25/20 6:47 PM, thelma@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