SuSE Postfix not sending mail at all. Simple email script.
Hey everyone,
I have a simple script that opens a vpn connection, runs rsync, and closes the connection. Now I want an email to be sent out everytime the backup is successful. The problem is that I am mind boggled by the documentation and howtos out there.. Thet all describe setting up a full time server. In Windoze with a 10 line vbs script I can have it chuck an email out to anyone.. In linux do I need to have it all configured? I tried using mutt/sendmail.. it just sends it to the box.. or doesn't send it at all. Any suggestions? I tried bouncing it off of gmail to a gmail account, but no mamais whey. Ronnie |
You don't need a full-time server to do this, but you DO need to tell postfix or sendmail where to send the messages. Otherwise, user@domain.com will just sit on your box, since it doesn't know where to go.
It can be as simple as (sorry, not familiar with postfix since I use sendmail). DS=mail.relay.server (or the address of that server) That line will tell the mail service to send the messages it gets, along to that relay server, which will send it out from there. That's the only part you need to configure. You would also have to set up a Windows server, and tell it what to do with email as well, so this isn't any different. After that, instead of 10 lines of VBS, you can use: mailx -s "Subject is" "text of message" user@domain.com |
is what I followed for the most part.. This just seems like waaay too much work. I can't even tell if stuff si being sent now because there is nothing in my var/logs.
http://www.dcs.napier.ac.uk/~peter/linux/postfix.html |
Here is a tail from the logs:
Code:
X-Postfix-Sender: rfc822; root@bsibackup1.site |
Quote:
That doc set is pretty complete, but it goes into exchange servers, SASL, canonical name translation..all things that are way beyond what you're needing. So set postfix to use a relay host, start postfix, then your mailx command will work. |
Problem is I have done that relayhost. Restarted postfix after each change so thats out. It seems to me in the log that the relay isn't the problem if you look at my previous post.
I do know how to read, and I double checked that directive, but somethings off. Heres part of the conf. Code:
readme_directory = /usr/share/doc/packages/postfix/README_FILES |
Quote:
I found this: http://postfix.state-of-mind.de/patr...ilservers.html That might help you out. It covers doing the SASL thing, and seems a bit easier to follow than the other link. Sorry, I misunderstood your environment. |
All times are GMT -5. The time now is 03:53 PM. |