Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] ssmtp - not so simple
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
bendeguz
Apprentice
Apprentice


Joined: 10 Feb 2010
Posts: 189

PostPosted: Fri Jun 11, 2010 11:35 pm    Post subject: [solved] ssmtp - not so simple Reply with quote

Hi!

Anyone can send mail, with ssmtp?
I really don't know what's the problem with my setup. I tried my ISP's smtp and now I'm trying with gmail's smtp with the same result:

/val/log/mail.err
Code:

Jun 12 01:24:12 localhost sSMTP[29920]: Unable to locate mailhub
Jun 12 01:24:12 localhost sSMTP[29920]: Cannot open mailhub:25


Code:

#
# /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=my@email.com

# 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 your mailhub is so named.

# Example for SMTP port number 2525
# mailhub=mail.your.domain:2525
# Example for SMTP port number 25 (Standard/RFC)
 mailhub=smtp.gmail.com:587

# Example for SSL encrypted connection
# mailhub=mail.your.domain:465

# Where will the mail seem to come from?
rewriteDomain=smtp.gmail.com

# The full hostname

# Gentoo bug #47562
# Commenting the following line will force ssmtp to figure
# out the hostname itself.

# hostname=_HOSTNAME_
hostname=smtp.gmail.com:587

# Set this to never rewrite the "From:" line (unless not given) and to
# use that address in the "from line" of the envelope.
FromLineOverride=YES

# Use SSL/TLS to send secure messages to server.
UseTLS=YES
UseSTARTTLS=Yes

# Use SSL/TLS certificate to authenticate against smtp host.
#UseTLSCert=YES

# Use this RSA certificate.
#TLSCert=/etc/ssl/certs/ssmtp.pem

# Get enhanced (*really* enhanced) debugging information in the logs
# If you want to have debugging of the config file parsing, move this option
# to the top of the config file and uncomment
#Debug=YES



Code:

ls -l /etc/ssmtp
total 5
-rw-r--r--. 1 root root   200 May 25 10:25 revaliases
-rw-r-----. 1 root ssmtp 1449 Jun 12 01:33 ssmtp.conf


(revaliases file is empty)

my user is in the ssmtp group

I'm using this to send mail:
Code:

~ $ sendmail <recipient@email.com> -au <myaccount@gmail.com> -ap <mypassword>


Last edited by bendeguz on Sat Jun 12, 2010 12:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Sat Jun 12, 2010 12:21 am    Post subject: Reply with quote

in your "mailhub" line there is a space before the first letter

maybe the line gets ignored because of that? no idea

I don't know if it's saying that it "can't locate" the mailhub setting in the configuration file, or if it's trying to resolve what you have in mailhub, and failing.

Also, unless you're sending *from* a gmail address (which, if you were, why not connect the client directly to gmail?) then do not use gmail's smtp servers. You will be blocked as an unauthorized relay. In the event you're sending to another gmail user, you will be blocked for being on a residential/dynamic IP.

Use your ISP's smtp server.
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
bendeguz
Apprentice
Apprentice


Joined: 10 Feb 2010
Posts: 189

PostPosted: Sat Jun 12, 2010 12:52 pm    Post subject: Reply with quote

cach0rr0 wrote:

in your "mailhub" line there is a space before the first letter
maybe the line gets ignored because of that? no idea


OMG, you were right! :D Now it's working with gmail. I still have some authentication problem with my ISP's stmp, but i don't care until it's working with gmail.
Thank you for your help!
Back to top
View user's profile Send private message
bendeguz
Apprentice
Apprentice


Joined: 10 Feb 2010
Posts: 189

PostPosted: Fri Jun 18, 2010 2:29 pm    Post subject: Reply with quote

I have one more problem:
How do you set your real name, when sending mail?

Doesn't work:
Code:

 sendmail recipient at email.com -au gmailuser -ap gmailpass -F realname


If I set it in ~./muttrc with "set realname" doesn't work either.

These set the gmail e-mail address instead of my name.
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