knurd42,

Things I like:

When my Linux machines are able to send me a mail when needed, for example when the automatic backup fails.

Things I hate:

Configuring my Linux machines to send emails to my regular Inbox, because it's painful.

johanneskastl,
@johanneskastl@digitalcourage.social avatar

@knurd42 I use postfix with a smart host. No configuration on mail server side needed.
And #postfix is being configured with #Ansible...

knurd42,

@johanneskastl

remind me again: smart host is a relayhost in the local network that that then delivers mail locally or forwards it to another relayhost at my ISP?

Yeah, that how I ideally would things to work as well and even had them at some point, but for good or bad reasons (some trouble?) I started to struggle with it again. Maybe it was due to the problems outlined here:

https://social.linux.pizza/@knurd42/111425500827728379

knurd42,

@johanneskastl

and Ansible: yeah, that at one point was the plan and I even got there to a certain degree, but then something more important came up.

It's always the "time spend on learning a new tool and staying on top of it" vs "time saved by the tool". And for my case I doubt that the ratio is good.

johanneskastl,
@johanneskastl@digitalcourage.social avatar

@knurd42 I wrote myself a Ansible role several years ago that I use on all of my servers to configure postfix.

For RHEL and clones there is one in the rhel-system-roles, maintained by RedHat IIRC:
https://www.redhat.com/sysadmin/ansible-system-role

knurd42,

@johanneskastl

yeah, that was the path I was heading towards to, too, but then life happened :-D

johanneskastl,
@johanneskastl@digitalcourage.social avatar

@knurd42 The problem with addresses not being rewritten might be solvable using the virtual table in postfix

Something like:
something@localhost my-real-mail-address@example.org
something@someserver.localdomain my-real-mail-address@example.org

knurd42,

@johanneskastl

That won't work with dhcp based hostnames I fail to anticipate; and it also feels kinda tedious/stupid to do so for "(all users) * (all hostnames I can anticipate)"

johanneskastl,
@johanneskastl@digitalcourage.social avatar

@knurd42 AFAIK you can just use the username without any domain or hostname part

myuser my-real-mail@example.org

IIRC it uses this for myuser, myuser@localhost, myuser@localhost.localdomain and myuser@my-real-fqdn etc.

knurd42,

@johanneskastl

To quote from my toot:
"""
A simple

thl baz@example.com

in /etc/postfix/generic afaics doesn't to the tick.
"""

But maybe I did something stupid while testing this.

johanneskastl,
@johanneskastl@digitalcourage.social avatar

@knurd42
I picked the wrong word, relayhost might have been a better choice. In my case, the local postfix sends mail via the mail provider's server via SMTP.

Something like this:
relayhost = [smtp.mailbox.org]

knurd42,

@johanneskastl

no worries; and yes, that's what I'm doing already and works well, apart from the mentioned case

Seraphyn,
@Seraphyn@social.tchncs.de avatar

@knurd42

hmmm, relay with postfix.
Allow on Mailsrv to get mails from this IP
Done

knurd42,

@Seraphyn

That's actually what I do, but every time I have to deal with it something is not working as it's supposed to do

Which is my fault, as I don't know this stuff well enough. But there are only so many hours in a days. :-/

knurd42, (edited )

@Seraphyn

if you have a minute, maybe you can help me with one of my annoying problems:

some local services I run send mail to thl@{localhost,localhost-localdomain,foobar.fritz.box,foobar}, which obviously will cause trouble if that mail is forwarded to an external box without address rewriting.

How to I fix this without listing all the possible domain names manually, as I might not know them in advance?

A simple

thl baz@example.com

in /etc/postfix/generic afaics doesn't to the tick.

knurd42,

reg "painful": yes, maybe I have not find the simple solution yet that is simple to setup and maintain.

But every time someone suggested a simple solution to me in the past I ran into some trouble with it.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • mdbf
  • ethstaker
  • magazineikmin
  • GTA5RPClips
  • rosin
  • thenastyranch
  • Youngstown
  • osvaldo12
  • slotface
  • khanakhh
  • kavyap
  • InstantRegret
  • Durango
  • megavids
  • everett
  • tester
  • cisconetworking
  • Leos
  • cubers
  • modclub
  • ngwrru68w68
  • tacticalgear
  • anitta
  • provamag3
  • normalnudes
  • JUstTest
  • lostlight
  • All magazines