You are not logged in.

#1 2010-09-26 20:10:39

BaconPie
Member
Registered: 2010-08-11
Posts: 209

'mail' not able to send messages

I just installed postfix using this guide and it works a charm. Any errors emailed to me are actually emailed to me (stuff like cron errors). They go into /var/spool/mail/tom.

The only problem is that I can't seem to send mail. When I try to it complains that it can't find /usr/bin/mailx. What gives?

$ echo hello | mail -s test tom
/usr/bin/mailx: No such file or directory

$ ls -l /usr/sbin/sendmail
-rwxr-xr-x 1 root root 199344 Jun 10 13:15 /usr/sbin/sendmail

Offline

#2 2010-09-26 20:27:18

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: 'mail' not able to send messages

There's no mailx in the postfix package.

Offline

#3 2010-09-26 20:28:11

BaconPie
Member
Registered: 2010-08-11
Posts: 209

Re: 'mail' not able to send messages

I gathered that. How do I send mail? The guide uses that exact syntax.

Offline

#4 2010-09-26 20:31:37

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: 'mail' not able to send messages

Try /usr/sbin/sendmail. What's the output of 'type mail'?

Offline

#5 2010-09-26 20:37:01

BaconPie
Member
Registered: 2010-08-11
Posts: 209

Re: 'mail' not able to send messages

$ type mail
mail is /usr/bin/mail

$ echo hello | /usr/sbin/sendmail tom

$ less /var/spool/mail/tom
--DBB0C1FD24.1285533149/kiwi.localdomain--

From tom@kiwi.localdomain  Sun Sep 26 21:34:55 2010
Return-Path: <tom@kiwi.localdomain>
X-Original-To: tom
Delivered-To: tom@kiwi.localdomain
Received: by kiwi.localdomain (Postfix, from userid 1000)
        id 533881FD2E; Sun, 26 Sep 2010 21:34:55 +0100 (BST)
Message-Id: <20100926203455.533881FD2E@kiwi.localdomain>
Date: Sun, 26 Sep 2010 21:34:55 +0100 (BST)
From: tom@kiwi.localdomain
To: undisclosed-recipients:;

hello

Hm, I guess that one works. So I just use sendmail instead of mail? I assume subject settings are in the man page?

Offline

#6 2010-09-26 20:41:38

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: 'mail' not able to send messages

The wiki isn't perfect and mistakes happen.
The only package that has /usr/bin/mail is mailx, which is a nice e-mail-sending app with it's own tiny MTA.

The error from your first post indicated you have mailx installed, but probably you malformed the command. Using a proper e-mail address

echo hello | mail -s test tom@gmail.com

could work, but it's not local mail delivery anymore ;P

Last edited by karol (2010-09-26 20:42:27)

Offline

#7 2010-09-26 20:44:26

BaconPie
Member
Registered: 2010-08-11
Posts: 209

Re: 'mail' not able to send messages

$ echo hello | mail -s test mygmail@gmail.com
/usr/bin/mailx: No such file or directory

$ sudo pacman -Q mailx
mailx 8.1.1-7

Nope, never worked. I'd like external mailing though! Also, might I ask, what is an MTA?

Offline

#8 2010-09-26 20:51:58

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: 'mail' not able to send messages

MTA = http://en.wikipedia.org/wiki/Message_transfer_agent

You probably need to configure mailx first :-)

Edit: Actually, I use mailx-heirloom 12.4-3 and it may be a bit different from mailx. If you have a gmail account and don't mind installing mailx-heirloom I can help, but I know nothing about postfix or mailx.

Last edited by karol (2010-09-26 21:01:30)

Offline

#9 2010-09-26 22:34:36

BaconPie
Member
Registered: 2010-08-11
Posts: 209

Re: 'mail' not able to send messages

Can mailx be configured to do local mail?

Offline

#10 2010-09-27 00:37:21

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: 'mail' not able to send messages

BaconPie wrote:

Can mailx be configured to do local mail?

Ummm, probably ;P But I don't know how.
If you're happy with sendmail, no need to switch.

Offline

Board footer

Powered by FluxBB