Getting local mail to work on router

hi. i have a gl-ar750s router that i use in a home environment (non-business) and i’d like to be able to send mail only on the router itself, between, say, root and user1. i could, for example, send a log to a local user i’d read after ssh’ing into it.

i’ve added postfix and mutt but sending mail via mutt (e.g. ‘mutt user1’) fails to send the mail.

what am i missing? ty

Hi, I suggest you post more info like error messages, logs and configurations done so someone can try to help… :wink:

hi. I installed postfix and mutt thinking thatd be enough but so far no go.

user1@router:~$ mutt user1

goes fine but when I run mutt to read it the bottom of the screen reads:

/var/mail/user1: No such file or directory (errno = 2)

so I goofed around and find the right file in /usr/var/mail, so I do:

user1@router:~$ mutt -f /usr/var/mail/user1

and that shows:

From MAILER-DAEMON  Thu Jan 23 19:39:52 2020
Return-Path: <>
X-Original-To: user1@router
Delivered-To: user1@router
Received: by router (Postfix) id 9A2C5130A; Thu, 23 Jan 2020 19:39:52 +0100 (CET)
Date: Thu, 23 Jan 2020 19:39:52 +0100 (CET)
From: Mail Delivery System <MAILER-DAEMON@router>
Subject: Undelivered Mail Returned to Sender
To: user1@router
Auto-Submitted: auto-replied
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status; boundary="7D68F1308.1579804792/router"
Message-Id: <20200123183952.9A2C5130A@router>
Status: O
Content-Length: 1562
Lines: 58

looking through the log shows:

Thu Jan 23 19:39:52 2020 mail.warn postfix/sendmail[32275]: warning: smtputf8_enable is true, but EAI support is not compiled in
Thu Jan 23 19:39:52 2020 mail.warn postfix/postdrop[32276]: warning: smtputf8_enable is true, but EAI support is not compiled in
Thu Jan 23 19:39:52 2020 mail.warn postfix/cleanup[32277]: warning: smtputf8_enable is true, but EAI support is not compiled in
Thu Jan 23 19:39:52 2020 mail.info postfix/pickup[7924]: 7D68F1308: uid=1000 from=
Thu Jan 23 19:39:52 2020 mail.warn postfix/trivial-rewrite[32278]: warning: smtputf8_enable is true, but EAI support is not compiled in
Thu Jan 23 19:39:52 2020 mail.info postfix/cleanup[32277]: 7D68F1308: message-id=<20200123183952.GA32097_AT_router.lan>
Thu Jan 23 19:39:52 2020 mail.info postfix/qmgr[3568]: 7D68F1308: from=<user1@p_A_router>, size=396, nrcpt=1 (queue active)
Thu Jan 23 19:39:52 2020 mail.warn postfix/smtp[32279]: warning: smtputf8_enable is true, but EAI support is not compiled in
Thu Jan 23 19:39:52 2020 mail.warn postfix/bounce[32280]: warning: smtputf8_enable is true, but EAI support is not compiled in
Thu Jan 23 19:39:52 2020 mail.info postfix/smtp[32279]: 7D68F1308: to=<user1_AT_router.lan>, relay=none, delay=0.13, delays=0.09/0.04/0/0, dsn=5.4.6, status=bounced (mail for router.lan loops back to myself)
Thu Jan 23 19:39:52 2020 mail.info postfix/cleanup[32277]: 9A2C5130A: message-id=<20200123183952.9A2C5130A_AT_router>
Thu Jan 23 19:39:52 2020 mail.info postfix/qmgr[3568]: 9A2C5130A: from=<>, size=2066, nrcpt=1 (queue active)
Thu Jan 23 19:39:52 2020 mail.info postfix/bounce[32280]: 7D68F1308: sender non-delivery notification: 9A2C5130A
Thu Jan 23 19:39:52 2020 mail.info postfix/qmgr[3568]: 7D68F1308: removed
Thu Jan 23 19:39:52 2020 mail.warn postfix/bounce[32281]: warning: smtputf8_enable is true, but EAI support is not compiled in
Thu Jan 23 19:39:52 2020 mail.warn postfix/local[32282]: warning: smtputf8_enable is true, but EAI support is not compiled in
Thu Jan 23 19:39:52 2020 mail.info postfix/local[32282]: 9A2C5130A: to=<user1@p_x_router>, relay=local, delay=0.09, delays=0.02/0.06/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
Thu Jan 23 19:39:52 2020 mail.warn postfix/local[32282]: warning: service not found: biff/udp
Thu Jan 23 19:39:52 2020 mail.info postfix/qmgr[3568]: 9A2C5130A: removed

so the mail doesn’t go anywhere. ty :slight_smile:

FWIW this can be solved by modifying the main.cf file for postfix as mentioned at Postfix Setup for Local Mail Only

specifically, I added the filling line’s to the /etc/postfix/main.cf file:

inet_interfaces = $myhostname, localhost
mydestination = $myhostname, localhost.$mydomain, localhost, $myhostname.$mydomain
mynetworks_style = host
default_transport = error:outside mail is not deliverable

then I created/ modified /etc/Muttrc to contain:

set spoolfile = /usr/var/mail/$USER

that allows a local mail on the system.