D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Redirecting STDOUT to SMTP



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 04 Feb 2003 6:02 pm, martin.gautier@xxxxxxxxxxxxx wrote:
> Hi there.
>
> df - h | mail user@xxxxxxxxxxxx

The output of any command can be piped to mail:

[neil@xxxxxxxx neil]$ df | mail neil
[neil@xxxxxxxx neil]$ mail
Mail version 8.1.1 6/6/93.  Type ? for help.
"/var/spool/mail/neil": 1 message 1 new
>N  1 neil@xxxxxxxxxxxxxxx  Tue Feb  4 18:51  19/855
& 1
Message 1:
- From neil@xxxxxxxxxxxxxxxxx  Tue Feb  4 18:51:28 2003
Delivered-To: neil@xxxxxxxxxxxxxxxxx
To: neil@xxxxxxxxxxxxxxxxx
Date: Tue,  4 Feb 2003 13:51:27 -0500 (EST)
From: neil@xxxxxxxxxxxxxxxxx (Neil Williams)

Filesystem            Size  Used Avail Use% Mounted on
/dev/hdb6             6.9G  2.9G  3.7G  44% /
/dev/hda6             5.3G  2.9G  2.2G  58% /mnt/mandrake
/dev/hdb1             7.1G  1.1G  5.7G  17% /mnt/debian
/dev/hdb8             6.8G  750M  5.7G  12% /mnt/lycoris
/dev/hdb7             6.9G  2.2G  4.4G  33% /mnt/slack
/dev/hdb5             7.5G  912M  6.2G  13% /mnt/suse

(Apart from the mandrake ones, these figures represent mostly default
installations BTW, so it gives some indication of how much space some of
these distros need.)

& d
& q

> Does the "mail" command require "sendmail" or will any other SMTP service
> suffice? My box runs Lotus Domino's SMTP MTA and KMail etc works fine both
> internally and externally.

Any will suffice, it's just that I've only done this with Postfix and I have
no idea how to do it in Domino (sendmail is just too cryptic for me to even
dabble with).

> The reason I ask is that delivery of messages from "mail" fails to reach
> the SMTP MTA and is bounced back into "user"s "mail" mailbox (not the
> Notes mailbox) with the following error:

This is down to the configuration of the hostname element rather than a choice
of MTA. The error is within the algorithm that constructs the From: and To:
headers in the MTA.

> user@xxxxxxxxxxxx
>  (reason: 550 cannot route to sender address <user@xxxxxxxxxxxxxxxxxxxxx>)

Note that it is trying to send to user@xxxxxxxxxxxxxxxxxx not user@xxxxxxxxx

I got this sorted using the canonical map in Postfix. It basically set an
alias for neil@xxxxxxxxxxxxxxxxx to neil@xxxxxxxxxxxxxx so that command line
email would be accepted properly and people would be able to reply to the
usual POP3 mailbox.

>  user = valid linux user name and Lotus Domino user name
> hostname = a valid hostname for the linux server where all this happening
> domain = valid domain name
>

Your problem is that the hostname is not wanted. It can't just be set to a
null string, you need to find some method of implementing a canonical map
within Domino.

- --

Neil Williams
=============
http://www.codehelp.co.uk
http://www.dclug.org.uk

http://www.wewantbroadband.co.uk/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+QBGNiAEJSii8s+MRAhyAAJ41MJWkYxNJPH0kBoTM/KZll9bRqgCeICNu
0tpdI3kaDkama8bkkWxH98k=
=RSr7
-----END PGP SIGNATURE-----


--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


Lynx friendly