Replies: 13 comments 104 replies
-
A lot of this I have on my postfix config btw. I can try and look at it later I hope. |
Beta Was this translation helpful? Give feedback.
-
FYI: with my tired eyes things seem reasonable. But as you know my vision is rubbish so you'll have to take that with a pinch of salt. I do however have a question before I can proceed anyway. QUESTIONBy sending email to local users: do you mean delivering it to the local system mailbox ? Or can it be for example [email protected] (where example.com is the MTA hostname - and restricted from being accessed obviously)? Let me know and hopefully in the morn I can do more. Hoping to get some code in soon (almost done but one minor annoyance to fix). When that is done I can integrate it into mkiocccentry and if all good I can commit to both. I do have other things I need to do though so the code might not come today. |
Beta Was this translation helpful? Give feedback.
-
I'm testing within my NetBSD VM which comes stock with 3.8.4 and an alternative package 3.9.1. @lcn2 Are you using a fresh install of In the config I'm working, I'm marking root elements like domain name, host, install paths with comments as what needs to change between TESTING and PRODUCTION when ready.
From that I'm trying to get the TLS to the relay host working. After I'll fine tune the other elements. TLS and DNS setup is always a pain; thankfully I had most of it done for home use with Sendmail. |
Beta Was this translation helpful? Give feedback.
-
It seems that 3.8.4 is close enough to our 3.8.5, based on these Ubuntu postfix 3.2.5 notes and these Debian postfix 3.2.5 notes. So we suggest version 3.8.4 as an alternative to 3.8.5 (and not 3.9.1).
We are using a fresh install and up to date release of AlmaLinux 9.5 if that matters.
Yes. UPDATE 0Corrected some typos in our comment. |
Beta Was this translation helpful? Give feedback.
-
QUESTIONWhat exactly do you need done to resolve this issue entirely? About to start work on the other repo (after a useful update to jparse which will allow for more defence in depth in the mkiocccentry tool and the chkentry tool too). Thanks! |
Beta Was this translation helpful? Give feedback.
-
We believe we have addressed all of the current questions that still need answering at this time. If we've missed something or something else needs to be clarified, please ask again. |
Beta Was this translation helpful? Give feedback.
-
Our proposed DMARC record for
Comments and suggestions welcome. |
Beta Was this translation helpful? Give feedback.
-
And as for DMARC. Apparently for gmail if you're sending a large volume of emails you now have to use DMARC. I think I saw another domain but not sure. Perhaps hotmail? Fortunately neither really affect me. @SirWumpus: does DMARC require you put in an email address that can (obviously) be spammed? UPDATE 0Okay I see it does not require it. Perhaps you should change yours too, @lcn2 ? |
Beta Was this translation helpful? Give feedback.
-
@lcn2 I just sent you (to the judges email) my postfix config (nothing revealing other than my IPs but since you already have ssh access on the server and since I am changing providers soon it doesn't matter :-) ). I gave some useful things you might or might not know. I also want to correct something I said earlier (here). I had said you don't need to run postmap: it will do it by itself in time. That is of course not correct. What is correct is you don't have to do a postfix reload in order for it to get seen. I do always do it right after to speed it up but it's not required. I made some important bug fixes in some of the mkiocccentry tools today and I hope to look at the chkentry enhancements tomorrow but I will be leaving shortly. Good day (to you too @SirWumpus)! |
Beta Was this translation helpful? Give feedback.
-
See the updates to comment GH-discussioncomment-12257206. |
Beta Was this translation helpful? Give feedback.
-
Side Saddle: This not at all important, but I thought you might get a chuckle from the SMTP Welcome message I have customised using BarricadeMX. Having longish (3+ lines) can throw off some spambots that script their connection session, such that everything is out of sequence. Now I collected this info from my local VM over a point-to-point SSH tunnel with my MX. The stuff you can do with SSH is so cool. elf$ telnet 10.1.0.1 25
Trying 10.1.0.1...
Connected to 10.1.0.1.
Escape character is '^]'.
220-mx.snert.org ACHTUNG! SMTP #633 11K6HU080230811800
220-ALLES TURISTEN UND NONTEKNISCHEN LOOKENPEEPERS! DAS KOMPUTERMASCHINE
220-IST NICHT FUR DER GEFINGERPOKEN UND MITTENGRABEN! ODERWISE IST
220-EASY TO SCHNAPPEN DER SPRINGENWERK, BLOWENFUSEN UND POPPENCORKEN
220-MIT SPITZENSPARKEN. IST NICHT FUR GEWERKEN BEI DUMMKOPFEN. DER
220-RUBBERNECKEN SIGHTSEEREN KEEPEN DAS COTTONPICKEN HANDER IN DAS
220 POCKETS MUSS. ZO RELAXEN UND WATSCHEN DER BLINKENLICHTEN.
help
214-2.0.0 ESMTP RFC 1985, 3207, 4954, 5321 supported commands:
214-2.0.0 AUTH DATA EHLO ETRN HELO HELP
214-2.0.0 NOOP MAIL RCPT RSET QUIT STARTTLS
214-2.0.0
214-2.0.0 ESMTP RFC 2821, 5321 not implemented:
214-2.0.0 EXPN TURN VRFY
214-2.0.0
214-2.0.0 Administration commands:
214-2.0.0 CONN CACHE INFO KILL LKEY OPTN
214-2.0.0 STAT VERB XCLIENT
214-2.0.0
214 2.0.0 End
quit
221 2.0.0 mx.snert.org closing connection #247 11K6HU080230811800
Connection closed by foreign host.
elf$ |
Beta Was this translation helpful? Give feedback.
-
We believe we have addressed all of the current questions that still need answering at this time. If we've missed something or something else needs to be clarified, please ask again. |
Beta Was this translation helpful? Give feedback.
-
@lcn2 You should have received an email with a tarball and status summary: Included is my current work to date.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
TL;DR
We need to setup postfix for a limited set of sender and receive addresses plus local outbound.
While @SirWumpus has gratefully agreed to work on this issue, others have asked us to describe the matter: if nothing else it may allow others such as yourself to join a discussion around any proposed solutions.
We are using a fairly recent postfix version 3.5.25, in case that matters.
In the description below, we will write with generic usernames, example domains and IP CIDR address blocks. This will be for illustration purposes only as these are not the actual values that will be used.
Requirements of the postfix configuration
We need a postfix configuration (
/etc/post/fix.main.cf
and related files) that has several properties. See below:Ability to send out email to anywhere
We use the following lines in
/etc/post/fix.main.cf
today:BTW: We need to send email to anywhere outside via the
smtp.example.com
host. Thesmtp.example.com
host permits this, if any only if, we send via SASL over TCP port 465. The abovemain.cf
lines are working well for us, now.The
/etc/postfix/saslpwd
file contains a line of the following form:FYI: we did a
postmap /etc/postfix/saslpwd
to form the/etc/postfix/saslpwd.db
file that is used by postfix.Email generated on the host can go to any local user
Email generated ON THE HOST (NOT from outside) can go to any local user, including any of those addresses referenced in
/etc/aliases
.For example, applications such as cron that send email to a local administrator need to be able to do so.
BTW: We did a
newaliases
to form the/etc/aliases.db
file that is used by postfix.Inbound email connections are restricted
Inbound email connections (not from the local machine) may only come from IP addresses listed in
/etc/postfix/connect_from
.The
/etc/postfix/connect_from
contains lines of the form:NOTE: We also have firewall(s) in place to also enforce restricted access to TCP port 25. The above requirement is an added "defense in depth" practice.
BTW: We did a
postmap /etc/postfix/connect_from
to form the/etc/postfix/connect_from.db
file that is used by postfix.Inbound sender email is restricted
For all Inbound email, the sender MUST (i.e., SMTP FROM address) be listed in
/etc/postfix/sender_checks
.The
/etc/postfix/sender_checks
has lines of the form:FYI: We know that SMTP FROM addresses can be forged. This is a added "defense in depth" practice.
BTW: We did a
postmap /etc/postfix/sender_checks
to form the/etc/postfix/sender_checks.db
file that is used by postfix.The destination of all Inbound email is restricted
The destination of all Inbound email MUST be a LOCAL address / users listed in
/etc/postfix/receiver_checks
.The
/etc/postfix/receiver_checks
has lines of the form:BTW: The
/etc/aliases
file has aliases that are a pipe for at least one of the allowed local users:BTW: There are addresses in the
/etc/aliases
file that are NOT permitted destinations for inbound email. For example, in/etc/aliases
file we have:Because
notallowed0
andnotallowed1
andanother0
are NOT listed in/etc/postfix/receiver_checks
as OK, inbound email to those addresses must NOT be allowed.FYI: We did a
postmap /etc/postfix/receiver_checks
to form the/etc/postfix/receiver_checks.db
file that is used by postfix.A few more thoughts and summary
In the example files above where we show example lines, feel free to suggest changes such as
foo REJECT
or other modifications if/as needed.There are no "normal" users on the system, just admins and IOCCC judges.
All outbound email is generated on the machine. This will be a combination of messages sent to people who have registered for the IOCCC28 (i.e., to almost anywhere) and special external addresses that IOCCC judges monitor for generated reports.
Inbound email, as you can see, is extremely restricted to some very specific IP addresses (
/etc/postfix/connect_from.db
), for email that is from some very specific SMTP FROM addresses (/etc/postfix/sender_checks.db
) that are going to some very specific destinations (/etc/postfix/receiver_checks.db
) that are LOCAL addresses of which one will be an aliases pipe (/etc/aliases.db
). Nevertheless, not all addresses from/etc/aliases.db
are allowed inbound email destinations.The host must never relay email. It must only receive inbound email, under the above restrictions, to specific local addresses. Locally generated email may go anywhere, to any local address or to any external address, however.
We know that SMTP FROM addresses can be forged. We restrict external inbound email from addresses as an added "defense in depth" practice.
Email generated on the machine (such as via cron job or via some command) may go to any valid local addresses (such as root or some admin username), however ALL Inbound email is restricted to connections from specific IP addresses
(/etc/postfix/connect_from.db
), and from specific email senders (/etc/postfix/sender_checks.db
) and going to very select local email addresses (/etc/postfix/receiver_checks.db
).We will have firewalls (and other things) that restrict network traffic. We will also limit inbound connections to TCP port 25 via the firewall. We want postfix, as a defense on depth, to further restrict inbound email sources by IP address.
We have maintained postfix systems before; however we do not have time to configure this specific use case as we are finishing an application that is critical to the opening of IOCCC28. That is why we are asking for others to help us with these postfix configuration requirements.
Thank you for your time and consideration.
— The IOCCC Judges
UPDATE 0
The above message also surely contains things that we need to correct. When we have corrected (most) of them, we will update this sentence. :-)
Beta Was this translation helpful? Give feedback.
All reactions