Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Help with mailx [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
at
Apprentice
Apprentice


Joined: 20 Aug 2006
Posts: 185

PostPosted: Mon Nov 19, 2007 2:34 am    Post subject: Help with mailx [solved] Reply with quote

I am trying to send an e-mail using mailx (mail-client/mailx-8.1.2.20050715-r1).

I know that I can send e-mails using KMail with the following settings:
Code:
Host: smtp.comcast.net
Port: 25
Server requires authentication
Login: crazy_j
Password: z123456
Encryption: TLS
Authentication method: plain


I have created the following ~/.mailrc file:
Code:
set from=crazy_j@joe.com
set smtp=smtp.comcast.net:25
set smtp-auth-user=crazy_j
set smtp-auth-password=z123456
set smtp-use-starttls


I also tried to add 'set smtp-auth=cram-md5', but that made no difference.

However, sending mail fails with the error message whose usefulness reminds the Windows world:
Code:
# mailx -v -s "Test 7" crazy_j@joe.com
Test 7
Cc:
[<-] 220 OMTA06.emeryville.ca.mail.comcast.net comcast ESMTP server ready
[->] EHLO Joe38
[<-] 250 OK
Can't send mail: sendmail process failed


/var/log/mail.info and /var/log/mail.log files:
Code:
Nov 18 21:22:34 Joe38 sSMTP[386940]: Creating SSL connection to host
Nov 18 21:22:35 Joe38 sSMTP[386940]: SSL connection using DHE-RSA-AES256-SHA


/var/log/mail.err file and syslog have no entries.

Would you have any suggestions?

Thank you!


Last edited by at on Sun Dec 02, 2007 8:41 pm; edited 1 time in total
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1611
Location: U.S.A.

PostPosted: Tue Nov 20, 2007 12:33 am    Post subject: Reply with quote

What are you using for an MTA (e.g., ssmtp, sendmail, exim, etc.) and how is it configured?
Back to top
View user's profile Send private message
at
Apprentice
Apprentice


Joined: 20 Aug 2006
Posts: 185

PostPosted: Thu Nov 22, 2007 4:18 am    Post subject: Reply with quote

I thought mailx was MTA. But I do have ssmtp also installed.

/etc/ssmtp/ssmtp.conf:
Code:
mailhub=smtp.comcast.net:25
UseTLS=YES
AuthUser=crazy_j
AuthPass=z123456
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1611
Location: U.S.A.

PostPosted: Thu Nov 22, 2007 5:00 am    Post subject: Reply with quote

I don't think mailx is a MTA; I think it is a MUA only (a minimalist MUA mostly used in scripts).

I think the error message you were getting "sendmail process failed" is from mailx indicating it got a bad return code from the MTA. Since you have ssmtp installed, this most likely means ssmtp is improperly configured (although it could be the port is blocked, server-side problem, etc.).

I haven't used ssmtp in a long time, but it has additional config files named something like 'aliases' and 'revaliases' that govern some basic header rewrites. If you didn't set those up, that might be your problem.

There's a howto for ssmtp on the gentoo wiki. If you haven't looked at it, you might want to check that out.
http://gentoo-wiki.com/HOWTO_Gmail_and_sSMTP

There are a couple of threads in the forums addressing ssmtp configuration as well. I seem to recall finding these more readily by googling "gentoo ssmtp" than by searching the forum directly.

Keep in mind there are other MTAs in the portage tree (under "mail-mta/"); ssmtp is the gentoo default because it's the bare minimum needed to send mail. There are several minimalist ones (nbsmtp, msmtp, nullmailer, etc.); I use esmtp because its very minimal but lets me also send mail locally (when augmented by a local MDA like procmail or maildrop). Or you may want to opt for a full-featured MTA: the old-school standard MTA is 'sendmail', good modern equivalents include exim, qmail, and others.
Back to top
View user's profile Send private message
at
Apprentice
Apprentice


Joined: 20 Aug 2006
Posts: 185

PostPosted: Sun Dec 02, 2007 8:40 pm    Post subject: Reply with quote

I have installed msmtp and it works beautifully.

Thank you!!!
Back to top
View user's profile Send private message
charlesnadeau
Apprentice
Apprentice


Joined: 19 May 2003
Posts: 205
Location: Ottawa, Ontario, Canada

PostPosted: Sun Mar 09, 2008 1:13 am    Post subject: Reply with quote

BoneKracker wrote:
There's a howto for ssmtp on the gentoo wiki. If you haven't looked at it, you might want to check that out.
http://gentoo-wiki.com/HOWTO_Gmail_and_sSMTP


Worked perfectly the first time: Wow!
Thanks!

Charles
_________________
Charles Nadeau
http://radio.weblogs.com/0111823/
http://charlesnadeau.blogspot.com/search/label/Gentoo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum