You are not logged in.

#1 2013-10-01 06:44:32

maggie
Member
Registered: 2011-02-12
Posts: 255

Cannot send/receive mail locally for cronie [solved]

I installed the heirloom-mailx package so cronie can send messages but I cannot send a test message to myself.

% echo "test" | mailx -s "test message" mags
/usr/sbin/sendmail: No such file or directory
"/home/mags/dead.letter" 9/210
. . . message not sent.

So I installed ssmtp after searching but that does not work either.

% echo "test" | mailx -s "test message" mags
% send-mail: Cannot open wallflower:25

My /etc/ssmtp/ssmtp.conf:

#
# /etc/ssmtp.conf -- a config file for sSMTP sendmail.
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=mags
# The place where the mail goes. The actual machine name is required
# no MX records are consulted. Commonly mailhosts are named mail.domain.com
# The example will fit if you are in domain.com and you mailhub is so named.
mailhub=wallflower
# Where will the mail seem to come from?
#rewriteDomain=y
# The full hostname
hostname=wallflower

Thank you for any help you can provide.

Last edited by maggie (2013-10-05 15:21:00)

Offline

#2 2013-10-01 09:23:18

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

Re: Cannot send/receive mail locally for cronie [solved]

You can create /usr/sbin/sendmail and try again.
Symlink it to /usr/bin/mailx.

I guess ssmtp provides that.


heirloom-mailx is going to be replaced by s-nail: https://mailman.archlinux.org/pipermail … 25464.html -> https://www.archlinux.org/packages/test … 64/s-nail/
You might want to use it instead of heirloom-mailx.

Last edited by karol (2013-10-01 09:26:49)

Offline

#3 2013-10-01 19:51:05

maggie
Member
Registered: 2011-02-12
Posts: 255

Re: Cannot send/receive mail locally for cronie [solved]

I replaced heirloom-mailx with s-nail but I still cannot get localhost mail to work. How are others doing it?

Offline

#4 2013-10-01 21:32:16

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,650
Website

Re: Cannot send/receive mail locally for cronie [solved]

maggie wrote:

I replaced heirloom-mailx with s-nail but I still cannot get localhost mail to work. How are others doing it?

Your probably seems related not to mailx but to a misconfigured mailsend.  Try looking for example configs.  I would help you out but I don't actually have a localhost mail system installed... haven't since Debian I think!

Last edited by graysky (2013-10-01 21:32:45)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2013-10-01 22:11:23

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Cannot send/receive mail locally for cronie [solved]

graysky wrote:

Your probably seems related not to mailx but to a misconfigured mailsend.

By this are you referring to sendmail?

Offline

#6 2013-10-01 22:14:08

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,650
Website

Re: Cannot send/receive mail locally for cronie [solved]

Yeah, dyslexia tongue


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2013-10-01 22:54:46

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

Re: Cannot send/receive mail locally for cronie [solved]

http://unix.stackexchange.com/questions … y-for-cron

Edit: Tried https://aur.archlinux.org/packages/dma/ - works:

$ ls -l /usr/bin/sendmail 
lrwxrwxrwx 1 root root 3 Oct  2 01:23 /usr/bin/sendmail -> dma
$ echo "foo" | mailx -n -s "test" karol
$ mail
Heirloom Mail version 12.5 7/5/10.  Type ? for help.
"/var/spool/mail/karol": 1 message 1 new
>N  1 karol@black           Wed Oct  2 01:25  17/447   "test"

Last edited by karol (2013-10-01 23:28:30)

Offline

#8 2013-10-01 23:50:40

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,650
Website

Re: Cannot send/receive mail locally for cronie [solved]

Good find, karol.  Doesn't work for me though... anything special you did to setup?

% echo "foo" | mailx -n -s "test" graysky
% sendmail: no recipients

% mail
No mail for graysky

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2013-10-02 00:50:44

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

Re: Cannot send/receive mail locally for cronie [solved]

I don't think any voo-doo was needed.
I just started from scratch to make sure and it simply works.



What does not work is e-mailing stuff to my gmail account using s-nail. I get a core dump :-(
https://bugs.archlinux.org/task/37161

Offline

#10 2013-10-05 15:20:32

maggie
Member
Registered: 2011-02-12
Posts: 255

Re: Cannot send/receive mail locally for cronie [solved]

Thanks to you karol, dma works. For graysky, if you have /etc/aliases or /etc/ssmtpd on your system, that could be why you can't send mail.

Offline

#11 2013-10-05 21:23:35

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,650
Website

Re: Cannot send/receive mail locally for cronie [solved]

maggie wrote:

Thanks to you karol, dma works. For graysky, if you have /etc/aliases or /etc/ssmtpd on your system, that could be why you can't send mail.

That was the problem, works now thanks.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB