edentel Posted January 15, 2011 Share Posted January 15, 2011 Just installed the mail and ssmtp package and trying to test it out. I'm getting an error ssmtp: 550 5.7.1 Client does not have permissions to send as this sender In looking over the debug output it's getting MAIL FROM:<[email protected]> In doing so research on ssmtp it appears I'd need to use the revaliases file to remap root to my email address which is permitted to sent through the server. Where do I edit or create the revaliases file on the flash drive so it gets installed? Thanks! -Ed Link to comment
edentel Posted January 15, 2011 Author Share Posted January 15, 2011 So if I leave the override set to YES and test it with: echo -e "From:[email protected]\n\nSubject: a test\n\nThis is the email body." | ssmtp -d [email protected] then every thing works, I get an email at my [email protected] box from [email protected]. How do I create a revaliases file to handle this remapping without forcing the From line into the email? Thanks! Link to comment
Joe L. Posted January 15, 2011 Share Posted January 15, 2011 I've never used that feature... From my brief google search, the file is created in /etc/ssmtp/revaliases You'll be the first to use it I know on unRAID, but that just means your email provider is just a bit more picky than some others. As far as its contents, google is your guide. It will probably also need to not be world writable. The ssmtp.conf file used by the program you installed through unMENU is at copied to /usr/local/etc/ssmtp/ssmtp.conf and used there by ssmtp. You'll need to re-create the revaliases file every time you reboot, so you can add lines to your config/go script to copy a file on your boot drive into place. Something like this at the end of the config/go script will do to copy a file you create located at /boot/revaliases into place every time you reboot: cp /boot/revaliases /usr/local/etc/ssmtp/revaliases Let me know how this works out... I can add a new field in the package manager config screen to create the file once we figure out how to use it. Your experience may help others who follow. Joe L. Link to comment
edentel Posted January 15, 2011 Author Share Posted January 15, 2011 Thanks for the structure primer there.... got it and all is working well now with a minor tweak. 1) Install ssmtp package 2) Create from scratch or grab from the flash at \packages\ssmtp\revaliases Format is simple: # sSMTP aliases # root:[email protected] 3) Place that in the root of the flash 4) Edit \config\go on the flash and stick this after the auto_install call cp /boot/revaliases /usr/local/etc/ssmtp/revaliases I had one last false start there. Apparently it looks in the same location as the ssmtp.conf. Anyway a quick full reboot to test everything and a manual call of /etc/cron.hourly/smtp_status.sh ended up with an email 1 second later. I'm using myhosting.com with a hosted Exchange account and domain. Apparently they are wee bit touchy about their SMTP server. Thanks again... now on to Crashplan. -Ed Link to comment
Joe L. Posted January 15, 2011 Share Posted January 15, 2011 Thanks.... I may add a new field for it on the ssmtp package. Joe L. Link to comment
madburg Posted February 28, 2011 Share Posted February 28, 2011 Same issue, I coped the file to the root of boot, edited with a valid email address in the org and added "cp /boot/revaliases /usr/local/etc/ssmtp/revaliases" to "go" file after packages install line just as edentel stated/tested... God bless you edentel, I was pulling hair out. I would have never figured this out. We allow any relaying of an internal subnet but this thing actually makes a connection... that why it wants credentials and all. Is there something that can be added to allow to just relay for does who can, etc... I hate adding credentials to anything. had to create an account just for unRAID to use, so it got hacked, etc due to this plain test input in the unmenu, I could just kill that account/mailbox no prev. to anything in the network. Link to comment
ejhuzy Posted May 9, 2011 Share Posted May 9, 2011 I had the same problem with verizon email. I needed the revaliases file to make mail go out as [email protected] instead of [email protected]. Thanks for the pointers here. Link to comment
Joe L. Posted May 18, 2011 Share Posted May 18, 2011 Thanks.... I may add a new field for it on the ssmtp package. Joe L. I did add a new field on the config screen for revaliases. It does nothing if left blank. Link to comment
defected07 Posted May 18, 2011 Share Posted May 18, 2011 In the log file it's sending email as "root@<myemail>@gmail.com". And in Gmail, sometimes it says unRaid Web Console, or me, or root. Maybe I'll look into this. I am just sending from/to the same gmail acct. Maybe I'll make a separate one for unRaid. Link to comment
mifronte Posted August 4, 2015 Share Posted August 4, 2015 I apologize for resurrecting this old thread, but I am trying to configure the ssmtp package to send mail to my yahoo account. I have the fields set as follows: Forward "root" email to: [email protected] Email server: smtp.mail.yahoo.com:587 Use TLS: Yes Mail ID: email2 Mail Password: myPassword Mail Domain: yahoo.com From Line Override: Yes Re-write Domain: RevAliases = root:[email protected]. However, when I run a test with: echo -e "Subject: a test\n\nThis is the email body." | ssmtp -d root The MAIL FROM:<[email protected]> is used and so I get an error from yahoo saying "From address not verified - see ..." I checked the /usr/local/etc/ssmtp directory and it does contain a revaliases.conf file with root:[email protected]. How do I get ssmtp to use the [email protected] instead of [email protected] for the From field? I am running unRAID 5.0.5. Edit: It turns out the revaliases.conf file should be named revaliases (without the .conf). I renamed the file and it fixed the problem. Can we have the ssmtp package fix to name the file revaliases and not revaliases.conf in the /usr/local/etc/ssmtp directory? I believe the man page for ssmtp specify revaliases and not revaliases.conf. Link to comment
yarden Posted June 15, 2016 Share Posted June 15, 2016 Hello, Sorry for waking up this topic, but I think that I have a very similar issue with SSMTP. I've tried to use the revaliases to relay local mailboxes to our mail servers but failed. As mifronte tried to use plain user name, the following example fails to deliver: echo "yarden testing workstation"|mail -s 'workstation testing' yarden But when I use ssmtp directly, the mail gets delivered: ssmtp -d yarden < /home/yarden/Downloads/example_email UPDATE: ssmtp is installing sendmail interface, using it also succeeds sending the mail from the local account (e.g. root or yarden) Why this difference exists? Thank you! Yarden Link to comment
RobJ Posted June 15, 2016 Share Posted June 15, 2016 You've posted in a very old thread for unRAID v5 and UnMENU, and a different mail system than currently used. Are you using v5 and UnMENU or are you using the current unRAID v6? Link to comment
yarden Posted June 15, 2016 Share Posted June 15, 2016 Hi RobJ, I've posted here because I've got the same SSMTP issue (that revaliases not working). Is there an official SSMTP mailing list? Link to comment
RobJ Posted June 15, 2016 Share Posted June 15, 2016 Not around here. If you are running unRAID v6, try posting again in the General Support (V6) board, where you'll get a lot more eyeballs. You are going to need a higher level of Linux support than is generally found around here. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.