Discussion:
sendmail without DNS
(too old to reply)
Adam Weremczuk
2024-07-21 07:00:01 UTC
Permalink
This is in a way a continuation of my recently "purely local DNS" thread.

To recap: my objective is to send emails to a single domain with both
DNS and any other email traffic being disabled.

A simple working solution that I've found for Postfix is:

/etc/hosts
1.2.3.4 example.com

/etc/postfix/main.cf
smtp_dns_support_level = disabled
smtp_host_lookup = native

Now I'm trying to achieve the same thing for Sendmail to no avail.

So far I've tried:

- the above /etc/hosts entry

- DEAMON_OPTIONS(`Port-smtp,Addr=127.0.0.1, Name=MTA')dnl in sendmail.mc
followed by m4 sendmail.mc > sendmail.cf

- /etc/mail/mailertable
example.com esmtp:[1.2.3.4]

1. Has anybody tried and got it working?

2. What's the best way to engage with Sendmail forums / mailing list?

Both comp.mail.sendmail and newscomp.mail.sendmail usenet groups appear
to be dead.

---
Adam
Jeff Pang
2024-07-21 07:10:01 UTC
Permalink
Sendmail is too old to be supported.
You may use postfix and exim instead. They are main stream MTA software
today.
Post by Adam Weremczuk
This is in a way a continuation of my recently "purely local DNS" thread.
To recap: my objective is to send emails to a single domain with both
DNS and any other email traffic being disabled.
/etc/hosts
1.2.3.4 example.com
/etc/postfix/main.cf
smtp_dns_support_level = disabled
smtp_host_lookup = native
Now I'm trying to achieve the same thing for Sendmail to no avail.
- the above /etc/hosts entry
- DEAMON_OPTIONS(`Port-smtp,Addr=127.0.0.1, Name=MTA')dnl in
sendmail.mc followed by m4 sendmail.mc > sendmail.cf
- /etc/mail/mailertable
example.com esmtp:[1.2.3.4]
1. Has anybody tried and got it working?
2. What's the best way to engage with Sendmail forums / mailing list?
Both comp.mail.sendmail and newscomp.mail.sendmail usenet groups appear
to be dead.
---
Adam
--
Jeff Pang
***@aol.com
Adam Weremczuk
2024-07-21 07:30:02 UTC
Permalink
Let me rephrase my question, which should be easier to answer.

What exactly shall I substitute:

mailer = "/usr/sbin/sendmail -t"

with in /usr/share/logwatch/default.conf/logwatch.conf

to make logwatch use postfix (already working without DNS) instead of
sendmail?
Post by Jeff Pang
Sendmail is too old to be supported.
You may use postfix and exim instead. They are main stream MTA software
today.
Anssi Saari
2024-07-21 10:10:01 UTC
Permalink
Post by Adam Weremczuk
Let me rephrase my question, which should be easier to answer.
mailer = "/usr/sbin/sendmail -t"
with in /usr/share/logwatch/default.conf/logwatch.conf
to make logwatch use postfix (already working without DNS) instead of
sendmail?
With a quick look, the postfix package includes /usr/sbin/sendmail. So
if your /usr/sbin/sendmail isn't the one provided by postfix then likely
you have more than one and that situation is probably managed by
update-alternatives?

So, run update-alternatives --list sendmail and maybe also
ls -l /usr/sbin/sendmail to see what the what is.
Greg Wooledge
2024-07-21 13:30:01 UTC
Permalink
Post by Adam Weremczuk
Let me rephrase my question, which should be easier to answer.
mailer = "/usr/sbin/sendmail -t"
with in /usr/share/logwatch/default.conf/logwatch.conf
to make logwatch use postfix (already working without DNS) instead of
sendmail?
Blimey. You are COMPLETELY confused, aren't you.

If postfix (the package named "postfix") is installed, and if sendmail
(the package named "sendmail") is NOT installed, then you are using
Postfix to send mail.

Part of the postfix package is a /usr/sbin/sendmail program which
implements the command line interface for local programs to send mail.

EVERY MTA has to implement the /usr/sbin/sendmail program.

Including Postfix.

If you're running Postfix (*not* Sendmail) as your MTA, and if you've
got it configured how you want it, then you are DONE. You don't need
to ask us how to configure Sendmail to do the same thing, because you're
not USING Sendmail.
Adam Weremczuk
2024-07-21 19:00:02 UTC
Permalink
Thanks for pointing that out.

I've noticed that installing sendmail package was removing postfix and
vice versa.

That made me think these two were mutually exclusive.

After reinstalling postfix, logwatch suddenly started sending emails so
everything is now working as expected.

---
Adam
Post by Greg Wooledge
Blimey. You are COMPLETELY confused, aren't you.
If postfix (the package named "postfix") is installed, and if sendmail
(the package named "sendmail") is NOT installed, then you are using
Postfix to send mail.
Part of the postfix package is a /usr/sbin/sendmail program which
implements the command line interface for local programs to send mail.
EVERY MTA has to implement the /usr/sbin/sendmail program.
Including Postfix.
If you're running Postfix (*not* Sendmail) as your MTA, and if you've
got it configured how you want it, then you are DONE. You don't need
to ask us how to configure Sendmail to do the same thing, because you're
not USING Sendmail.
Kamil Jońca
2024-07-21 08:10:02 UTC
Permalink
Post by Adam Weremczuk
Let me rephrase my question, which should be easier to answer.
mailer = "/usr/sbin/sendmail -t"
Eee. Nothing?
--8<---------------cut here---------------start------------->8---
dpkg -L postfix|grep send
/usr/sbin/sendmail
/usr/share/man/man1/sendmail.1.gz
/usr/lib/sendmail
--8<---------------cut here---------------end--------------->8---

Man sendmail says that:
--8<---------------cut here---------------start------------->8---
-t Extract recipients from message headers. These are added to any recipients specified on the command line.
--8<---------------cut here---------------end--------------->8---
(I do not that 'original' sendmail has the same meaning, but I supposed
so.)
KJ
--
http://wolnelektury.pl/wesprzyj/teraz/
Make me look like LINDA RONSTADT again!!
George at Clug
2024-07-21 08:40:01 UTC
Permalink
Adam,

I dislike people to reply to my questions but do not answer the question, instead suggest I do something totally different.

Please forgive me, as that is what I am about to do.

I have had, what seems to me to be similar issue, my solution was to set up an authoritative BIND9 server on the email/web server in question, and have the server first use its own BIND9 server's DNS service first.

Admittedly I did not care if my authoritative BIND9 server went out the the Internet for any queries for which it was not authoritative.

It did allow me to run the server isolated either from the Internet and/or connected to the Internet.

George.
Post by Adam Weremczuk
This is in a way a continuation of my recently "purely local DNS" thread.
To recap: my objective is to send emails to a single domain with both
DNS and any other email traffic being disabled.
/etc/hosts
1.2.3.4 example.com
/etc/postfix/main.cf
smtp_dns_support_level = disabled
smtp_host_lookup = native
Now I'm trying to achieve the same thing for Sendmail to no avail.
- the above /etc/hosts entry
- DEAMON_OPTIONS(`Port-smtp,Addr=127.0.0.1, Name=MTA')dnl in sendmail.mc
followed by m4 sendmail.mc > sendmail.cf
- /etc/mail/mailertable
example.com esmtp:[1.2.3.4]
1. Has anybody tried and got it working?
2. What's the best way to engage with Sendmail forums / mailing list?
Both comp.mail.sendmail and newscomp.mail.sendmail usenet groups appear
to be dead.
---
Adam
Joe
2024-07-21 16:30:01 UTC
Permalink
On Sun, 21 Jul 2024 18:36:30 +1000
Post by George at Clug
Adam,
I dislike people to reply to my questions but do not answer the
question, instead suggest I do something totally different.
Yes, but sometimes:

a) that's the right answer anyway

b) it may not answer the OP's question. but may answer someone else's
question much later

c) it may inform the OP that there may be a better way of doing it that
the OP was not aware of

d) it may be that the OP is asking the wrong question, but will get
information from your answer as to what the right question should be
Post by George at Clug
Please forgive me, as that is what I am about to do.
I have had, what seems to me to be similar issue, my solution was to
set up an authoritative BIND9 server on the email/web server in
question, and have the server first use its own BIND9 server's DNS
service first.
Admittedly I did not care if my authoritative BIND9 server went out
the the Internet for any queries for which it was not authoritative.
It did allow me to run the server isolated either from the Internet
and/or connected to the Internet.
Indeed. If you do run a DNS server for general network use, you will
always want to put in local information. If there is also an Internet
DNS server authoritative for the same domain, you need to put in copies
of relevant information that server contains, which will otherwise not
be found.

BIND9 is a bit of a nuisance, especially when you miss a bit of
punctuation in a zone file and it won't start, but as far as I can
tell, it's the only DNS solution that will access root hints. I would
prefer something a bit lighter. I would rather not trust Net DNS servers
since I turned up this company
https://uk.linkedin.com/company/barefruit
(one of many such) in logs. Advertising is easy to ignore, but the idea
of tampering with DNS does not impress me.
--
Joe
Tim Woodall
2024-07-22 14:00:01 UTC
Permalink
Post by Adam Weremczuk
This is in a way a continuation of my recently "purely local DNS" thread.
To recap: my objective is to send emails to a single domain with both DNS and
any other email traffic being disabled.
/etc/hosts
1.2.3.4 example.com
/etc/postfix/main.cf
smtp_dns_support_level = disabled
smtp_host_lookup = native
Now I'm trying to achieve the same thing for Sendmail to no avail.
- the above /etc/hosts entry
- DEAMON_OPTIONS(`Port-smtp,Addr=127.0.0.1, Name=MTA')dnl in sendmail.mc
followed by m4 sendmail.mc > sendmail.cf
You can just type make in /etc/mail and dbs will be rebuilt and it will
tell you if you need to reload.
Post by Adam Weremczuk
- /etc/mail/mailertable
example.com esmtp:[1.2.3.4]
I use this. Are you missing FEATURE(mailertable)

sendmail.mc:FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
Loading...