Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 17th February 2010, 05:00 AM
dustfinger1 Offline
Registered User
 
Join Date: Jan 2009
Posts: 31
linuxfedorafirefox
Can't understand how to use sendmail

I am attempting to use sendmail out of the box in fedora 12 (maybe my first mistake? Is there anything which needs setting up?). My impression of how to use this (based on tutorials on the internet and reading the man page) is that you do something like the following:

Code:
[User@Computer mail]$ sudo sendmail -t
[sudo] password for User: 
To: user@gmail.com
From: whatever@whatever.com
Subject: hello

message body
.
I don't really know if this is right, but I can't find any sites that say otherwise. This is based mostly on looking at a couple bash scripts I read, which seemed to do this. Obviously, however, this doesn't work. Is there anyone out there who knows what I'm doing wrong.
Reply With Quote
  #2  
Old 17th February 2010, 08:54 PM
oiviv Offline
Registered User
 
Join Date: Jun 2009
Posts: 5
linuxfedorafirefox
Usually I do it like this:

1- I write the text on OpenOffice Writer and then I save the text as: Whatever.txt

Is something like this:

To: whomever@gmail.com
From: me@gmail.com
Subject: Test


Message body.............................................. ...

2- At the same directory where I saved de Whatever.txt I tape the following at the prompt:

ssmtp whomever@gmail.com < Whatever.txt
Reply With Quote
  #3  
Old 17th February 2010, 11:18 PM
dustfinger1 Offline
Registered User
 
Join Date: Jan 2009
Posts: 31
linuxfedorafirefox
Thanks for the reply oiviv. Unfortunately, that doesn't work either. Sendmail exits without an error message, but the mail never arrives where I'm trying to send it to. Is there a way to make the program output more information?

---------- Post added at 07:18 PM CST ---------- Previous post was at 07:07 PM CST ----------

I just did a capture with wireshark. Sendmail does a dns lookup for the email address (in this case gmail). It gets the ip address of the gmail mail server, and then sends out a syn packet, which is never ack'd. It does this two or three times then gives up. Is there a reason that the syn packet is getting rejected? My internet connection is fine, so I don't think it's that
Reply With Quote
  #4  
Old 17th February 2010, 11:27 PM
forkbomb's Avatar
forkbomb Offline
Registered User
 
Join Date: May 2007
Location: U.S.
Posts: 4,852
windows_7firefox
Quote:
Originally Posted by dustfinger1 View Post
I just did a capture with wireshark. Sendmail does a dns lookup for the email address (in this case gmail). It gets the ip address of the gmail mail server, and then sends out a syn packet, which is never ack'd. It does this two or three times then gives up. Is there a reason that the syn packet is getting rejected? My internet connection is fine, so I don't think it's that
Your ISP probably might block outgoing mail transmissions (other than those going to your ISP's own SMTP servers) if you're on a residential service plan.

That's why gmail uses SMTPS.
__________________
- Tom
"What is freedom? To have the will to be responsible for one's self." - Stirner
Reply With Quote
  #5  
Old 17th February 2010, 11:36 PM
David Batson Offline
Registered User
 
Join Date: Jul 2009
Posts: 1,158
linuxopera
Regarding sending email (in a general sense), either you need a wired (or wireless) connection from home that has your router or modem setup with your email account password. Otherwise you need to use an authenticated smtp server that asks for your password when you try to send email. You would need an authenticated server when sending email away from home. The alternative is to use webmail, where you log in at a website, compose and send email from there.

You can check with your isp to see if they have an authenticated smtp server - if you are trying to send email away from your home.

http://en.wikipedia.org/wiki/SMTP-AUTH#SMTP-AUTH

http://en.wikipedia.org/wiki/Smtp

http://en.wikipedia.org/wiki/Webmail
__________________
Fedora 18 Gnome on a ThinkPad X220, i5-2540M CPU, Intel HD Graphics 3000, Intel N 6205 wireless, and Sierra Wireless 754S Mobile Hotspot (AT&T)
Reply With Quote
  #6  
Old 17th February 2010, 11:38 PM
dustfinger1 Offline
Registered User
 
Join Date: Jan 2009
Posts: 31
linuxfedorafirefox
Alright, I guess that's why. I'm in a university dorm, and I seriously doubt they'd let smtp go through. Thank you everyone for the help
Reply With Quote
  #7  
Old 18th February 2010, 01:00 AM
oiviv Offline
Registered User
 
Join Date: Jun 2009
Posts: 5
linuxfirefox
Did you installed ssmtp program and edited the file /etc/ssmtp/ssmtp.conf correctly Dustfinger1?

---------- Post added at 01:00 AM CST ---------- Previous post was at 12:31 AM CST ----------

This is what I did and I have no problem sending mail:

#
# /etc/ssmtp.conf -- a config file for sSMTP sendmail.
#
# See the ssmtp.conf(5) man page for a more verbose explanation of the
# available options.
#

# The person who gets all mail for userids < 500
# Make this empty to disable rewriting.
root=mymail@gmail.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.
mailhub=smtp.gmail.com: 465

# 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= gmail.com

# The full hostname
Hostname=oiviv

# 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

authuser=mymail@gmail.com
authpass=mailpasswordxxxxxxxxxxx


# 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

The lines in blue represent the changes I did.
Well, I hope this can help!

Last edited by oiviv; 18th February 2010 at 01:07 AM.
Reply With Quote
Reply

Tags
sendmail, understand

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
i don't quite understand this .. jasonwatkins Using Fedora 3 16th July 2007 03:15 AM
I need to understand what I've done. melm2 Using Fedora 5 15th February 2007 09:44 PM
Trying to understand LVM rtcary Using Fedora 7 9th May 2005 07:50 AM
Please help me understand superbnerd Servers & Networking 0 28th July 2004 09:45 AM


Current GMT-time: 03:34 (Sunday, 19-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat