* [gentoo-user] sendmail configuration
@ 2020-11-26 1:47 thelma
2020-11-26 2:03 ` Ralph Seichter
` (2 more replies)
0 siblings, 3 replies; 16+ messages in thread
From: thelma @ 2020-11-26 1:47 UTC (permalink / raw
To: Gentoo mailing list
I've always used postifx but I want to try sendmail this time.
And I have a hard time finding gentoo howto.
I runonto some instruction in:
http://www.quickfixlinux.com/linux/how-to-configure-sendmail-in-linux/
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
I forgot to mention that I need to input a password to connect to
provider mail-server when sending a mail.
--
Thelma
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] sendmail configuration
2020-11-26 1:47 [gentoo-user] sendmail configuration thelma
@ 2020-11-26 2:03 ` Ralph Seichter
2020-11-26 2:41 ` thelma
2020-11-26 4:02 ` Grant Edwards
2020-11-26 4:47 ` [gentoo-user] " Grant Taylor
2 siblings, 1 reply; 16+ messages in thread
From: Ralph Seichter @ 2020-11-26 2:03 UTC (permalink / raw
To: gentoo-user
* thelma@sys-concept.com:
> I've always used postifx but I want to try sendmail this time.
> And I have a hard time finding gentoo howto.
Well, configuration-wise, you are saying "I've always enjoyed a soothing
massage, but I want to try being dragged over cobblestone pavement while
simultaneously being caned this time". Some people might choose this
option, but it is not exactly mainstream. ;-)
Based on my personal experience of having used Sendmail for many years
before Postfix became available, I recommend avoiding Sendmail whenever
humanly possible.
-Ralph
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] sendmail configuration
2020-11-26 2:03 ` Ralph Seichter
@ 2020-11-26 2:41 ` thelma
2020-11-26 2:52 ` Matt Connell (Gmail)
2020-11-26 4:09 ` [gentoo-user] " Grant Edwards
0 siblings, 2 replies; 16+ messages in thread
From: thelma @ 2020-11-26 2:41 UTC (permalink / raw
To: gentoo-user
On 11/25/2020 07:03 PM, Ralph Seichter wrote:
> * thelma@sys-concept.com:
>
>> I've always used postifx but I want to try sendmail this time.
>> And I have a hard time finding gentoo howto.
>
> Well, configuration-wise, you are saying "I've always enjoyed a soothing
> massage, but I want to try being dragged over cobblestone pavement while
> simultaneously being caned this time". Some people might choose this
> option, but it is not exactly mainstream. ;-)
>
> Based on my personal experience of having used Sendmail for many years
> before Postfix became available, I recommend avoiding Sendmail whenever
> humanly possible.
>
> -Ralph
Thank you for input. Maybe that is why it is so hard to find good
explanation/howto how to configure it. The config file looks very
simple, that is I decided to try it.
But if I can not make it to work, will go back to postfix.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] sendmail configuration
2020-11-26 2:41 ` thelma
@ 2020-11-26 2:52 ` Matt Connell (Gmail)
2020-11-26 5:27 ` thelma
2020-11-26 4:09 ` [gentoo-user] " Grant Edwards
1 sibling, 1 reply; 16+ messages in thread
From: Matt Connell (Gmail) @ 2020-11-26 2:52 UTC (permalink / raw
To: gentoo-user
On Wed, 2020-11-25 at 19:41 -0700, thelma@sys-concept.com wrote:
> But if I can not make it to work, will go back to postfix.
For new setups, I've always had good success with SSMTP. Very bare,
simple, and reliable.
mail-mta/ssmtp in portage.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] sendmail configuration
2020-11-26 2:52 ` Matt Connell (Gmail)
@ 2020-11-26 5:27 ` thelma
2020-11-26 5:42 ` thelma
0 siblings, 1 reply; 16+ messages in thread
From: thelma @ 2020-11-26 5:27 UTC (permalink / raw
To: gentoo-user
On 11/25/2020 07:52 PM, Matt Connell (Gmail) wrote:
> On Wed, 2020-11-25 at 19:41 -0700, thelma@sys-concept.com wrote:
>> But if I can not make it to work, will go back to postfix.
>
> For new setups, I've always had good success with SSMTP. Very bare,
> simple, and reliable.
>
> mail-mta/ssmtp in portage.
I'm trying to make ssmtp to work. But I got stuck.
On my system I'm using Thunderbird that works perfectly without much
difficulties.
On my system I need ssmtp to just sent mail out to my provider (incoming
mail is handled by Thunderbird) and get a local mail from emerge, etc
handled by ssmtp.
From POP account I have:
mail.my-domain.com Port: 110
user name: email-address
Outgoing mail: mail.my-domain.com Port: 1025
user name: email-address
Both incoming mail and outgoing mail require password.
I entered in: ssmtp.conf
mailhub=smtp.my-domain.com
rewriteDomain=
hostname=email-address
AuthUser=email-address
AuthPass=password
FromLineOverride=YES
Is there anything to improve?
The outgoing mail works, when tested via "mailto"
cat revaliases (did not test this one yet)
root:root@localdomain:mail.my-domain.com
thelma:info@my-domain.com:mail.my-domain.com
Are the aliases correct?
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] sendmail configuration
2020-11-26 5:27 ` thelma
@ 2020-11-26 5:42 ` thelma
0 siblings, 0 replies; 16+ messages in thread
From: thelma @ 2020-11-26 5:42 UTC (permalink / raw
To: Gentoo mailing list
[snip
> cat revaliases (did not test this one yet)
> root:root@localdomain:mail.my-domain.com
> thelma:info@my-domain.com:mail.my-domain.com
>
> Are the aliases correct?
Looking at aliases from postfix:
# Basic system aliases -- these MUST be present.
MAILER-DAEMON: postmaster
postmaster: root
# General redirections for pseudo accounts.
adm: root
bin: root
daemon: root
exim: root
lp: root
mail: root
named: root
nobody: root
postfix: root
# Well-known aliases -- these should be filled in!
root: thelma
apache: thelma
# alias for notification messages from HylaFAX servers
# FaxMaster: email-address
# operator:
# Standard RFC2142 aliases
abuse: postmaster
ftp: root
hostmaster: root
news: usenet
noc: root
security: root
usenet: root
uucp: root
webmaster: root
www: webmaster
My revaliases file is a bit short.
Where is local mail being sent from "emerge" ?
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-user] Re: sendmail configuration
2020-11-26 2:41 ` thelma
2020-11-26 2:52 ` Matt Connell (Gmail)
@ 2020-11-26 4:09 ` Grant Edwards
2020-11-26 5:01 ` Grant Taylor
2020-11-26 20:27 ` antlists
1 sibling, 2 replies; 16+ messages in thread
From: Grant Edwards @ 2020-11-26 4:09 UTC (permalink / raw
To: gentoo-user
On 2020-11-26, thelma@sys-concept.com <thelma@sys-concept.com> wrote:
> Thank you for input. Maybe that is why it is so hard to find good
> explanation/howto how to configure it. The config file looks very
> simple, that is I decided to try it.
Ah, that's another devine mystery. I believe that the small size of a
sendmail config file, when compared to the number of malfunctions it
can create violates several basic tenants of information theory. I
think the explanation involves extra dimensions that normal software
can't access.
--
Grant
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Re: sendmail configuration
2020-11-26 4:09 ` [gentoo-user] " Grant Edwards
@ 2020-11-26 5:01 ` Grant Taylor
2020-11-26 20:27 ` antlists
1 sibling, 0 replies; 16+ messages in thread
From: Grant Taylor @ 2020-11-26 5:01 UTC (permalink / raw
To: gentoo-user
On 11/25/20 9:09 PM, Grant Edwards wrote:
> Ah, that's another devine mystery. I believe that the small size of
> a sendmail config file, when compared to the number of malfunctions
> it can create violates several basic tenants of information theory. I
> think the explanation involves extra dimensions that normal software
> can't access.
That's because the sendmail.mc file is not a configuration file in the
normal sense of the word. It is a collection of macros that are then
expanded into the configuration file.
There are many subtle inter dependencies that are not obvious.
Many are documented in the cf/README file in the sendmail source bundle.
Not all distros include said file.
--
Grant. . . .
unix || die
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Re: sendmail configuration
2020-11-26 4:09 ` [gentoo-user] " Grant Edwards
2020-11-26 5:01 ` Grant Taylor
@ 2020-11-26 20:27 ` antlists
2020-11-27 1:56 ` Grant Edwards
1 sibling, 1 reply; 16+ messages in thread
From: antlists @ 2020-11-26 20:27 UTC (permalink / raw
To: gentoo-user
On 26/11/2020 04:09, Grant Edwards wrote:
> On 2020-11-26, thelma@sys-concept.com <thelma@sys-concept.com> wrote:
>
>> Thank you for input. Maybe that is why it is so hard to find good
>> explanation/howto how to configure it. The config file looks very
>> simple, that is I decided to try it.
>
> Ah, that's another devine mystery. I believe that the small size of a
> sendmail config file, when compared to the number of malfunctions it
> can create violates several basic tenants of information theory. I
> think the explanation involves extra dimensions that normal software
> can't access.
>
The problem is that sendmail is the kitchen sink of mtas.
It was written in a much gentler time, when people hadn't even thought
of spam, and the standard wan link was a mag-tape in a van or a 300-baud
modem.
The original author (Eric Allman) got it working reasonably well and
then forgot about it.
Other people then customised it to buggery.
Then the Internet hit.
Then Eric tried to re-impose some semblance of design and remove the
worst topsy effects.
Then assorted people wrote competing emailers like qmail, postfix, etc.
But they all had to be sendmail-compatible...
So a fully-functional sendmail installation is the most powerful,
flexible mta there is out there. The snag is, most people only use 10%
of that power, but nobody can agree on which 10% is the most important.
Cheers,
Wol
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-user] Re: sendmail configuration
2020-11-26 20:27 ` antlists
@ 2020-11-27 1:56 ` Grant Edwards
2020-11-27 16:43 ` Grant Taylor
0 siblings, 1 reply; 16+ messages in thread
From: Grant Edwards @ 2020-11-27 1:56 UTC (permalink / raw
To: gentoo-user
On 2020-11-26, antlists <antlists@youngman.org.uk> wrote:
>[...]
> So a fully-functional sendmail installation is the most powerful,
> flexible mta there is out there. The snag is, most people only use 10%
> of that power, but nobody can agree on which 10% is the most important.
After trying to think of reasons to use sendmail, I beganto wonder if
it still supports bang-routing and UUCP as a transport mechanism. A
bit of googling seems to indicate that it does.
So there's one thing (that I do understand) that can be done with
sendmail that can't (AFAICT) be done with the usual replacements.
--
Grant
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Re: sendmail configuration
2020-11-27 1:56 ` Grant Edwards
@ 2020-11-27 16:43 ` Grant Taylor
0 siblings, 0 replies; 16+ messages in thread
From: Grant Taylor @ 2020-11-27 16:43 UTC (permalink / raw
To: gentoo-user
On 11/26/20 6:56 PM, Grant Edwards wrote:
> After trying to think of reasons to use sendmail, I beganto wonder if
> it still supports bang-routing and UUCP as a transport mechanism. A
> bit of googling seems to indicate that it does.
Yes. I have used this a few times in the last 18 months. Mostly for
fun through my small UUCP network.
> So there's one thing (that I do understand) that can be done with
> sendmail that can't (AFAICT) be done with the usual replacements.
I thought at least one of the other contemporary MTAs also supported UUCP.
I would assume anything that does support UUCP would also support
bang-routing as I believe that's more of a UUCP function than an MTA
function. So I'm surprised at the idea that other things that do
support UUCP don't support bang-routing.
--
Grant. . . .
unix || die
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-user] Re: sendmail configuration
2020-11-26 1:47 [gentoo-user] sendmail configuration thelma
2020-11-26 2:03 ` Ralph Seichter
@ 2020-11-26 4:02 ` Grant Edwards
2020-11-26 4:25 ` Bhaskar Chowdhury
2020-11-26 5:01 ` Grant Taylor
2020-11-26 4:47 ` [gentoo-user] " Grant Taylor
2 siblings, 2 replies; 16+ messages in thread
From: Grant Edwards @ 2020-11-26 4:02 UTC (permalink / raw
To: gentoo-user
On 2020-11-26, thelma@sys-concept.com <thelma@sys-concept.com> wrote:
> I've always used postifx but I want to try sendmail this time.
Appropos of nothing, might we ask why? I've heard there are things
that you can do with sendmail that you can't do with postfix or exim
or qmail, but the descriptions of what sorts of "things" would require
sendmail were rarely intelligible to a mere mortal.
> And I have a hard time finding gentoo howto.
Back when we used to sendmail on SunOS in the early 90's the generally
accepted approach was to copy somebody else's config file that almost
worked, change things more or less at random and then watch the disks
fill up and the network crash. The miraculous part was that the disk
would fill up but all the mail would disappear.
I think sendmail configuration was where "cargo cult" programming
originated.
From "The Unix-Hater's Handbook"
Sendmail: The Vietnam of Berkeley Unix
Sendmail is the standard Unix mailer, and it is likely to remain
the standard Unix mailer for many, many years. Although other
mailers (such as MMDF and smail) have been written, none of them
simultaneously enjoy sendmail’s popularity or widespread animosity.
O'Reilly's _Sendmail_ 4th Edition (the bat book), has 1312 pages and
weighs four pounds.
Head up the river if you must, but don't get out of the boat.
--
Grant
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Re: sendmail configuration
2020-11-26 4:02 ` Grant Edwards
@ 2020-11-26 4:25 ` Bhaskar Chowdhury
2020-11-26 5:01 ` Grant Taylor
1 sibling, 0 replies; 16+ messages in thread
From: Bhaskar Chowdhury @ 2020-11-26 4:25 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1699 bytes --]
On 04:02 Thu 26 Nov 2020, Grant Edwards wrote:
>On 2020-11-26, thelma@sys-concept.com <thelma@sys-concept.com> wrote:
>
>> I've always used postifx but I want to try sendmail this time.
>
>Appropos of nothing, might we ask why? I've heard there are things
>that you can do with sendmail that you can't do with postfix or exim
>or qmail, but the descriptions of what sorts of "things" would require
>sendmail were rarely intelligible to a mere mortal.
>
>> And I have a hard time finding gentoo howto.
>
>Back when we used to sendmail on SunOS in the early 90's the generally
>accepted approach was to copy somebody else's config file that almost
>worked, change things more or less at random and then watch the disks
>fill up and the network crash. The miraculous part was that the disk
>would fill up but all the mail would disappear.
>
>I think sendmail configuration was where "cargo cult" programming
>originated.
>
>From "The Unix-Hater's Handbook"
>
> Sendmail: The Vietnam of Berkeley Unix
>
> Sendmail is the standard Unix mailer, and it is likely to remain
> the standard Unix mailer for many, many years. Although other
> mailers (such as MMDF and smail) have been written, none of them
> simultaneously enjoy sendmail’s popularity or widespread animosity.
>
>O'Reilly's _Sendmail_ 4th Edition (the bat book), has 1312 pages and
>weighs four pounds.
>
>Head up the river if you must, but don't get out of the boat.
>
>--
>Grant
>
On the lighter side, it famously known that , if you poke at sendmail conf
more than once, then you are effected by the paranoia and which is not good
for you and others around you.
:)
~Bhaskar
>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] Re: sendmail configuration
2020-11-26 4:02 ` Grant Edwards
2020-11-26 4:25 ` Bhaskar Chowdhury
@ 2020-11-26 5:01 ` Grant Taylor
1 sibling, 0 replies; 16+ messages in thread
From: Grant Taylor @ 2020-11-26 5:01 UTC (permalink / raw
To: gentoo-user
On 11/25/20 9:02 PM, Grant Edwards wrote:
> O'Reilly's_Sendmail_ 4th Edition (the bat book), has 1312 pages and
> weighs four pounds.
There is actually a much smaller book than the quintessential Bat book
that is multiple orders of magnitude. IM(ns)HO the Sendmail
Installation and Operation Guide is well worth reading by anyone that
wants to be serious about administering sendmail. I have (re)read
(multiple versions of) it multiple times in my multi-decade fling with
Sendmail. Take part of an afternoon every few years and skim it and /
or read new / updated parts of it. It's usually with the sendmail
source code. But you can easily search the web for multiple copies of it.
I've read the SIOG multiple times cover-to-cover. I've never read more
than 20-30 pages of the Bat book at any given time.
Aside: I have a low opinion of many O'Reilly books when it comes to
learning something new. They are frequently the definitive reference,
second only to source code. But reference material is not the best way
to learn. Think man page vs tutorials.
--
Grant. . . .
unix || die
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] sendmail configuration
2020-11-26 1:47 [gentoo-user] sendmail configuration thelma
2020-11-26 2:03 ` Ralph Seichter
2020-11-26 4:02 ` Grant Edwards
@ 2020-11-26 4:47 ` Grant Taylor
2020-11-26 4:52 ` Grant Taylor
2 siblings, 1 reply; 16+ messages in thread
From: Grant Taylor @ 2020-11-26 4:47 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-user] sendmail configuration
2020-11-26 4:47 ` [gentoo-user] " Grant Taylor
@ 2020-11-26 4:52 ` Grant Taylor
0 siblings, 0 replies; 16+ messages in thread
From: Grant Taylor @ 2020-11-26 4:52 UTC (permalink / raw
To: gentoo-user
On 11/25/20 9:47 PM, Grant Taylor wrote:
> 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.
TL;DR:
sendmail.cf:
--8<--
define(`SMART_HOST', `mail.shaw.ca')
FEATURE(`authinfo')
-->8--
authinfo:
--8<--
AuthInfo:mail.shaw.ca "U:USERNAME" "P:PASSWORD" "M:PLAIN"
-->8--
PSA: Remember that Sendmail uses one or more tab(s), not a space, to
separate the Left Hand Side (LHS) and Right Hand Side (RHS) of maps.
authinfo is a map.
This looks correct. At least it seems to match my vague memory.
Link - Smart Host setup with SMTP Authentication on Sendmail
- http://dnsexit.com/support/mailrelay/sendmail.html
--
Grant. . . .
unix || die
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2020-11-27 16:43 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-26 1:47 [gentoo-user] sendmail configuration thelma
2020-11-26 2:03 ` Ralph Seichter
2020-11-26 2:41 ` thelma
2020-11-26 2:52 ` Matt Connell (Gmail)
2020-11-26 5:27 ` thelma
2020-11-26 5:42 ` thelma
2020-11-26 4:09 ` [gentoo-user] " Grant Edwards
2020-11-26 5:01 ` Grant Taylor
2020-11-26 20:27 ` antlists
2020-11-27 1:56 ` Grant Edwards
2020-11-27 16:43 ` Grant Taylor
2020-11-26 4:02 ` Grant Edwards
2020-11-26 4:25 ` Bhaskar Chowdhury
2020-11-26 5:01 ` Grant Taylor
2020-11-26 4:47 ` [gentoo-user] " Grant Taylor
2020-11-26 4:52 ` Grant Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox