I need to send mail form shell script with Snow Leopard local postfix, but it doesn't work
echo "`whoami` login, `date`" | mail -s "test" admin@gmail.com
|
I need to send mail form shell script with Snow Leopard local postfix, but it doesn't work
| |||||
feedback
|
This question came from our site for professional and enthusiast programmers.
|
I have successfully used msmtp on Leopard and Snow Leopard and I highly recommend it.
It's not a smtp server but does the job well from a script if you have an ISP to relay your emails from. | |||||
feedback
|
|
A local default Postfix configuration on Mac OS X (not Server) will be flagged as spam by many receiving SMTP servers (eg. GMails) because of either PBL from Spamhaus or that it's very obvious that the email is not from a valid location (by spam standards). You need to edit the configuration for Postfix to use your local ISPs (or someone else's) mail server to send correctly. Specifically you're looking for manipulating the 'relayhost' value in your Postfix config. | |||
|
feedback
|
|
As Oscar suggested, verify that If that still doesn't work, your ISP might be blocking outbound smtp traffic. See an answer I gave on a related question for ways around that. | |||
|
feedback
|