Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mail messages [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
DancesWithWords
Guru
Guru


Joined: 29 Jun 2002
Posts: 341
Location: ottawa, canada

PostPosted: Sat Nov 30, 2013 12:09 am    Post subject: Mail messages [SOLVED] Reply with quote

How so I fix the mail messages so that they end up in my gmail.com account?


Nov 29 19:00:05 faintfuzzies sSMTP[28666]: Cannot open mail:25
Nov 29 19:00:05 faintfuzzies cron[28661]: (bsh) MAIL (mailed 58 bytes of output but got status 0x0001
)
Nov 29 19:00:09 faintfuzzies crontab[28712]: (root) BEGIN EDIT (root)
Nov 29 19:01:05 faintfuzzies sSMTP[28696]: Unable to connect to "mail" port 25.
Nov 29 19:01:05 faintfuzzies sSMTP[28696]: Cannot open mail:25
Nov 29 19:01:05 faintfuzzies cron[28691]: (bsh) MAIL (mailed 58 bytes of output but got status 0x000


Last edited by DancesWithWords on Fri Dec 06, 2013 4:26 am; edited 1 time in total
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Sat Nov 30, 2013 12:49 am    Post subject: Reply with quote

Quote:
Nov 29 19:01:05 faintfuzzies sSMTP[28696]: Unable to connect to "mail" port 25.


Can you check if that host name is correct, you can connect to it by other means and that the server on it is running?
Back to top
View user's profile Send private message
DancesWithWords
Guru
Guru


Joined: 29 Jun 2002
Posts: 341
Location: ottawa, canada

PostPosted: Sat Nov 30, 2013 1:05 am    Post subject: Reply with quote

TomWij wrote:
Quote:
Nov 29 19:01:05 faintfuzzies sSMTP[28696]: Unable to connect to "mail" port 25.


Can you check if that host name is correct, you can connect to it by other means and that the server on it is running?



faintfuzzies ~ # nmap 192.168.1.147 -sT -p 25

Starting Nmap 6.25 ( http://nmap.org ) at 2013-11-29 20:04 EST
Nmap scan report for localhost (192.168.1.147)
Host is up (0.00011s latency).
PORT STATE SERVICE
25/tcp closed smtp

Nmap done: 1 IP address (1 host up) scanned in 0.06 seconds


faintfuzzies ~ # nmap 192.168.1.147 -sT -p 465

Starting Nmap 6.25 ( http://nmap.org ) at 2013-11-29 20:05 EST
Nmap scan report for localhost (192.168.1.147)
Host is up (0.00010s latency).
PORT STATE SERVICE
465/tcp closed smtps

Nmap done: 1 IP address (1 host up) scanned in 0.06 seconds



My ssmtp config file:



#
# /etc/ssmtp.conf -- a config file for sSMTP sendmail.
#

# The person who gets all mail for userids < MinUserId
# Make this empty to disable rewriting.
#root=postmaster
root=faintfuzzies.ca@gmail.com

# All mail delivered to userid >= MinUserId goes to user, not root.
#MinUserId=1000

# 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.
#mailhub=mail

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

# Where will the mail seem to come from?
rewriteDomain=faintfuzzies.ca


# The full hostname

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

# hostname=_HOSTNAME_
hostname=faintfuzzies.ca.localdomain

# 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


# Email account and password
AuthUser=faintfuzzies.ca@gmail.com
AuthPass=PASSWORD
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Sat Nov 30, 2013 1:13 am    Post subject: Reply with quote

Quote:
25/tcp closed smtp


If your server's port is closed, there is no mail server listening on it; you'll want to investigate the server instead of your client.[/quote]
Back to top
View user's profile Send private message
DancesWithWords
Guru
Guru


Joined: 29 Jun 2002
Posts: 341
Location: ottawa, canada

PostPosted: Sat Nov 30, 2013 1:22 am    Post subject: Reply with quote

TomWij wrote:
Quote:
25/tcp closed smtp


If your server's port is closed, there is no mail server listening on it; you'll want to investigate the server instead of your client.
[/quote]

Well that is a start. What is and easy to use and configure mail server?

==
DWW
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Sat Nov 30, 2013 8:44 am    Post subject: Reply with quote

Check if your ISP has one, that's the most common way.
Back to top
View user's profile Send private message
DancesWithWords
Guru
Guru


Joined: 29 Jun 2002
Posts: 341
Location: ottawa, canada

PostPosted: Sat Nov 30, 2013 8:42 pm    Post subject: Reply with quote

TomWij wrote:
Check if your ISP has one, that's the most common way.


But that is what I was trying to achieve. If you check my orginal post Iv'e got my ssmtp.conf set up, but it is not working yet?

==
DWW
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Sun Dec 01, 2013 12:46 pm    Post subject: Reply with quote

Well, 192.168.1.147 is not your ISP; you'll want to replace that by the IP of the ISP's SMTP server.
Back to top
View user's profile Send private message
DancesWithWords
Guru
Guru


Joined: 29 Jun 2002
Posts: 341
Location: ottawa, canada

PostPosted: Mon Dec 02, 2013 8:48 pm    Post subject: Reply with quote

TomWij wrote:
Well, 192.168.1.147 is not your ISP; you'll want to replace that by the IP of the ISP's SMTP server.


In my config file I've specified smtp.gmail.com com will that not work?

==
DWW
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Mon Dec 02, 2013 9:00 pm    Post subject: Reply with quote

Now I see it, it somehow doesn't find your config file; that's why it tries the default "mail" instead of what you have specified. :/

Try /etc/ssmtp/ssmtp.conf instead of /etc/ssmtp.conf
Back to top
View user's profile Send private message
DancesWithWords
Guru
Guru


Joined: 29 Jun 2002
Posts: 341
Location: ottawa, canada

PostPosted: Thu Dec 05, 2013 1:48 am    Post subject: Reply with quote

TomWij wrote:
Now I see it, it somehow doesn't find your config file; that's why it tries the default "mail" instead of what you have specified. :/

Try /etc/ssmtp/ssmtp.conf instead of /etc/ssmtp.conf


Make changes get the following:

Dec 4 20:40:03 faintfuzzies sSMTP[28686]: Creating SSL connection to host
Dec 4 20:40:08 faintfuzzies sSMTP[28649]: Connection lost in middle of processing
Dec 4 20:40:08 faintfuzzies cron[28639]: (root) MAIL (mailed 951 bytes of output but got status 0x0001
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Fri Dec 06, 2013 1:53 am    Post subject: Reply with quote

That means it is now reading your config, you will now make sure the settings are correct; for example, you might need to set UseTLS=YES to make a successful connection.
Back to top
View user's profile Send private message
DancesWithWords
Guru
Guru


Joined: 29 Jun 2002
Posts: 341
Location: ottawa, canada

PostPosted: Fri Dec 06, 2013 4:28 am    Post subject: Reply with quote

TomWij wrote:
That means it is now reading your config, you will now make sure the settings are correct; for example, you might need to set UseTLS=YES to make a successful connection.


That last suggestion fixed my problem. All root mail is now being forwarded to my gmail account. Thanks for your help and patience.

==
DWW
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