Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: sending mail via terminal

  1. #1
    Join Date
    Dec 2010
    Beans
    182

    sending mail via terminal

    I am trying to send mail via the terminal following this tutorial. I get the error saying "send-mail: Authorization failed...."). I double checked my username/password, and it was fine. What else could I be missing?

  2. #2
    Join Date
    Dec 2011
    Location
    Florida
    Beans
    Hidden!
    Distro
    Xubuntu 13.04 Raring Ringtail

    Re: sending mail via terminal

    Are you able to receive mail okay? If so, try changing the port you're using for outgoing mail. I always have issues with my ISP blocking SMTP ports because apparently they think every person in the world uses webmail exclusively. Quick change of the port number and it works fine.
    My very own riot?

  3. #3
    Join Date
    Dec 2010
    Beans
    182

    Re: sending mail via terminal

    I use the web interface in gmail, and it seems to work ok, if that's what you mean. what port should I try? i am uinsg 465, and made sure that UseTLS is set to yes.

    here is my configuration file:

    Code:
    #
    # Config file for sSMTP sendmail
    #
    # The person who gets all mail for userids < 1000
    # Make this empty to disable rewriting.
    root=postmaster
    
    # The place where the mail goes. The actual machine name is required no
    # MX records are consulted. Commonly mailhosts are named mail.domain.com
    mailhub=mail
    
    # Where will the mail seem to come from?
    #rewriteDomain=
    
    # The full hostname
    # hostname=raspberrypi
    
    # Are users allowed to set their own From: address?
    # YES - Allow the user to specify their own From: address
    # NO - Use the system generated From: address
    #FromLineOverride=YES
    
    root=username@gmail.com
    mailhub=smtp.gmail.com:465
    rewriteDomain=gmail.com
    AuthUser=username
    AuthPass=password
    FromLineOverride=YES
    UseTLS=YES
    Last edited by sniper8752; April 20th, 2013 at 06:14 PM.

  4. #4
    Join Date
    Dec 2011
    Location
    Florida
    Beans
    Hidden!
    Distro
    Xubuntu 13.04 Raring Ringtail

    Re: sending mail via terminal

    You can give any port number a shot. Really depends on how gmail's servers are setup. Not sure what they allow personally. Looking at your config, I'm kind of doubting that's your issue now... Normally it's the standard SMTP port 25 that ISP's block, not 465.

    Here's something interesting though:
    I see on my personal gmail settings that the outgoing server is smtp.googlemail.com not smtp.gmail.com.

    Might want to give that a shot for your mailhub setting.
    My very own riot?

  5. #5
    prodigy_ is offline May the Ubuntu Be With You!
    Join Date
    Mar 2008
    Beans
    1,219

    Re: sending mail via terminal


  6. #6
    Join Date
    Dec 2010
    Beans
    182

    Re: sending mail via terminal

    Quote Originally Posted by HeroOfCanton View Post
    You can give any port number a shot. Really depends on how gmail's servers are setup. Not sure what they allow personally. Looking at your config, I'm kind of doubting that's your issue now... Normally it's the standard SMTP port 25 that ISP's block, not 465.

    Here's something interesting though:
    I see on my personal gmail settings that the outgoing server is smtp.googlemail.com not smtp.gmail.com.

    Might want to give that a shot for your mailhub setting.
    When I use a port, such as 25, it says that it cannot open that address. Changing to googlemail didn't seem to help.

  7. #7
    Join Date
    Dec 2010
    Beans
    182

    Re: sending mail via terminal

    Quote Originally Posted by prodigy_ View Post
    how do I install it?

    EDIT: Nevermind; It looks like I have it installed already.
    Last edited by sniper8752; April 20th, 2013 at 09:12 PM.

  8. #8
    Join Date
    Dec 2010
    Beans
    182

    Re: sending mail via terminal

    For some reason, it still has the send-mail: authorization failed. what should I do about that?

  9. #9
    prodigy_ is offline May the Ubuntu Be With You!
    Join Date
    Mar 2008
    Beans
    1,219

    Re: sending mail via terminal

    Not sure. I tested mailx with my Gmail account just recently and it worked fine.

  10. #10
    Join Date
    Jan 2009
    Location
    ::1
    Beans
    2,485

    Re: sending mail via terminal

    What is your goal? Use a one-liner to send a mail via a smart-host? If so, I advice to use https://code.google.com/p/mailsend/ ... works for me.

    Usage:

    Code:
    echo "Hello, this is a test" | mailsend -smtp  gmail-smtp-in.l.google.com -f blabla@telfort.nl -t evaq@gmail.com -sub Testing -v
    HTH

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •