Author Topic: smtp mail not working  (Read 3853 times)

Offline publicENEMY

  • Full Member
  • ***
  • Posts: 162
smtp mail not working
« on: April 08, 2012, 08:25:40 PM »
Hi,

when i type
Code: [Select]
echo -e "Subject: a test\n\nThis is the email body." | ssmtp -d root

i get this
Code: [Select]
root@Tower:/# echo -e "Subject: a test\n\nThis is the email body." | ssmtp -d root
[<-] 220 mx.google.com ESMTP v6sm13620750pbu.41
[->] HELO smtp.gmail.com
[<-] 250 mx.google.com at your service
[->] MAIL FROM:<root@>
[<-] 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 v6sm13620750pbu.41
ssmtp: 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 v6sm13620750pbu.41
root@Tower:/#

Here are my smtp setting
Quote
Forward "root" email to:   [myothergmail@gmail.com]   Enter the e-mail account where mail to root will be forwarded.
E-Mail Server:[smtp.gmail.com:587]   Mail Server Address used to send e-mail.
Use TLS?(YES/NO):   [YES]   If using a secure connection to the mail-server, set this to YES.
Mail ID:[mygmail@gmail.com]      Your e-mail account on the mail server. (just the ID without the @server.com) Needed if your mail server requires authorization, leave blank otherwise.
Mail Password:[mygmail password]      The e-mail password used when SENDING e-mail. (sometimes different than the one used to read mail) Needed if your mail server requires authorization, leave blank otherwise.
Mail Domain:[mygmail@gmail.com]      Mail originates from this domain. (For many E-mail servers you can use "localhost", for gmail you can use "youraccount@gmail.com")
From Line Override (YES/NO):   [YES]   Make message appear to originate from mail server.
Re-Write Domain:   [Blank]   If non-blank, make mail appear to come from domain. (Some mail hosts will not allow the mail to appear from elsewhere, so leave this blank unless you need to specifiy an alternate domain of origin)
RevAliases :[Blank]      If non-blank, alias mail from "root" to come from youraccount@yourserver.com. ( use: "root:youraccount@yourserver.com" ) Some mail servers will not allow mail from "root" without it being aliased to your own account.

what should i do?

thanks.

Offline Johnm

  • Hero Member
  • *****
  • Posts: 2469
  • I Void Warranties
Re: smtp mail not working
« Reply #1 on: April 08, 2012, 09:32:42 PM »
that is exactly how mine is set up.

the exception is i forward it to my Hotmail account


http://support.google.com/mail/bin/answer.py?hl=en&answer=14257
the error is your ID or Password. verify it is correct? log into the account on your pc to make sure it is activated and not locked out?
change your password to a stronger one, you might be getting  the password is to weak pop-up.
On business trip until June 2013
Goliath:5B12a, Norco RPC-4224, Intel Core i3-2100, X9SCM-F-O, 16GB ECC, 2x AOC-SASLP-MV8, SeaSonic X750 Gold,  W/ APC 1300VA Drives: 11x LP 2TB, 5x LP 1.5TB, 1x 500GB 7200RPM Cache Drive. 40TB  of 48TB Installed (based on 2TB drives)

Atlas My virtualized unRAID. A work in progress. unRAID, ZFS and WHS2011(and more) on ESXi, Norco RPC-4224, X9SCM-F-O, E3-1240 Xeon, Samsung 32GB ECC DDR3, 2x Corsair Perf.Pro SSD  Datastores

Spartacus: unRAID Guest on Atlas.  Ver 5RC4, 1CPU, 8GB RAM, 1x M1015, Intel SAS Expander. Drives 14x Hitachi LP 3TB, 6x Seagate 3TB 7200RPM, 500GB ZFS array for Cache Drive. 60TB of 72TB (3TB)

unRAID MINI: 32Watt! Chenbro ES34169, X7SPE-HF-D525-O, 4GB RAM. Drives: 4x Hitachi LP 3TB, 1x 320GB 7200 RPM 2.5" Ultra Slim Cache Drive. 9TBof 12TB (3TB disks)

Offline Joe L.

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 18670
Re: smtp mail not working
« Reply #2 on: April 09, 2012, 11:13:23 AM »
that is exactly how mine is set up.

the exception is i forward it to my Hotmail account


http://support.google.com/mail/bin/answer.py?hl=en&answer=14257
the error is your ID or Password. verify it is correct? log into the account on your pc to make sure it is activated and not locked out?
change your password to a stronger one, you might be getting  the password is to weak pop-up.
Are there any characters in the password or login that might have special meaning to the bash shell?  (Quote marks, #, $, @, <, >)

Offline publicENEMY

  • Full Member
  • ***
  • Posts: 162
Re: smtp mail not working
« Reply #3 on: April 09, 2012, 04:53:17 PM »
that is exactly how mine is set up.

the exception is i forward it to my Hotmail account


http://support.google.com/mail/bin/answer.py?hl=en&answer=14257
the error is your ID or Password. verify it is correct? log into the account on your pc to make sure it is activated and not locked out?
change your password to a stronger one, you might be getting  the password is to weak pop-up.
Are there any characters in the password or login that might have special meaning to the bash shell?  (Quote marks, #, $, @, <, >)

well, i guess there is. my username contains dot in the middle, like not.me@gmail.com, and the password is "notme".

i tried putting "" for everything(email id) that contains dot in the middle. still no go.

Quote
root@Tower:~# echo -e "Subject: a test\n\nThis is the email body." | ssmtp -d root
[<-] 220 mx.google.com ESMTP w6sm16199032pbo.55
[->] EHLO smtp.gmail.com
[<-] 250 ENHANCEDSTATUSCODES
[->] STARTTLS
[<-] 220 2.0.0 Ready to start TLS
[->] HELO smtp.gmail.com
[<-] 250 mx.google.com at your service
[->] MAIL FROM:<root@>
[<-] 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 w6sm16199032pbo.55
ssmtp: 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 w6sm16199032pbo.55
root@Tower:~#

i just noticed that when i put "" for email id, the email id are not saved and the textbox became empty. i guess "" are considered illegal and not saved.

thanks.
« Last Edit: April 09, 2012, 04:59:33 PM by publicENEMY »

Offline loadme

  • Full Member
  • ***
  • Posts: 161
Re: smtp mail not working
« Reply #4 on: November 17, 2012, 07:02:58 AM »
i just add my experience as the same thing happened to me as well.

my password starts with an $ and i got the same error.



on the unmenu settings page for the mail client i entered my passwort, i.e. $1mypassword11, and it was saved as mypassword11

then i changed my gmail password only to get this done.
i removed all $ and only added a & as a special character.

when i now save the password, the & is replaced by
||vAUTH_PASS=||


is there some way to escape special characters here?

Offline loadme

  • Full Member
  • ***
  • Posts: 161
Re: smtp mail not working
« Reply #5 on: November 17, 2012, 07:29:58 AM »
I found an easy way of dealing with this issue.


go to your flash drive (boot)

edit the file
boot/packages/mail-ssmtp-unmenu-package.conf

on line 21 or so.. you will find your password settings. it needs to look like below:

PACKAGE_VARIABLE Mail Password||vAUTH_PASS=YOUR_PASSWORD||...


paste it there. save the file. check "install on reboot" for the mail package in unmenu and reboot your server.

it worked well with my & special character and hopefully with $ and "" as well

cheers