• Aliases and OpenSMTPD

    From Paul M Foster@21:1/5 to All on Fri May 24 17:50:02 2024
    Folks:

    This may require someone who's familiar with OpenSMTPD. I have a machine
    which does backups (buckaroo) and a desktop (yosemite) which is my main machine. When anacron kicks off the backup, it should create an email for
    root to detail what happened. Buckaroo is headless, so I want that email to come to me at yosemite. (All this is on a LAN.)

    I'm using OpenSMTPD on buckaroo to handle mail. Here's my config:

    ---
    # $OpenBSD: smtpd.conf,v 1.10 2018/05/24 11:40:17 gilles Exp $

    # This is the smtpd server system-wide configuration file.
    # See smtpd.conf(5) for more information.

    table aliases file:/etc/aliases
    table secrets file:/etc/secrets

    listen on localhost

    action "relay" relay host smtp+notls://@yosemite.mars.lan:25 auth <secrets>

    match from local for any action "relay"
    ---

    If I send an email directly to paulf@yosemite.mars.lan from buckaroo, it arrives. That means this config can do what it's designed to do, basically. However, mails to "root" on buckaroo don't get to yosemite. They should, because my /etc/aliases table looks like this:

    ---
    ...
    root paulf@yosemite.mars.lan
    ---

    But it appears that OpenSMTPD doesn't consult this table unless explicitly instructed to. According to man smtpd.conf(5), you can tell it to scan
    through aliases, but only on local delivery, not if the email is outbound.

    So does anyone know how to make OpenSMTPD do alias conversions on outbound
    mai
  • From tomas@tuxteam.de@21:1/5 to Paul M Foster on Fri May 24 18:50:01 2024
    On Fri, May 24, 2024 at 11:45:56AM -0400, Paul M Foster wrote:
    Folks:

    [...]

    If I send an email directly to paulf@yosemite.mars.lan from buckaroo, it arrives. That means this config can do what it's designed to do, basically. However, mails to "root" on buckaroo don't get to yosemite. They should, because my /etc/aliases table looks like this:

    ---
    ...
    root paulf@yosemite.mars.lan
    ---

    Still out of my depth with OpenSMTPD, but... good ol' aliases,of sendmail
    lore would have a colon after the "root" up there. The MTAs I know of
    all have inherited that.

    And... if your MTA distro came with a command "newaliases" try running
    that. Many MTAs like to look things up in a hashed version of the textual
    file.

    Cheers
    --
    t

    -----BEGIN PGP SIGNATURE-----

    iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZlDC4gAKCRAFyCz1etHa RsxJAJ9j088PKHxV17ymnupDPzyWRRw/1ACffntm67NTgIT351F4AV09Mmrxd68=
    =X7uD
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul M Foster@21:1/5 to tomas@tuxteam.de on Fri May 24 19:10:01 2024
    On Fri, May 24, 2024 at 06:40:09PM +0200, tomas@tuxteam.de wrote:

    On Fri, May 24, 2024 at 11:45:56AM -0400, Paul M Foster wrote:
    Folks:

    [...]

    If I send an email directly to paulf@yosemite.mars.lan from buckaroo, it arrives. That means this config can do what it's designed to do, basically. However, mails to "root" on buckaroo don't get to yosemite. They should, because my /etc/aliases table looks like this:

    ---
    ...
    root paulf@yosemite.mars.lan
    ---

    Still out of my depth with OpenSMTPD, but... good ol' aliases,of sendmail lore would have a colon after the "root" up there. The MTAs I know of
    all have inherited that.

    There is a colon in my aliases file. I just omitted it in the email.

    Paul

    --
    Paul M. Foster
    Personal Blog: http://noferblatz.com
    Company Site: http://quillandmouse.com
    Software Projects: https://gitlab.com/paulmfoster

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From tomas@tuxteam.de@21:1/5 to Paul M Foster on Fri May 24 19:30:01 2024
    On Fri, May 24, 2024 at 01:08:56PM -0400, Paul M Foster wrote:
    On Fri, May 24, 2024 at 06:40:09PM +0200, tomas@tuxteam.de wrote:

    On Fri, May 24, 2024 at 11:45:56AM -0400, Paul M Foster wrote:
    Folks:

    [...]

    If I send an email directly to paulf@yosemite.mars.lan from buckaroo, it arrives. That means this config can do what it's designed to do, basically.
    However, mails to "root" on buckaroo don't get to yosemite. They should, because my /etc/aliases table looks like this:

    ---
    ...
    root paulf@yosemite.mars.lan
    ---

    Still out of my depth with OpenSMTPD, but... good ol' aliases,of sendmail lore would have a colon after the "root" up there. The MTAs I know of
    all have inherited that.

    There is a colon in my aliases file. I just omitted it in the email.

    I see. Then I'm out of ideas (except that "newaliases" thing). Perhaps
    your MTA has a log file where to find clues?

    Cheers & good luck
    --
    tomás

    -----BEGIN PGP SIGNATURE-----

    iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZlDMlQAKCRAFyCz1etHa RsUfAJ4tv6fwEZjbNuV0X9sAxCMpjFtpoACeLuC2GMOcLMf+ii73cd3KZ9MDGtA=
    =uIfx
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Wright@21:1/5 to Paul M Foster on Fri May 24 19:40:01 2024
    On Fri 24 May 2024 at 13:08:56 (-0400), Paul M Foster wrote:
    On Fri, May 24, 2024 at 06:40:09PM +0200, tomas@tuxteam.de wrote:
    On Fri, May 24, 2024 at 11:45:56AM -0400, Paul M Foster wrote:

    If I send an email directly to paulf@yosemite.mars.lan from buckaroo, it arrives. That means this config can do what it's designed to do, basically.
    However, mails to "root" on buckaroo don't get to yosemite. They should, because my /etc/aliases table looks like this:

    ---
    ...
    root paulf@yosemite.mars.lan
    ---

    Still out of my depth with OpenSMTPD, but... good ol' aliases,of sendmail lore would have a colon after the "root" up there. The MTAs I know of
    all have inherited that.

    There is a colon in my aliases file. I just omitted it in the email.

    I don't know anything about opensmtpd, but use exim4 where, to send
    emails to other hosts on the LAN, AIUI you either need a DNS server
    that can resolve the LAN addresses or, instead, a hubbed hosts file.

    Cheers,
    David.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?iso-8859-2?Q?Kamil_Jo=F1ca?=@21:1/5 to Paul M Foster on Fri May 24 19:40:02 2024
    Paul M Foster <paulf@quillandmouse.com> writes:

    [...]

    If I send an email directly to paulf@yosemite.mars.lan from buckaroo,
    it
    What does this mean?


    But it appears that OpenSMTPD doesn't consult this table unless explicitly instructed to. According to man smtpd.conf(5), you can tell it to scan through aliases, but only on local delivery, not if the email is outbound.

    So does anyone know how to make OpenSMTPD do alias conversions on outbound mail? Or alternatively, is there a way to hack Debian so that mails
    generated from root processes to go an offsite email rather than just root?

    What is in the logs?

    I am pretty sure you don't tell us whole truth.
    KJ

    --
    http://wolnelektury.pl/wesprzyj/teraz/
    I do enjoy a good long walk -- especially when my wife takes one.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Charles Curley@21:1/5 to Paul M Foster on Fri May 24 20:00:01 2024
    On Fri, 24 May 2024 13:08:56 -0400
    Paul M Foster <paulf@quillandmouse.com> wrote:

    There is a colon in my aliases file. I just omitted it in the email.

    Don't do that. Always use copy and paste to convey the contents of a configuration file. Murphy only know what else you inadvertently left
    out or added.

    --
    Does anybody read signatures any more?

    https://charlescurley.com
    https://charlescurley.com/blog/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From didar@21:1/5 to Charles Curley on Mon May 27 14:10:01 2024
    On Fri, May 24, 2024 at 11:53:31AM -0600, Charles Curley wrote:
    On Fri, 24 May 2024 13:08:56 -0400
    Paul M Foster <paulf@quillandmouse.com> wrote:

    There is a colon in my aliases file. I just omitted it in the email.

    Don't do that. Always use copy and paste to convey the contents of a configuration file. Murphy only know what else you inadvertently left
    out or added.

    --
    Does anybody read signatures any more?

    https://charlescurley.com
    https://charlescurley.com/blog/



    Please try:

    smtpctl update table aliases

    ...as root.

    I had this command documented in my anisble recipe for OpenSMTPD.

    # If you edit the file, you have to run "smtpctl update table aliases"
    table aliases file:/etc/aliases


    --
    Regards,
    Didar

    Tax and title extra.

    Generated by Signify v1.14 (http://www.debian.org/)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)