You are right, in part, in "working out of the box". And it is why I
went off into left field. Not necessarily a bad thing.
The system crontab mails to root. So there IS one change needed for
postfix and that is to add to aliases:
cat <<EOF>>/etc/aliases || exit 1
root: <your userid>
EOF
newaliases
And then restart postfix
It is this mailing to root that was not working. add to aliases and
cron is happy.
other changes are nice, not needed.
Then use mutt or similar to process your local mail.
On 6/27/25 10:53 AM, Todd Zullinger wrote:
Robert Moskowitz via users wrote:
I want to create a simple howto for local mail delivery with postfix.
I did a LOT with postfix ~7 years ago, and found many of my notes this
morning.
Thing is that google AI did not show the preferred way to edit main.cf which
is to use "postconf -e 'line'".
Surprised? ;)
Not in the slightest. I don't understand the appeal of any
of these "AI" tools. They simply regurgitate text based on
probability. They're masters of making shit talking sound
almost reasonable. The amount of human time they waste is
only surpassed by the mountain of energy they squander. :/
I don't know that there is anything needed to do other than
install and start postfix for local mail delivery. It works
out of the box. You can take steps to prevent it from ever
sending mail out of your system pretty easily, if that's a
concern. Something like this:
$ cat <<'EOF' | sudo tee -a /etc/postfix/main.cf >/dev/null
# Disable non-local recipients
default_transport = error:Outside mail is not deliverable
EOF
Thus can someone point me to, or send me an unaltered F41 main.cf? My
googling did not find it.
The ideal way, IMO, to get such a file is to extract it from
the package. You can do that in a few steps:
$ dnf install -y rpmdevtools
$ dnf download postfix
$ rpm -K postfix-3.9.0-8.fc41.x86_64.rpm
postfix-3.9.0-8.fc41.x86_64.rpm: digests signatures OK
$ rpmdev-extract -q postfix-3.9.0-8.fc41.x86_64.rpm
$ ls postfix-3.9.0-8.fc41.x86_64/etc/postfix/main.cf
postfix-3.9.0-8.fc41.x86_64/etc/postfix/main.cf
You can do it without rpmdev-extract, using rpm2cpio and
cpio directly, but rpmdevtools provides enough helpful tools
that I have it installed anywhere I'm working with rpms.
It's far easier for me to remember the usage of
rpmdev-extract than cpio's.
Alternately, you could run a container, install the package,
and copy the file out. But that's just a rather expensive
way of extracting the rpm directly.
--
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue